#๐Ÿ”’ Trying to open a file ...

13 messages ยท Page 1 of 1 (latest)

crystal fractal
#

Hello, I'm getting some troubles with opening the 'words' (unix) file, can someone help me please ?

more about the file : https://en.wikipedia.org/wiki/Words_(Unix)#

(I copied and pasted~ the file's words in a new file I created because I couldn't find the original one)

words is a standard file on Unix and Unix-like operating systems, and is simply a newline-delimited list of dictionary words. It is used, for instance, by spell-checking programs.
The words file is usually stored in /usr/share/dict/words or /usr/dict/words.
On Debian and Ubuntu, the words file is provided by the wordlist package, or its provider...

solid basaltBOT
#

@crystal fractal

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

knotty kiln
#

Your issue is how you're writing the path - each \U<something> is interpreted, here, as an escape sequence. Your choices are:

  • use / slashes instead of \ ones
  • write each slash as \\
  • use a rawstring, e.g. r'C:\Users\...'
crystal fractal
#

I writed it all the same no ?

#

okay I'll try

fallow raft
#

technically only the backslash before Users needs modified, but it does look better if you modify all of them

crystal fractal
#

okay thanks I guess it worked, it was a dumb question

#

now I need to learn more about file manipulation

#

thanks

#

!close

solid basaltBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.