[SciPy-user] Windows - Symbols Character

Aaron Williams aaron_lamont_w at yahoo.com
Thu Aug 12 23:52:47 CDT 2004


My question is about python' s character assinments in a Windows 2000. I am in the process of automating oneof my programs, but because I am using Windows I am having a problem with the backslash character. Here is an example:
#############################################################
from scipy import *
io.array_import
#open Fortran Binary array
i = 1001
imax = 1142
U = '\O256a'
j = imax + 1
while i < j:
    c = str(i)
    a = U + c
    FilePath = 'D:\FFTstuff\netcdf\Newdata\O256a' + U + c + '.bin'
    fid=io.fopen(FilePath,'r')
________________________________________

Traceback (most recent call last):
  File "D:\FFTstuff\netcdf\Newdata2\O256a\FFT_converter256O.py", line 21,
in ?
    fid=io.fopen(FilePath,'r')
  File "D:\PROGRA~1\PYTHON2.3\Lib\site-packages\scipy\io\mio.py", line 91,
in __init__
    self.__dict__['fid'] = open(file_name,permission)
IOError: [Errno 2] No such file or directory:
'D:\\FFTstuff\netcdf\\Newdata2\\O256a\\O256a1001.bin'
###################################################################
The file does exist I just need to get rid of the extra backslashes. Do
you have any suggestions on how to fix this problem.

		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scipy.net/pipermail/scipy-user/attachments/20040812/35c08984/attachment.htm


More information about the SciPy-user mailing list