Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Feb 26th, 2005, 4:23 PM   #1
Fred
Programmer
 
Fred's Avatar
 
Join Date: Feb 2005
Posts: 67
Rep Power: 4 Fred is on a distinguished road
What is wrong with the following code?

What is wrong with this code?
Source = raw_input("File's path: C:/")
If Source[0:3] == 'C:/':
    print 'Invalid path'
This is actually just thought to take the path of a file, and then make sure, that 'C:/' is not entered twice.
When I try to run it though, I am getting an error message at the variable 'Source', which is marked as invalid syntax. Why???
thanx
Fred is offline   Reply With Quote
Old Feb 26th, 2005, 7:24 PM   #2
al1986
Newbie
 
Join Date: Feb 2005
Posts: 24
Rep Power: 0 al1986 is on a distinguished road
Simple mistake - it looks like you've used a capital "I" in the if statement.
al1986 is offline   Reply With Quote
Reply

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




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

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