Tobiah wrote:
This works fine, but in the sub-modules the sys.path appropriately
returns the same as from the parent, I want them to know their own file
names. How?? I can pass it to them, but wondered if there is a more
self-sufficient way for a module to know from where it was invoked.
> This works fine, but in the sub-modules the sys.path appropriately
> returns the same as from the parent, I want them to know their own file
> names. How?? I can pass it to them, but wondered if there is a more
> self-sufficient way for a module to know from where it was invoked.
I like the ide
On Aug 11, 5:12 pm, guthrie wrote:
> This works fine, but in the sub-modules the sys.path appropriately
> returns the same as from the parent, I want them to know their own
> file names. How?? I can pass it to them, but wondered if there is a
> more self-sufficient way for a module to know from wh
I want to have a program which will form a list of all *.py scripts in
a sub-directory, and then call some standard messages on them. So I
can add a new data source modularly by just dropping a new file into
the sources directory with the appropriate methods in it.
For example:
path = sys.path[0]