467,077 Members | 1,028 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

csv.reader in abaqus PDE

Hello,

I am a beginner in both Python and Abaqus.

I am able to open a .csv file in python, but when running the same code in the Abaqus PDE, i get the error : IOError: (2, 'No such file or directory', 'DP780.csv')

I have the .csv file in the same location as the main file. Is this the correct location?

This is what I have been trying..
Expand|Select|Wrap|Line Numbers
  1. import csv 
  2.  
  3. raw_data = csv.reader(open('DP780.csv'))
Thanks,
Danny
Apr 10 '10 #1

✓ answered by bvdet

To see what the current directory is:
Expand|Select|Wrap|Line Numbers
  1. import os
  2. print os.getcwd()
If it's not the same as the directory containing the csv file, either set the current working directory of use the full or relative path to the csv file.

  • viewed: 3903
Share:
1 Reply
bvdet
Expert Mod 2GB
To see what the current directory is:
Expand|Select|Wrap|Line Numbers
  1. import os
  2. print os.getcwd()
If it's not the same as the directory containing the csv file, either set the current working directory of use the full or relative path to the csv file.
Apr 10 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Stephan | last post: by
8 posts views Thread by Todd Bright | last post: by
1 post views Thread by Anand | last post: by
1 post views Thread by Aaron | last post: by
12 posts views Thread by Jerry Camel | last post: by
6 posts views Thread by Karl Seguin [MVP] | last post: by
6 posts views Thread by dgleeson3@eircom.net | last post: by
reply views Thread by =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.