Helpful Information
 
 
Category: Development Articles
Python 101 (part 7): Dinner With A Hungry Giant

modules are -as far as i know- not that
easy to create as described in your tutorial.
a python file is not yet a 'module'.
you must at least have a directory which contains a __init__.py.
in such a directory you can put your
temperature.py.
after that you could import your module.
or am i wrong?

What an absolutely fabulous introduction to the world of Python. Having been programming in Perl for about two years I often find that many tutorials are way below the standard that working programmers naturally attain. This series however has mangaged to explain the basics whilst at the same time keeping me interested enough to follow the series.

Yeah, you are :)
any .py file can be imported as a module.

-Fred

Python 101 \(part 7\): Dinner With A Hungry Giant (http://www.devshed.com/c/a/Python/Python-101-part-7-Dinner-With-A-Hungry-Giant)

Python allows developers to logically group functions together into modules, which can be imported and used by any Python program. In this article, find out what a module is, learn how modules and module namespaces work, and check out the default modules that ship with Python.


Please discuss this article in this thread. You can read the article here (http://www.devshed.com/c/a/Python/Python-101-part-7-Dinner-With-A-Hungry-Giant).










privacy (GDPR)