Executing external programs with vars
Fredrik Lundh
effbot at telia.com
Fri Feb 4 04:57:42 EST 2000
More information about the Python-list mailing list
Fri Feb 4 04:57:42 EST 2000
- Previous message (by thread): Executing external programs with vars
- Next message (by thread): Python on S/390
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Mike Partin <wking at sheltonbbs.com> wrote: > Hi, I'm relativly new to python as a language, I started trying to pick it up > to implement a shell script I have done for helping with CVS use. I'm not > having problems executing external programs per say, it's that I'm having > problems executing them and including variables. For example, when updating a > cvs module I set my variable TempVar with raw_input() then when I exec cvs I > need it to be in the form "cvs -z3 co TempVar" but can't seem to get this to > work. Any help would be appreciated. I assume you mean that you want the command to include the current *contents* of TempVar, right? Command = "cvs -z3 co " + TempVar os.system(Command) alternatives include the %-formatting operator, or using join to build the command from bits and pieces. reading the "output formatting" chapter in the tutorial might help, too. </F>
- Previous message (by thread): Executing external programs with vars
- Next message (by thread): Python on S/390
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list