[Tutor] Program gets stuck after a creating a list from dictinary items!
Ali Torkamani
torkamani at gmail.com
Fri Jul 6 23:16:46 CEST 2012
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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120706/9f736fa8/attachment.html>
More information about the Tutor
mailing list