Difference between revisions of "System"

From PyMOLWiki
Jump to navigation Jump to search
m
(→‎PYMOL API: correct arguments)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
===DESCRIPTION===
+
 
 
The '''system''' command, executes a command in a subshell under Unix or Windows.
 
The '''system''' command, executes a command in a subshell under Unix or Windows.
  
Line 10: Line 10:
 
===PYMOL API===
 
===PYMOL API===
 
<source lang="python">
 
<source lang="python">
cmd.system(string command,int sync=1)
+
cmd.system(string command,int async=0)
 
</source>
 
</source>
  

Latest revision as of 20:38, 4 May 2010

The system command, executes a command in a subshell under Unix or Windows.

USAGE

# execute 'command'
system command

PYMOL API

cmd.system(string command,int async=0)

NOTES

async can only be specified from the Python level (not the command language)

  • if async is 0 (default), then the result code from "system" is returned in r
  • if async is 1, then the command is run in a separate thread whose object is returned

SEE ALSO

ls, cd, pwd