<br><div><span class="gmail_quote">On 4/2/06, <b class="gmail_sendername">Talin</b> <<a href="mailto:talin@acm.org">talin@acm.org</a>> wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-- The __main__ module should contain a file path like imported<br>modules. in other words, every module should know where it<br>came from. In fact, I see no reason why the __main__ module<br>should have any different attributes than an imported module
<br>other than the name.</blockquote><div><br>I'm not sure what you're missing. The __main__ module has __file__:<br><br>centurion:~ > cat tmp.py<br>print "__file__:", __file__<br>import __main__<br>print "__main__.__file__:", __main__.__file__
<br><br>centurion:~ > python tmp.py<br>__file__: tmp.py<br>__main__.__file__: tmp.py<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-- A path-globbing function that supports regex-style<br>captures.</blockquote><div><br>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.
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-- A path-globbing function that supports the<br>perforce-style syntax "..." (three dots) to mean "all descendants".
<br>So for example, "foo/.../*.cpp" matches any cpp files in<br>foo or any of its subdirectories.</blockquote><div><br>I prefer ksh's '**' myself. It's trivial to add, see for instance <a href="http://www.python.org/sf/628075">
http://www.python.org/sf/628075</a><br>Again, this isn't something for py3k.<br></div></div><br>-- <br>Thomas Wouters <<a href="mailto:thomas@python.org">thomas@python.org</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!