2
votes
1answer
183 views

Python - Importing modules and visibility

Consider the following code: a.py import os def print_rand(): print os.urandom() And another module: b.py from a import * In this code, I end up with an os variable getting imported from ...
3
votes
1answer
678 views

Where should I store the files for python modules I install?

If I download a module for Python (such as alglib) and installing is simply a matter of running python setup.py install Where should I be keeping the files I download, or the files that get created ...
2
votes
1answer
375 views

Python simulation-scripts architecture

Situation: I've some scripts that simulate user-activity on desktop. Therefore I've defined a few cases (workflows) and implemented them in Python. I've also written some classes for interacting with ...
6
votes
1answer
546 views

Can one edit a built-in Python module?

I'm currently learning Python and I'm at the point in the book about using the Math library. I looked on the Python website and noticed the library was a bit scarce and am writing some more useful ...
2
votes
1answer
795 views

Good practices for packaging Python programs

I've been using Python for a while now, both in the context of personal and professional projects. One thing that occured to me recently is that I had never thought about a good way to deploy Python ...
12
votes
4answers
1k views

How large should a Python module be?

I was browsing a github project and found this module which has more than 8 thousands lines. Is it good practice to have that much code in a single module? Shouldn't this be split over multiple ...
8
votes
5answers
615 views

Python: What is the point of using “import”?

I am not very clear on this aspect. Let's say you have a bunch of .py files that are their own separate modules. Why does each .py file need to import the others when they use that class? Or do they? ...
2
votes
2answers
543 views

What is Module Object and Function Object?

I am currently teaching myself Python, using the GNU licensed book "Introduction to Computer Science using Python." In chapter 3, functions are covered. While I understand the concept of functions ...
28
votes
1answer
12k views

Module vs. Package?

Whenever you do "from 'x' import 'y'" I was wondering which one is considered the 'module' and which is the 'package', and why it isn't the other way around?