I have a python script that is pretty simple: when executed, it
imports a bunch of stuff and then runs some logic. When *imported*, it
defines some variables and exits. Here's what it looks like:
=== foo.py ===
if __name__ != '__main__':
x = 1
exit_somehow
import bar
do_some_stuff...
=== EOF
On May 12, 1:33 pm, mrstevegross mrstevegr...@gmail.com wrote:
I have a python script that is pretty simple: when executed, it
imports a bunch of stuff and then runs some logic. When *imported*, it
defines some variables and exits. Here's what it looks like:
=== foo.py ===
if __name__ !=
mrstevegross wrote:
I have a python script that is pretty simple: when executed, it
imports a bunch of stuff and then runs some logic. When *imported*, it
defines some variables and exits. Here's what it looks like:
=== foo.py ===
if __name__ != '__main__':
x = 1
exit_somehow
import bar