[Tutor] Program gets stuck after a creating a list from dictinary items!

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Jul 7 00:09:46 CEST 2012


Please stop top posting, you have been asked at least once before, no 
further comments, TIA.

On 06/07/2012 22:16, Ali Torkamani wrote:
> Actually printing some thing after that line does not show any thing, I
> have the pdb.set_trace()'s for debugging, to see what's going on inside. ho
> would you debug that?
>
> On Fri, Jul 6, 2012 at 3:57 PM, Alan Gauld <alan.gauld at btinternet.com>wrote:
>
>> On 06/07/12 18:21, Ali Torkamani wrote:
>>
>>> I'm using Python 2.7.
>>> By stuck I mean, does not pass that specific line (but no errors).
>>>
>>>
>> How do you know that is the line it is stuck on?
>>
>>
>> def WriteOneDayToCSV(**sCommonFeatures,**sOtherFeatures,date):
>>      FD=FlatData[date]
>>
>> A=['UniqeDate','Year','Month',**'Day']+list(sCommonFeatures)+**
>> list(sOtherFeatures)
>>      pdb.set_trace()
>>      with open(str(date.year)+"_"+str(**date.month)+"_"+str(date.day)+**".csv",'wb')
>> as myfile:
>>          fout = csv.writer(myfile, delimiter=',', quotechar="'")
>>
>>          fout.writerow(A)
>>          for prog in FD:
>>              D=[prog[key1] for key1 in sCommonFeatures]
>>
>> How do you know its not one of the lines above?
>>
>> Also what are you using the pdb traces for?
>> Do they show any output?
>>
>> --
>> Alan G
>> Author of the Learn to Program web site
>> http://www.alan-g.me.uk/
>>
>>
>>
>>
>> ______________________________**_________________
>> Tutor maillist  -  Tutor at python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor>
>>
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>


-- 
Cheers.

Mark Lawrence.





More information about the Tutor mailing list