qubx :: pyenv :: PythonEnvironment :: Class PythonEnvironment
[hide private]
[frames] | no frames]

Class PythonEnvironment

source code

object --+
         |
        PythonEnvironment

Python environment management for user scripting. Don't construct this directly; call Init() and use global "env"

Instance Methods [hide private]
 
__init__(self, folder, call_later=<__builtin__.function object>, call_delayed=<__builtin__.function object>, MainLoop=None, process_events=<__builtin__.function object>, app_path=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
track_module_in_tasks(self, module, untrack=False) source code
 
save_altmap(self) source code
 
run_alt(self, k) source code
 
set_alt(self, k, expr) source code
 
gc_collect_on_idle(self) source code
 
__gc_collect(self, serial) source code
 
set_path(self, path) source code
 
reload(self)
executes the startup script
source code
 
eval_str(self, expr, eat_exceptions=True) source code
 
exec_file(self, fname, raise_exceptions=True, as_module=None) source code
 
exec_init_scripts(self)
executes each .py file in app_path/InitScripts then user init_script_dir, in sorted() order, with the global (__main__) namespace.
source code
 
after_initialize(self)
calls exec_init_scripts, then global after_initialize().
source code
 
save(self)
writes init_script_dir, path and script to disk
source code
 
write(self, x)
Aappends x to sys.stdout and the log-file, and passes x to any OnOutput listeners.
source code
 
flush(self) source code
 
rotate_logs(self)
moves the older log files along toward oblivion; called automatically on construction.
source code
 
scriptable_if_matching(self, expr, pairs) source code
 
__on_exc(self, module, typ, val, tb) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
  path
list of additions to sys.path
  OnCompileException
WeakEvent(ScriptModule, typ, val, tb)
  OnOutput
WeakEvent(string) when anything is printed to stdout or stderr
  OnPauseScript
WeakEvent(ScriptModule)
  OnPlayScript
WeakEvent(ScriptModule)
  OnResumeScript
WeakEvent(ScriptModule)
  OnScriptException
WeakEvent(ScriptModule, typ, val, tb)
  OnScriptLine
WeakEvent(ScriptModule, lineno, line)
  OnScriptable
WeakEvent(expr) when any part of the program does something reproducible
  OnSetAlt
WeakEvent(keystring, expr)
  OnStopScript
WeakEvent(ScriptModule)
  init_script_dir
folder for startup scripts
  script
string to execute on startup/reload
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, folder, call_later=<__builtin__.function object>, call_delayed=<__builtin__.function object>, MainLoop=None, process_events=<__builtin__.function object>, app_path=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

after_initialize(self)

source code 

calls exec_init_scripts, then global after_initialize(). call this when your program is totally running.


Instance Variable Details [hide private]

path

list of additions to sys.path
Get Method:
unreachable(s)
Set Method:
set_path(self, path)