python - Import variables without displaying source code -
I am using Python 2.7 with Spider
I have a file (xxx.py) The value of some variables using an order like this: xxx Import v1, v2, v3, v4 to
I can use the variable, but Spider shows me all output from xxx.py before the output of the current program (runs a series of print commands in the xxx.py file). Is there something that I can do to present only the output from the current file, running the code form xxx.py in "background"?
If there is a code that you do not want to execute while modulating the module, then preserve it Should go:
if __name__ == "__main__": # to execute the code only when the module is executed # as script, not imported.
The modules to be imported should not be written on the standard output.
Comments
Post a Comment