saving . . . saved cat primes.txt SyntaxError: invalid syntax has been deleted. cat primes.txt SyntaxError: invalid syntax has been hidden .
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.

Python-3.4.3 Loading-Data-From-Files 01-02 min 20-30 sec 26-04-20, 3:58 p.m. digambargunjal28@gmail.com

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.
27-04-20, 9:42 a.m. aditya94palaparthy@gmail.com
I checked the path and at that location I did not find this file. What would be next step if both primes and pendulum files are not present at the respective location. How these files can be created?
27-04-20, 8:12 p.m. digambargunjal28@gmail.com
<span style="background-color: rgb(250, 250, 250);">In [4]: !type primes.txt</span>
<span style="background-color: rgb(250, 250, 250);">The system cannot find the file specified. </span>
08-06-21, 2:04 p.m. aman1999
<span style="background-color: rgb(250, 250, 250);">In [4]: !type primes.txt</span>
<span style="background-color: rgb(250, 250, 250);">The system cannot find the file specified.</span>
08-06-21, 2:05 p.m. aman1999

Login to add comment


27-04-20, 8:11 p.m. digambargunjal28@gmail.com


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.
27-04-20, 9:06 p.m. aditya94palaparthy@gmail.com
Thank you
27-04-20, 10:23 p.m. digambargunjal28@gmail.com

Login to add comment


Log-in to answer to this question.