Package topo :: Package misc :: Module commandline
[hide private]
[frames] | no frames]

Module commandline

source code

Support functions for parsing command-line arguments and providing the Topographica command prompt. Typically called from the './topographica' script, but can be called directly if using Topographica files within a separate Python.

$Id: commandline.py 11301 2010-07-27 16:19:54Z ceball $


Version: $Revision: 11301 $

Classes [hide private]
  GlobalParams
A Parameterized class providing script-level parameters.
  IPCommandPromptHandler
Allows control over IPython's dynamic command prompts.
  CommandPrompt
Control over input prompt.
  CommandPrompt2
Control over continuation prompt.
  OutputPrompt
Control over output prompt.
Functions [hide private]
 
sim_name_from_filename(filename)
Set the simulation title from the given filename, if none has been set already.
source code
 
boolean_option_action(option, opt_str, value, parser)
Callback function for boolean-valued options that apply to the entire run.
source code
 
interactive() source code
 
i_action(option, opt_str, value, parser)
Callback function for the -i option.
source code
 
v_action(option, opt_str, value, parser)
Callback function for the -v option.
source code
 
d_action(option, opt_str, value, parser)
Callback function for the -d option.
source code
 
l_action(option, opt_str, value, parser)
Callback function for the -l option.
source code
 
gui(start=True)
Start the GUI as if -g were supplied in the command used to launch Topographica.
source code
 
g_action(option, opt_str, value, parser)
Callback function for the -g option.
source code
 
c_action(option, opt_str, value, parser)
Callback function for the -c option.
source code
 
p_action(option, opt_str, value, parser)
Callback function for the -p option.
source code
 
auto_import_commands()
Import the contents of all files in the topo/command/ directory.
source code
 
a_action(option, opt_str, value, parser)
Callback function for the -a option.
source code
 
exec_startup_files()
Execute startup files, looking at appropriate locations for many different platforms.
source code
 
process_argv(argv)
Process command-line arguments (minus argv[0]!), rearrange and execute.
source code
Variables [hide private]
  matplotlib_imported = True
  ipython_imported = True
  BANNER = '\nWelcome to Topographica!\n\nType help() for intera...
  global_params = GlobalParams(name='global_params', print_level...
  global_constants = {'pi': 3.14159265359}
  usage = 'usage: topographica ([<option>]:[<filename>])*\nwhere...
  topo_parser = OptionParser(usage= usage)
  something_executed = False
  __package__ = 'topo.misc'
Variables Details [hide private]

BANNER

Value:
'''
Welcome to Topographica!

Type help() for interactive help with python, help(topo) for general
information about Topographica, help(commandname) for info on a
specific command, or topo.about() for info on this release, including
licensing information.
'''

global_params

Value:
GlobalParams(name='global_params', print_level=100)

usage

Value:
'''usage: topographica ([<option>]:[<filename>])*
where any combination of options and Python script filenames will be
processed in order left to right.'''