From: LASSAGNE C. <LAS...@mi...> - 2005-07-04 07:49:05
|
I think the next code is okay fsrc =3D open('c:/demo/file/SRC_FILE.txt', 'r') try: for lsrc in fsrc.readlines(): ... finally: fsrc.close() -----Message d'origine----- De : jyt...@li... [mailto:jyt...@li...]De la part de tudza Envoy=E9 : samedi 2 juillet 2005 03:01 =C0 : jyt...@li... Objet : [Jython-users] I'm not sure how to interpret this Jython response I have a perfectly good Python program I wanted to try and run under = Jython, since I haven't used Jython before, and it immediately gives me = trouble. Now it may be a problem that I'm using the Jython plugin for jEdit and = adding an extra layer, but I have no idea where to start looking for the = source of this problem. Basically, I have this these two lines to open a file and go through = the lines in that file: inputFile=3Dopen('C:\\Documents and = Settings\\Administrator\\Desktop\\Oligo_List.csv','r') for line in inputFile: and the error I get back in the Jython window is: Traceback (innermost last): File "C:\Python24\SwapNs.py", line 24, in ? AttributeError: __getitem__ line 24 is of course the line "for line in inputFile:" I know this is not saying that inputFile cannot be found, I already = fixed that issue, so what is this telling me? ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. = http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |