On 4/2/06, Talin <[EMAIL PROTECTED]> wrote:
I'm not sure what you're missing. The __main__ module has __file__:
centurion:~ > cat tmp.py
print "__file__:", __file__
import __main__
print "__main__.__file__:", __main__.__file__
centurion:~ > python tmp.py
__file__: tmp.py
__main__.__file__: tmp.py
Improvements like that happen because someone writes the module and people end up using it. It isn't part of the language, it's just stdlib evolution.
I prefer ksh's '**' myself. It's trivial to add, see for instance http://www.python.org/sf/628075
Again, this isn't something for py3k.
-- The __main__ module should contain a file path like imported
modules. in other words, every module should know where it
came from. In fact, I see no reason why the __main__ module
should have any different attributes than an imported module
other than the name.
I'm not sure what you're missing. The __main__ module has __file__:
centurion:~ > cat tmp.py
print "__file__:", __file__
import __main__
print "__main__.__file__:", __main__.__file__
centurion:~ > python tmp.py
__file__: tmp.py
__main__.__file__: tmp.py
-- A path-globbing function that supports regex-style
captures.
Improvements like that happen because someone writes the module and people end up using it. It isn't part of the language, it's just stdlib evolution.
-- A path-globbing function that supports the
perforce-style syntax "..." (three dots) to mean "all descendants".
So for example, "foo/.../*.cpp" matches any cpp files in
foo or any of its subdirectories.
I prefer ksh's '**' myself. It's trivial to add, see for instance http://www.python.org/sf/628075
Again, this isn't something for py3k.
--
Thomas Wouters <[EMAIL PROTECTED]>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
