Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Invalid syntax error

Reply
Thread Tools

Re: Invalid syntax error

 
 
D'Arcy J.M. Cain
Guest
Posts: n/a
 
      12-20-2009
On Sun, 20 Dec 2009 08:40:05 -0500
"Ray Holt" <(E-Mail Removed)> wrote:
> Why am I getting an invalid syntax error on the following:
> os.chdir(c:\\Python_Modules). The error message says the colon after c is


You forgot the quotes around the string. I am not on Windows but I
think the following will all work.

os.chdir("c:\\Python_Modules")
os.chdir(r"c:\Python_Modules")
os.chdir("c:/Python_Modules")

I won't swear to that last one but other languages handle it. Try them.

--
D'Arcy J.M. Cain <(E-Mail Removed)> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax error? What syntax error? Assignment fo default values? Mark Richards Perl Misc 3 11-18-2007 05:01 PM
Invalid URI: There is an invalid sequence in the string. Error!! Patrick.O.Ige ASP .Net 1 07-02-2006 11:21 AM
WMI - invalid syntax error? py Python 2 12-30-2005 02:47 PM
Invalid Syntax Error gornk Computer Support 1 08-20-2004 02:50 PM
Intermittant redirect to Invalid Syntax Error page =?Utf-8?B?TWFyayBQaGFuaWRlcw==?= ASP .Net 0 02-16-2004 03:26 PM



Advertisments