manipulating files within 'for'

Ben Keshet keshet1 at umbc.edu
Fri Sep 12 19:53:58 CEST 2008


Emile van Sebille wrote:
> Ben Keshet wrote:
>> Hi Pythoneers,
>>
>> I have a question about a code I wrote with the help of someone. The 
>> code below copy a few lines from different files into one file. It 
>> works fine as it is given here and generates the new file 
>> 'pockets.out' correctly, but says:"....py returned exit code 0". 
>> However, if I add more values to 'receptor' (say, receptor = ['1AZM' 
>> '1ADS']) 
>
>
> At risk of stating the obvious, you _did_ put this in properly as
>
> receptors = ['1AZM', '1ADS']
>
> ...right?
>
> Emile
...wrong.  I thought I should omit the comma and didn't put it.  I guess 
that stating the obvious should be the first attempt with beginners like 
me.  Thanks for thinking about it (it's running perfect now). 

BK

>
>
>
> it gives an
>> error: "Exception raised while running script".
>>
>> Can anyone please advice me? Why is it giving an error on multiple x 
>> but runs well with one (I made sure that all files and folders exist, 
>> etc.). What does exit code 0 mean?
>
> No error
>
>> what does "exception raised" mean?
>
> Error
>
> -- 
> http://mail.python.org/mailman/listinfo/python-list
>




More information about the Python-list mailing list