cat primes.txt SyntaxError: invalid syntax
Title
Question
In [2]: %pylab
Using matplotlib backend: TkAgg
Populating the interactive namespace from numpy and matplotlib
In [3]: cat primes.txt
File "<ipython-input-3-b296f9e207f4>", line 1
cat primes.txt
^
SyntaxError: invalid syntax
In [4]: !type primes.txt
The system cannot find the file specified.
Can you please help.
Using matplotlib backend: TkAgg
Populating the interactive namespace from numpy and matplotlib
In [3]: cat primes.txt
File "<ipython-input-3-b296f9e207f4>", line 1
cat primes.txt
^
SyntaxError: invalid syntax
In [4]: !type primes.txt
The system cannot find the file specified.
Can you please help.
Python-3.4.3 Loading-Data-From-Files 01-02 min 20-30 sec
Answers:
the cat command is used in Linux and macOS. For windows use !type primes.txt.
Make sure the file primes.txt is located in the current working directory. To check the current working directory type %pwd inside IPython terminal.
Download the files prime.txt and pendulum.txt from the resources below the video section.
Extract the file if it is a zip file.
Then copy all the downloaded and extracted(if any) into the current working directory.
To check the current working directory type %pwd inside ipython terminal.
<span style="background-color: rgb(250, 250, 250);">The system cannot find the file specified. </span>
<span style="background-color: rgb(250, 250, 250);">The system cannot find the file specified.</span>
Login to add comment