Re: [Tutor] Menus with dictionaries or lists?

2008-04-28 Thread Arthur
http://www.amk.ca/python/howto/curses/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Menus with dictionaries or lists?

2008-04-28 Thread Arthur
#!/usr/bin/python # import csv file = csv.reader(open("file.txt", "r"),delimiter=';') for row in file: # now each row is a list #print row #print row[0] cntry=row[0] row[0]={} row[0]['country']=row[1] row[0]['county']=row[2] print 'for country',cntry, row[0] this is simple enough i guess

Re: [Tutor] Python Best Practice/Style Guide question

2008-04-29 Thread Arthur
i like to write variable the kamelWay (i learned it from some javascript book some time ago) but i never use spaces even in between : variableName=variableValue. i guess i like compact code with fewer lines ... always thought shorter programs run faster... & it also makes you feel that your way it

Re: [Tutor] Method question?

2008-05-02 Thread Arthur
i had tough time understanding classes ... hope this helps : http://www2.lib.uchicago.edu/keith/courses/python/class/5/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Starting a .py file from Idle

2008-05-02 Thread Arthur
i guess : START > RUN then type : python your_script.py arg_1 arg_2 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Starting a .py file from Idle

2008-05-02 Thread Arthur
> On Fri, May 2, 2008 at 7:11 PM, Mihai Iacob <[EMAIL PROTECTED]> wrote: > Hello, > > Can anyone tell me how to start a program directly > from the interpreter (i'm using IDLE). Usually i open > a new window , write the lines of code and press F5 to > run the program in the interpreter. > The pro

[Tutor] Walking a directory

2005-01-17 Thread Arthur Wiebe
What I want to do is rather simple, but I cannot find any good documentation for something like this. The directory structure is sort of like this: >Aircraft >>A-10 +A-10cl-set.xml +A-10fg-set.xml For example Aircraft/A-10/A-10cl-set.xml Now I want to loop though each aircrafts folder (such as A

[Tutor] C API Tutorial Class Question

2007-05-03 Thread Arthur Coleman
...failed updating 1 target... ...skipped 3 targets... I reviewed the definition of class_ in file def_visitor.hpp and found that it was defined as: template class class_; I have tried searching the FAQ and the Web and so far no luck. I would appreciate any help. Arthur ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to test for a remainder from division

2007-05-14 Thread Arthur Coleman
Hi, I believe it should be if !(year % 4) or !(year % 100) or !(year % 400) Since 4*n % 4 = 0 for n integer Arthur -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Luke Paireepinart Sent: Monday, May 14, 2007 2:32 PM To: Matt Smith Cc: Python Tutor

[Tutor] python simplejson decoding

2011-03-02 Thread Arthur Mc Coy
Hi all, I'm trying an example (in attached file). First, I create a list of 3 objects. Then I do: PutJSONObjects(objects) objects = GetJSONObjects() PutJSONObjects(objects, "objects2.json") 1) PutJSONObjects(objects) method creates objects.json file (by default). It works fine. 2) Then obje

[Tutor] c++ data types in python script

2011-03-06 Thread Arthur Mc Coy
ot what I need What I'm trying to stress is that c++ objects should be converted (serialized) before putting them into json. Otherwise type errors occur and process fails. I love learning python and hope somebody may suggest me or tell something. Thank you all anyway! Arthur _

Re: [Tutor] c++ data types in python script

2011-03-06 Thread Arthur Mc Coy
Thank you, sorry for duplicating. I hope moderators can delete it if needed. Wish you well, Arthur On Sun, Mar 6, 2011 at 11:18 AM, Stefan Behnel wrote: > Arthur Mc Coy, 06.03.2011 09:56: > > I've used SWIG module to embed python inside c++ app. >> > > Given that t