Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Open Source > BOOK: Beginning Python
|
BOOK: Beginning Python
This is the forum to discuss the Wrox book Beginning Python by Peter C. Norton, Alex Samuel, Dave Aitel, Eric Foster-Johnson, Leonard Richardson, Jason Diamond, Aleatha Parker, Michael Roberts; ISBN: 9780764596544
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Python section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2006, 12:23 PM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Question on using more than one process.

Hi,

In chapter 9, the section on using more than more than one process introduced how to start up new programs using os.spawn family or os.system function.

When I enter the following code (on a windows machine):
Code:
import os, sys

if sys.platform == 'win32':
    print 'Running on a windows platform.'
    command = "C:\Program Files\CCleaner\ccleaner.exe"

os.system(command)

raw_input('Press enter to exit')
I get the following error:
Code:
Running on a windows platform.
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Press enter to exit
This only happens when there is a space in the path (e.g: program files).
Is there a way around this?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with process.. nelly78 .NET Framework 2.0 3 October 14th, 2008 05:54 AM
process.startinfo opens new instance of process Anypond General .NET 0 August 28th, 2008 05:35 AM
Terminate Process (How To) Nova Beginning VB 6 3 October 14th, 2006 02:37 PM
Process problem wslyhbb C# 2 February 14th, 2006 01:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.