[Tutor] raw_input a directory path

Spencer Parker inthefridge at gmail.com
Wed May 12 23:16:47 CEST 2010


Here is the code:
http://dpaste.com/hold/193862/

<http://dpaste.com/hold/193862/>It still isn't working for me.  I don't see
it hitting the first for loop or even the second one.  It runs without an
error at all.

I am inputing the directory as: \\Documents\ and\
Settings\\user\\Desktop\\test

On Wed, May 12, 2010 at 3:07 PM, Spencer Parker <inthefridge at gmail.com>wrote:

> Spreading it to the list...
>
>
> ---------- Forwarded message ----------
> From: Spencer Parker <inthefridge at gmail.com>
> Date: Wed, May 12, 2010 at 3:07 PM
> Subject: Re: [Tutor] raw_input a directory path
> To: Luke Paireepinart <rabidpoobear at gmail.com>
>
>
> Forget all of what I said...I found the problem...I was encasing the
> variable with quotes instead of just letting it be a variable.  I am dumb...
>
>
> On Wed, May 12, 2010 at 2:33 PM, Luke Paireepinart <rabidpoobear at gmail.com
> > wrote:
>
>> On Wed, May 12, 2010 at 2:44 PM, Spencer Parker <inthefridge at gmail.com>
>> wrote:
>> > I have a search and replace script that I am having the user put in the
>> > directory path as raw_input.  The problem lies when I run the script it
>> > doesn't pick that up for some reason.  Is there an appropriate way to
>> take a
>> > directory path as input? This is on windows...
>>
>> Well I could speculate about all the different problems this could be
>> caused by,
>> or you could provide more detail.
>> Let's go with that.
>>
>> How do you know the script doesn't input the data correctly?
>> and why do you think it doesn't?
>> Where is the code that performs this?
>> How are you running the script?
>>
>> Directory path should be no different than any other string.
>> I'm guessing it has to do with backslashes but I'll wait until you
>> explicate.
>> -Luke
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100512/d694b676/attachment.html>


More information about the Tutor mailing list