On 7/13/07, Jim Jewett <jimjjewett at gmail.com> wrote: > Andy C wrote: > >... a .zip file with a __zipmain__.py module at its root? > > Why not just an __init__.py, which you would normally execute if you > tried to import/run a directory? > > > * Magically looking at the first argument to see if it's a zip file > > seems problematic to me. I'd rather be explicit with the -z flag. > > Likewise, I'd rather be explicit and call it __zipmain__ rather than > > __main__. > > Treating zip files (and only zip files) as a special case equivalent > to uncompressed files seems like a wart; I would prefer not to > special-case zips any more than they already are. Just to clarify, my patch already works with uncompressed directory trees just fine. It's just a matter of naming, I suppose. I don't mind calling it -z and using it for directories. But mainly that's because no one has proprosed another name. : ) I think we've agreed that -p is something totally different. > > while I think it would be a bad practice to > > import __main__, > > I have seen it recommended as the right place to store global > (cross-module) settings. Where? People use __main__.py now? That seems bad, because __ names are reserved, so they should just use main.py, I would think. Andy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4