-2

I'm new here and in python. There are 2 questions I'd like to ask: 1) I'm reading a .dat file on my desktop into my spider, but it shows

No such file or directory: 'C:\Desktop\movies.dat'

but if I put the file into the default folder, 'C:\\Users\\User\\.spyder-py3\\movies.dat', it can read the file successfully. I thought that python3 can file the path in the quotes no matter if it is a default folder or not. 2) I've been reading some python books and at every beginning of each book, there is a chapter introducing Ipython and Jupyter or something like that, I don't quite understand what's the difference between, like, Anaconda, Spider, Jupyter notebook and Ipython. I'm currently using Spider and wondering what's the difference.

Great thanks if anyone can help!

MLavoie
  • 9,671
  • 41
  • 36
  • 56
Rick
  • 1

1 Answers1

0

in my first view you can't read the 'C:\Desktop\movies.dat' because the path it's no complete ? Or try something like this

from pathlib import Path

data_folder = Path("C:\Desktop")
file_to_open = data_folder / "movies.dat"

f = open(file_to_open)
print(f.read())

For the second question, Ancaconda, Jupyter and Spider are python frameworks you can read more about them at What is the difference between spyder and jupyter

Yaroslav Kolodiy
  • 121
  • 1
  • 2
  • 8