Displaying keyword search results 1 - 3
Created by Dr. Xi on June 06, 2009 18:31:44 Last update: June 25, 2012 12:37:35
You can use the system call from the os module to execute an external program:
>>> import os >>> os.system(the_command_line_st...However, the path to the executable contains a space character, the system call treats the strings after the first space as arguments, causing an error. Python doc recommends the use of the subprocess module: The subprocess module provides more powerful facilities for spawning new processes and retrieving their results; using that module is preferable to using this function. For example, using wget to get the google home page:
>>> from subprocess import Popen, PIPE >>> (out...or
>>> import subprocess >>> subprocess.call(['cur...
Created by Dr. Xi on May 05, 2009 19:59:21 Last update: May 05, 2009 19:59:21
Delete a single file:
>>> import os >>> file = 'myfile' >>> os.rem...Delete a directory and contents:
>>> import shutil >>> dir(shutil) ['Error', ...
Created by Dr. Xi on November 23, 2008 05:31:00 Last update: November 26, 2008 21:41:25
CVS has two commands, cvs tag and cvs rtag for creating and manipulating labels. cvs tag uses the local file system to determine which revisions to associate with the label, while cvs rtag works directly on the repository. You can tag before checkout with the rtag command. If you checked out, had a successful build and want to create a baseline based on the checked out versions, you should use the tag command.
# to add tag "my_tag" to module "my_module" on...