user1161365
user1161365

Reputation: 11

Incorrect Module being imported

I accidentally created a file in my directory called csv.py

It keeps pulling in the csv.py whenever I try to import the native csv module to open and write to CSV.

How do I restore it so that I can use the native CSV module?

I'm running Python 2.6.6.

Upvotes: 1

Views: 99

Answers (2)

John Machin
John Machin

Reputation: 82992

delete csv.pycif it exists
delete or rename csv.py

Upvotes: 0

jcollado
jcollado

Reputation: 40414

If you don't need it anymore, you can just remove it together with the .pyc file or rename it to a more appropriate name.

Upvotes: 4

Related Questions