Module bp_cli :: Class CLI
[show private | hide private]
[frames | no frames]

Type CLI

object --+
         |
        CLI


BitPim Command Line Interface implementation
Method Summary
  __init__(self, arg, file_in, file_out, file_err, config_filename, comm_port, phone_model)
Constructor
  cd(self, args)
Change the current working dir on the phone FS.
  cdu(self, args)
Change to current working dir on the phone up one level (parent).
  cli(self, _)
Run a primitive interactive CLI sesssion.
  cp(self, args)
Transfer files between the phone filesystem and local filesystem
  cwd(self, _)
Print the current working dir(cwd/pwd) on the phone FS.
  ll(self, args)
Do a long dir listing command
  log(self, logstr)
  logdata(self, logstr, logdata, dataclass, datatype)
  ls(self, args)
Do a directory listing
  mkdir(self, args)
Create one or more dirs on the phone FS.
  progress(self, pos, maxcnt, desc)
Update the progress meter
  pwd(self, _)
Print the current working dir(cwd/pwd) on the phone FS.
  rm(self, args)
delete one or more files on the phone FS.
  rmdir(self, args)
Delete one or more phone FS directories.
  run(self, cmdline)
Execute the specified command if specified, or the one currently stored
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, arg, file_in, file_out, file_err, config_filename=None, comm_port=None, phone_model=None)
(Constructor)

Constructor
Parameters:
arg - command string including the command and its argument
file_in - input stream file object
file_out - output stream file object
file_err - error strean file object
config_filename - use this config file instead of the default
comm_port - string name of the comm port to use (default to config file)
phone_model - string phone model to use (default to config file)
Overrides:
__builtin__.object.__init__

cd(self, args)

Change the current working dir on the phone FS.
Parameters:
args - dir name(s), only args[0] matters.
Returns:
(True, None) if successful, (False, error code) otherwise

cdu(self, args)

Change to current working dir on the phone up one level (parent).
Returns:
(True, None) if successful, (False, error code) otherwise

cli(self, _)

Run a primitive interactive CLI sesssion.
Returns:
always (True, None)

cp(self, args)

Transfer files between the phone filesystem and local filesystem
Parameters:
args - string dir names
Returns:
(True, None) if successful, (False, error code) otherwise

cwd(self, _)

Print the current working dir(cwd/pwd) on the phone FS.
Returns:
(True, None)

ll(self, args)

Do a long dir listing command
Parameters:
args - string directory names
Returns:
(True, None) if successful, (False, error code) otherwise

ls(self, args)

Do a directory listing
Parameters:
args - string directory names
Returns:
(True, None) if successful, (False, error code) otherwise

mkdir(self, args)

Create one or more dirs on the phone FS.
Parameters:
args - string dir names
Returns:
(True, None) if successful, (False, error code) otherwise

progress(self, pos, maxcnt, desc)

Update the progress meter

pwd(self, _)

Print the current working dir(cwd/pwd) on the phone FS.
Returns:
(True, None)

rm(self, args)

delete one or more files on the phone FS. This command does not delete local files.
Parameters:
args - file names
Returns:
(True, None) if successful, (False, error code) otherwise.

rmdir(self, args)

Delete one or more phone FS directories. This command does not delete local directories.
Parameters:
args - dir names.
Returns:
(True, None) if successful, (False, error code) otherwise.

run(self, cmdline=None)

Execute the specified command if specified, or the one currently stored
Parameters:
cmdline - string command line
Returns:
(T, None) if the command completed successfully, (F, error code) otherwise

Generated by Epydoc 2.1 on Fri Aug 15 18:58:32 2008 http://epydoc.sf.net