ipm Namespace Reference

Interactive PyMite. More...


Classes

class  Connection
class  PipeConnection
class  SerialConnection
class  Interactive

Functions

def ipm
 Runs the target device-side interactive session.
def parse_cmdline
def main
def ser_test

Variables

string __usage__
string NEED_PYSERIAL = "Install the pySerial module from http://pyserial.wiki.sourceforge.net/pySerial"
string PMVM_EXE = "../platform/desktop/main.out"
string IPM_PROMPT = "ipm> "
string COMPILE_FN = "<ipm>"
string COMPILE_MODE = "single"
string INIT_MESSAGE
string HELP_MESSAGE
string REPLY_TERMINATOR = '\x04'
string EOF_KEY = 'Z'


Detailed Description

Interactive PyMite.

An interactive command line that runs on a host computer that is connected to a target device that is running PyMite. The host computer compiles the interactive statement and converts it to a form that PyMite can handle, sends that over the connection where the target device loads and interprets it. The target device then packages any result, sends it to the host computer and the host computer prints the result.


Function Documentation

def ipm::parse_cmdline (  ) 

Parses the command line for options.

def ipm::ser_test (  ) 

Test ipm over serial connection directly.


Variable Documentation

string ipm::__usage__

Initial value:

"""USAGE:
    ipm.py -[d|s /dev/tty] --[desktop | serial=/dev/tty [baud=19200]]

    -h          Prints this usage message.
    --help

    -d          Specifies a desktop connection; uses pipes to send/receive bytes
    --desktop   to/from the target, which is the vm also running on the desktop.
                ipm spawns the vm and runs ipm-desktop as a subprocess.

    -s <port> [<baud>] Specifies the port (device) for a serial connection.
                <port> resembles `com5` on Win32 or `/dev/cu.usbmodem1912`.
                Optional argument, <baud>, defaults to 19200.

    --serial=<port> Specifies the port (device) for a serial connection.

    --baud=<baud>   Specifies the baud rate for a serial connection.

REQUIREMENTS:

    - pySerial package from http://pyserial.wiki.sourceforge.net/pySerial
    - Win32 platforms require pywin32 package from
      http://sourceforge.net/projects/pywin32/
    """

string ipm::HELP_MESSAGE

Initial value:

"""Type the Python code that you want to run on the target device.
If you see no prompt, type two consecutive returns to exit multiline mode.
Type Ctrl+C to interrupt and Ctrl+D to quit (or Ctrl+Z <enter> on Win32).
"""

string ipm::INIT_MESSAGE

Initial value:

"""Python-on-a-Chip is Copyright 2003, 2006, 2007, 2009 Dean Hall and others.
Python-on-a-Chip is licensed under the GNU LESSER GENERAL PUBLIC LICENSE V 2.1
PyMite is Copyright 2003, 2006, 2007, 2009 Dean Hall.  
PyMite is licensed under the GNU GENERAL PUBLIC LICENSE V 2.
This software is offered with NO WARRANTY.  See LICENSE for details.
"""


Generated on Wed Feb 24 13:37:03 2010 for Python-on-a-chip by  doxygen 1.5.9