Help replacing os.system call with subprocess call

Discussion in 'Python' started by David Pratt, Apr 7, 2008.

  1. David Pratt

    David Pratt Guest

    Hi. I am trying to replace a system call with a subprocess call. I have
    tried subprocess.Popen and subprocess.call with but have not been
    successful. The command line would be:

    svnadmin dump /my/repository > svndump.db

    This is what I am using currently:

    os.system('svnadmin dump %s > %s' % (svn_dir,
    os.path.join(backup_dir, 'svndump.db')))

    Many thanks.
     
    David Pratt, Apr 7, 2008
    #1
    1. Advertisements

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. Tom Brown
    Replies:
    0
    Views:
    614
    Tom Brown
    Sep 22, 2005
  2. Jim
    Replies:
    2
    Views:
    650
  3. timw.google
    Replies:
    8
    Views:
    905
    timw.google
    Oct 9, 2007
  4. Rick King
    Replies:
    1
    Views:
    340
    Martin v. Löwis
    Jul 26, 2009
  5. Kushal Kumaran
    Replies:
    1
    Views:
    1,582
    John Bokma
    Apr 9, 2010
  6. hiral
    Replies:
    2
    Views:
    804
    Jean-Michel Pichavant
    May 5, 2010
  7. goodman
    Replies:
    4
    Views:
    840
    Lawrence D'Oliveiro
    Nov 5, 2010
  8. Rob Meade

    Replacing - and not Replacing...

    Rob Meade, Apr 5, 2005, in forum: ASP General
    Replies:
    5
    Views:
    575
    Chris Hohmann
    Apr 11, 2005
Loading...