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 7733 2008-01-26 10:46:56Z ceball $




Version: $Revision: 7733 $

Classes [hide private]
  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
 
gui()
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
 
auto_import_commands()
Import the contents of all files in the topo/commands/ 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]
  BANNER = '\nWelcome to Topographica!\n\nType help() for intera...
  global_constants = {'pi': 3.14159265359}
  usage = 'usage: topographica ([<option>]:[<filename>])*\nwhere...
  topo_parser = OptionParser(usage= usage)
  something_executed = False
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.
'''

usage

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