Pycharm python console: variables defined in startup script not set on console startup -
i added startup.py script run whenever launch python console. script contains following:
#!/usr/bin/env python abc import cde module user='me'
the starting script used pycharm set following:
import sys,osprint('python %s on %s' % (sys.version, sys.platform)) sys.path.extend([working_dir_and_python_paths]) os.system("{0} 1".format(os.environ.get("pythonstartup")))
where pythonstartup points location of startup.py described above.
the problem when launch python console pycharm, module imports correctly, variable user not set. when type 'user' , press enter, get
nameerror: name 'user' not defined
Comments
Post a Comment