By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,525 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,525 IT Pros & Developers. It's quick & easy.

packages

P: n/a
Hello,

I read about modules and packages in the tutorial. I think I understand
how to use packages and modules, even I know how to create a module (as
far I understand it's a simple .py) file , but I don't know how can I
create a package and when should I do it.

Where should I look for more information?

Mage

Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Le Mon, 18 Apr 2005 20:29:39 +0200, Mage a écrit :
Hello,

I read about modules and packages in the tutorial. I think I understand
how to use packages and modules, even I know how to create a module (as
far I understand it's a simple .py) file , but I don't know how can I
create a package and when should I do it. The standard library contains some packages : email, xml, distutils ...
Read the __init__.py in the directory "package-name".
Where should I look for more information?

Mage

example of use :
import distutils
help(distutils)
help(distutils.sysconfig)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'sysconfig'
import distutils.sysconfig
help(distutils.sysconfig)
distutils.sysconfig.get_python_lib(standard_lib=Tr ue)
'/home/fp2x/local/lib/python2.4'
distutils.sysconfig.get_python_lib(standard_lib=Fa lse)
'/home/fp2x/local/lib/python2.4/site-packages'
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.