View Single Post
Old Sep 8th, 2006, 6:52 PM   #1
peaceofpi
hi: for(;;) goto hi;
 
peaceofpi's Avatar
 
Join Date: Jun 2006
Posts: 93
Rep Power: 3 peaceofpi is on a distinguished road
Send a message via AIM to peaceofpi Send a message via MSN to peaceofpi
Combining strings for os.system()

Not working too well >_>

import os

map = raw_input("Enter map name: ") # ex. Town
gunzrun = "\"C:\\Program Files\\MAIET\\OldGunz\\GunzRunnable [02-06-06].exe\"" # (exe is C:\Program Files\MAIET\OldGunz\GunzRunnable [02-06-06.exe)
game = " /game \"" # the "/game" switch
eq = "\"" # quote mark at the end

full = gunzrun + game + eq
# after it's done, it turns out to be "C:\Program Files\MAIET\OldGunz\GunzRunnable [02-06-06].exe" /game "mapname"

os.system(full)

Output is:
'C:\Program\' is not recognized as an internal or external command, operable program or batch file.

Works right till then, how do I make the space in the string work?
__________________
How do you play Religious Roulette?
Stand around in a circle and blaspheme till someone gets struck by lightning.
peaceofpi is offline   Reply With Quote