Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Sep 8th, 2006, 7:52 PM   #1
peaceofpi
hi: for(;;) goto hi;
 
peaceofpi's Avatar
 
Join Date: Jun 2006
Posts: 115
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
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining Values in an array bigmitch C++ 4 Feb 10th, 2006 8:29 AM
inserting strings into other strings codylee270 C 2 Dec 3rd, 2005 10:37 PM
Question about multidimensional arrays of strings aznluvsmc C 8 Oct 15th, 2005 11:20 PM
Passing strings from a C++ DLL to VB tam10 C++ 0 Sep 16th, 2005 6:52 PM
pointers strings, and strcat() conbrio C 3 Apr 16th, 2005 2:23 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:49 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC