python-library

ctypes

Ctypes提供了与c语言兼容的数据类型,使得python可以调用c库;

使用总结

  • 根据c的头文件重新定义一套python头文件(只有数据结构);
    • 其中数据结构重定义时要满足;
      • python中要实现c语言中的结构,需要用到类。
      • 重新定义时顺序要一致。
      • 数组类型用:char[6] == c_char * 6
  • 在python中导入c库,得到dll对象;
  • 利用dll对象来调用dll中的api;

邮件

收发邮件,涉及到两个库

  • smtplib 收发邮件
  • email 按格式生成、解析邮件内容

smtplib

参考: http://www.cnblogs.com/xiaowuyi/archive/2012/03/17/2404015.html

发送邮件的步骤

  • 连接发送服务器
  • 登录(现在的邮件服务器都需要登录方可进行邮件的发送了)
  • 发送

网易邮箱注意点

Error: 无法发送邮件, cause: (550, ‘User has no permission’)

未开启客户端授权码功能(可用于第三方软件进行邮件的发送)

Error: 无法发送邮件, cause: (535, ‘Error: authentication failed’)

账号密码错

email

MIME

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Python3.6标准库 It contains data types that would normally be considered part of the “core” of a language, such as numbers and lists. For these types, the Python language core defines the form of literals and places some constraints on their semantics, but does not fully define the semantics. The library also contains built-in functions and exceptions — objects that can be used by all Python code without the need of an import statement. Some of these are defined by the core language, but many are not essential for the core semantics and are only described here. The bulk of the library, however, consists of a collection of modules. There are many ways to dissect this collection. Some modules are written in C and built in to the Python interpreter; others are written in Python and imported in source form. Some modules provide interfaces that are highly specific to Python, like printing a stack trace; some provide interfaces that are specific to particular operating systems, such as access to specific hardware; others provide interfaces that are specific to a particular application domain, like the World Wide Web. Some modules are available in all versions and ports of Python; others are only available when the underlying system supports or requires them; yet others are available only when a particular configuration option was chosen at the time when Python was compiled and installed. This manual is organized “from the inside out:” it first describes the built-in functions, data types and exceptions, and finally the modules, grouped in chapters of related modules. This means that if you start reading this manual from the start, and skip to the next chapter when you get bored, you will get a reasonable overview of the available modules and application areas that are supported by the Python library. Of course, you don’t have to read it like a novel — you can also browse the table of contents (in front of the manual), or look for a specific function, module or term in the index (in the back). And finally, if you enjoy learning about random subjects, you choose a random page number (see module random) and read a section or two. Regardless of the order in which you read the sections of this manual, it helps to start with chapter Built-in Functions, as the remainder of the manual assumes familiarity with this material.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值