problems with opening files due to file's path

Alexnb alexnbryan at gmail.com
Wed Jun 11 16:16:32 EDT 2008


I posted the underlying code, but I haven't made the GUI code because if I
can't get the underlying code right it doesn't matter, well in my eyes it
doesn't but I am probably wrong. But it will look somehting like this:

e = Entry()
#when user hits submit)
path = e.get()

os.startfile(path)

this is very simplified, but that is the idea, and basically exactly what
will happen, just if the path has some of those characters that conflict
with the \. 


Carsten Haese-2 wrote:
> 
> Alexnb wrote:
>> Okay, so as a response to all of you, I will be using the Entry() widget
>> in
>> Tkinter to get this path. and the repr() function just makes all my
>> backslashes 4 instead of just 1, and it still screwes it up with the
>> numbers
>> and parenthesis is has been since the first post. Oh and I know all about
>> escape characters, (\n,\b,\a,etc.) I can program C, not a lot, but enough
>> to
>> know that I like python better. Anyway, so far I tried all of your stuff,
>> and it didn't work. infact, it puts backslashes in front of the "'" in
>> some
>> of the words, such as "I'm" goes to "I\'m." So I posted the code I will
>> be
>> using if you want to see the Tkinter code I can post it, but I don't see
>> how
>> it will help. 
> 
> Your reluctance to post your code puzzles me. Several people have asked 
> you several times to post your code. We're not doing this to waste your 
> time. In fact, your reluctance to post your code wastes your time and 
> our time by making us guess.
> 
> Seeing your code should enable us to see exactly what the problem is. 
> Your vague descriptions of what's going on are not useful because they 
> are filtered through your inaccurate understanding of what's going on. I 
> mean no offense by this, but if your understanding were accurate, you 
> wouldn't be here asking for help.
> 
> So, if you want us to help you, please humor us and post the actual code 
> that gets the filename from the user and attempts to open the file. Also 
> tell us what input you're entering and the output the code produces.
> 
> --
> Carsten Haese
> http://informixdb.sourceforge.net
> --
> http://mail.python.org/mailman/listinfo/python-list
> 
> 

-- 
View this message in context: http://www.nabble.com/problems-with-opening-files-due-to-file%27s-path-tp17759531p17786320.html
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list