标准库中最有用的Python模块? [英] Most useful Python modules from the standard library?

查看:66
本文介绍了标准库中最有用的Python模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在巴黎大学教授研究生级别的Python课,需要将学生介绍给标准库.我想与他们讨论一些最重要的标准模块.

I am teaching a graduate level Python class at the University of Paris, and the students need to be introduced to the standard library. I want to discuss with them about some of the most important standard modules.

您认为哪些模块是绝对必须的?尽管响应可能会因您的领域(Web编程,科学等)而异,但我仍认为通常需要一些模块:mathsysreosos.path,...,也许是:collectionsstruct,...

What modules do you think are absolute musts? Even though responses probably vary depending on your field (web programming, science, etc.), I feel that some modules are commonly needed: math, sys, re, os, os.path, logging,… and maybe: collections, struct,…

您建议我在1或2小时的时间内介绍哪些模块?

What modules would you suggest I present, in a 1 or 2 hour slot?

推荐答案

要在1-2小时内覆盖的模块完全取决于受众的兴趣或关注点.他们还要参加什么其他课程?他们准备立即使用什么?

Modules to cover in a 1-2 hour slot entirely depend on your audience's interest or focus. What other classes are they taking? What are they prepared to make use of immediately?

请务必提及mathdecimaldatetime以及timere.

Be sure to mention math, decimal and datetime and time and re.

对于将要进行面向文件的工作的IT类型:globfnmatchosos.pathtempfileshutil.

For IT-types who will be doing file-oriented work: glob, fnmatch, os, os.path, tempfile, and shutil.

数据库人员必须了解sqlitejson.

Database folks must hear about sqlite and json.

模拟听众可能想听听有关random的信息.

Simulation audience may want to hear about random.

Web开发人员必须从客户端角度了解urllib2.还有Beautiful Soup和您选择的XML解析器.

Web developers must hear about urllib2 from a client point of view. Also Beautiful Soup and an XML parser of your choice.

Web开发人员必须从服务器的角度了解loggingwsgiref.

Web developers must hear about logging and wsgiref from a server point of view.

这篇关于标准库中最有用的Python模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆