Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Locate File with No Capital in Name #49150

Closed
markpennock mannequin opened this issue Jan 9, 2009 · 3 comments
Closed

Can't Locate File with No Capital in Name #49150

markpennock mannequin opened this issue Jan 9, 2009 · 3 comments

Comments

@markpennock
Copy link
Mannequin

markpennock mannequin commented Jan 9, 2009

BPO 4900

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2009-01-09.17:40:06.798>
created_at = <Date 2009-01-09.17:05:16.480>
labels = ['invalid']
title = "Can't Locate File with No Capital in Name"
updated_at = <Date 2009-01-09.17:40:06.797>
user = 'https://bugs.python.org/markpennock'

bugs.python.org fields:

activity = <Date 2009-01-09.17:40:06.797>
actor = 'benjamin.peterson'
assignee = 'none'
closed = True
closed_date = <Date 2009-01-09.17:40:06.798>
closer = 'benjamin.peterson'
components = ['None']
creation = <Date 2009-01-09.17:05:16.480>
creator = 'markpennock'
dependencies = []
files = []
hgrepos = []
issue_num = 4900
keywords = []
message_count = 3.0
messages = ['79478', '79479', '79480']
nosy_count = 2.0
nosy_names = ['eckhardt', 'markpennock']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue4900'
versions = ['Python 2.5']

@markpennock
Copy link
Mannequin Author

markpennock mannequin commented Jan 9, 2009

error reading files in python 2.5

reports files don't exist under certain conditions

*Doesn't Work Code*
f = open("D:\test.html", "r").read()

*Does Work Code*
(Change file name and retry)

f = open("D:\Test.html", "r").read()

*Comments*
i tried different file types and names all of which made no difference.
When I copied the file (Windows XP) of the file it automatically adds
"Copy of" to the name. I then narrowed it down to the Capital letter in
the name.

@eckhardt
Copy link
Mannequin

eckhardt mannequin commented Jan 9, 2009

"\t" is a tab while "\T" is (I think) just an ugly equivalent to "T".
Use either of

r"D:\test.html"
"D:\\test.html"

Please check if that is the reason for your failure.

@markpennock
Copy link
Mannequin Author

markpennock mannequin commented Jan 9, 2009

Your right! Thanks a lot, I am obviously a newbie.....

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant