Executing WinXP commands using os module

Discussion in 'Python' started by pranav, Jan 23, 2009.

  1. pranav

    pranav Guest

    Greetings,
    I am writing a code to perform operations like checkout, check-in and
    others for SS. (SS is the command line utility for Visual SafeSource,
    VSS). I am familiar with all the commands for this purpose. I know
    li'l python also.
    What i want to learn is how do i use the command line arguments in os
    (or any other call that will fulfill my purpose). I can use popen to
    create a command prompt. But i need to use commands like

    ss checkout $\projectName\file -Yusername,password -c'Test comment'

    Please help me.

    Thanks in advance,
    Regards

    Pranav Prakash

    http://codecontrol.blogspot.com
     
    pranav, Jan 23, 2009
    #1
    1. Advertising

  2. pranav

    Chris Rebert Guest

    On Fri, Jan 23, 2009 at 3:50 AM, pranav <> wrote:
    > Greetings,
    > I am writing a code to perform operations like checkout, check-in and
    > others for SS. (SS is the command line utility for Visual SafeSource,
    > VSS). I am familiar with all the commands for this purpose. I know
    > li'l python also.
    > What i want to learn is how do i use the command line arguments in os
    > (or any other call that will fulfill my purpose). I can use popen to
    > create a command prompt. But i need to use commands like
    >
    > ss checkout $\projectName\file -Yusername,password -c'Test comment'


    You want the `subprocess` module. See
    http://docs.python.org/library/subprocess.html

    Cheers,
    Chris

    --
    Follow the path of the Iguana...
    http://rebertia.com
     
    Chris Rebert, Jan 23, 2009
    #2
    1. Advertising

  3. Hi!

    Try:
    os.system("""start "" cmd /css checkout
    $\projectName\file -Yusername,password -c'Test comment' """)

    (not tested ; it's directly from my memory)


    @-salutations
    --
    Michel Claveau
     
    Méta-MCI \(MVP\), Jan 23, 2009
    #3
  4. pranav

    pranav Guest

    On Jan 23, 5:05 pm, Chris Rebert <> wrote:
    > On Fri, Jan 23, 2009 at 3:50 AM, pranav <> wrote:
    > > Greetings,
    > > I am writing a code to perform operations like checkout, check-in and
    > > others for SS. (SS is the command line utility for Visual SafeSource,
    > > VSS). I am familiar with all the commands for this purpose. I know
    > > li'l python also.
    > > What i want to learn is how do i use the command line arguments in os
    > > (or any other call that will fulfill my purpose). I can use popen to
    > > create a command prompt. But i need to use commands like

    >
    > > ss checkout $\projectName\file -Yusername,password -c'Test comment'

    >
    > You want the `subprocess` module. Seehttp://docs.python.org/library/subprocess.html
    >
    > Cheers,
    > Chris
    >
    > --
    > Follow the path of the Iguana...http://rebertia.com


    Thanks, will try it
     
    pranav, Jan 23, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mitchley
    Replies:
    0
    Views:
    624
    Mitchley
    Jun 10, 2004
  2. FyinsFlip
    Replies:
    4
    Views:
    3,512
    bruce barker
    Dec 29, 2004
  3. Ben Pfaff

    Re: man pages for C commands (GCC commands)

    Ben Pfaff, Jun 24, 2003, in forum: C Programming
    Replies:
    4
    Views:
    3,999
    Thomas Stegen
    Jun 28, 2003
  4. Tim Stanka
    Replies:
    1
    Views:
    828
    Jeff Epler
    Aug 2, 2004
  5. Murugesh
    Replies:
    5
    Views:
    193
Loading...

Share This Page