variables within variables
lars at stea.nu
lars at stea.nu
Thu Oct 26 06:12:23 EDT 2000
I'm writing a script for burning CD's
I vant to set some variables like:
cddev = /dev/cdrom
cdrdev = 0,1,0
speed = input("Enter speed: ")
and then create a new variable like:
cdcopy = "cdrecord - v speed=",speed , "dev=",cdrdev, "-isoimage", cddev
I've done this with def cdrecord(speed,cdrdev,cddev) and so forth.
I can then print :
print cdcopy
but the word "Null" is appended to the end of the line.
Then it doesn't work to execute:
posix.system(cdrecord).
Can anyone please explain a way to do this?
Lars at stea.nu
www.stea.nu
More information about the Python-list
mailing list