eclipse - Run Python project from shell -
Eclipse can run a python project instead of just a Perhaps I have not made it correctly with eclipse (or rather Eclipse did not find it properly), but eclipse can run it, so I have a python with a 3.4.1 shell How can i Do I have to put something in It depends on what your file looks like - if you have However, if it is just a script without conditional, then you can only import the module and it will be run. Python needs to know where the module is, so if it is not in your way, then you have to use relative import as a document. .py file. Can the whole project be run from Python 3.x shell? I saw it a little bit, but I did not really find any way. I've just tried to run the
.py file with the main code in the code
and even pycache 'directory .
__init __.py , perhaps, and then run that file?
then __name__ == "__main__": do_whatever () , then there will be no import
do_whatever () because the name of imported module will not be
"__ main__" . (It will be the name of this module, whatever it is)
Comments
Post a Comment