main logo
Subject: Re: [dabo-dev] The problem with __name__
Author: Ed Leafe
Posted: 2004/10/31 17:25:59
 
View Entire Thread
New Search


On Oct 31, 2004, at 6:13 PM, Paul McNett wrote:

>> Why? I don't see any downside to letting people run any script,
>> if that's possible. It would be great to let them play with Python,
>> trying out stuff they find without having to go through the whole
>> python/wx/MySQLdb installation routine.
>
> Well, there's nothing guaranteeing a given script will have a main()
> function, so a given script may or may not work anyway.

...which is why I was hoping to be able to work around this!

Daborun can call *any* method of a script by including the method name
on the command line, but I'd really like to be able to drop a script on
the daborun icon and have it work. If it means limiting that to code
containing a main() function, well, that's the best we can do. I have a
question posted to the Python list in the hope that someone more
knowledgeable of the internal workings of Python can answer this
definitively.

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://dabodev.com/


 
©2004 Ed Leafe
<-- Prior Message New Search Next Message -->