[Tutor] Sets in python

2007-01-21 Thread anil maran
http://www.linuxforums.org/programming/introduction_to_python__part_1.html Sets I think I don't really have to explain what a set is, as everyone should know them from mathematics. It's simply a pile of elements that do not have ordering and do not contain duplicates. A set has to be initializ

Re: [Tutor] Sets in python

2007-01-21 Thread Luke Paireepinart
anil maran wrote: > http://www.linuxforums.org/programming/introduction_to_python__part_1.html > > [snip article excerpt] why did you copy someone else's text verbatim and create a new thread? Assuming you were trying to

Re: [Tutor] 'elp!!!!!!!1Totally Clueless Newbie In Distress

2007-01-21 Thread János Juhász
Dear Karl, I use getch() when I start my script from the windows desktop and I am interested about its output. import msvcrt raw_input('Are you distressed ?\n') print ('It will be better, I am sure :)') msvcrt.getch() # append as last line > Subject: Re: [Tutor] 'elp!!!1Totally Clueless Ne

Re: [Tutor] Set changing order of items?

2007-01-21 Thread Adam Cripps
On 1/20/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > Adam Cripps wrote: > > Many thanks all - I've got there in the end, using a tuple inside a > > set, ditching the question number and then rendering the sum for > > output in my main gui module. > > > > However, this does raise another issue now

Re: [Tutor] 'elp!!!!!!!1Totally Clueless Newbie In Distress

2007-01-21 Thread Luke Paireepinart
János Juhász wrote: > Dear Karl, > > > I use getch() when I start my script from the windows desktop and > I am interested about its output. > > import msvcrt > raw_input('Are you distressed ?\n') > print ('It will be better, I am sure :)') > msvcrt.getch() # append as last line And where is the i

[Tutor] search a tuple of tuples

2007-01-21 Thread johnf
Hi, I want to find a item within a large tuple that contains tuples. mytuple = (('name',123,'value'),('first',345,'newvalue')) so a 'for loop' works istrue = False for i in range(len(mytuple)): if 'first' in mytuple[i]: istrue = True break if istrue: print " true" Is possible to us

[Tutor] Arabic text in Python

2007-01-21 Thread Emad Nawfal
Dear Folks, I'm new to Python and programming in general. I'm interested in using Python for text processing, but whenever I enter Arabic text, it says the text is not supported. How can I use Python for dealing with Arabic? Thank you -- If everyone is thinking alike, then somebody isn't thinking

Re: [Tutor] 'elp!!!!!!!1Totally Clueless Newbie In Distress

2007-01-21 Thread jim stockford
no need for apology on my side. there's no agreed-upon and expressed policy. i like the model that we accept each other as we are. On Jan 20, 2007, at 7:10 AM, Karl Wittgenstein wrote: > Sorry for the swear words... > > 2007/1/20, Kent Johnson <[EMAIL PROTECTED]>: Karl Wittgenstein w

Re: [Tutor] search a tuple of tuples

2007-01-21 Thread Kent Johnson
johnf wrote: > Hi, > I want to find a item within a large tuple that contains tuples. > mytuple = (('name',123,'value'),('first',345,'newvalue')) > so a 'for loop' works > istrue = False > for i in range(len(mytuple)): > if 'first' in mytuple[i]: This is better written as iteration over mytuple

Re: [Tutor] Arabic text in Python

2007-01-21 Thread Kent Johnson
Emad Nawfal wrote: > Dear Folks, > I'm new to Python and programming in general. I'm interested in using > Python for text processing, but whenever I enter Arabic text, it says > the text is not supported. > How can I use Python for dealing with Arabic? What platform? GUI or command line input?

Re: [Tutor] 'elp!!!!!!!1Totally Clueless Newbie In Distress

2007-01-21 Thread Danny Yoo
On Sun, 21 Jan 2007, jim stockford wrote: >no need for apology on my side. there's >no agreed-upon and expressed policy. >i like the model that we accept each > other as we are. [meta; not really related to Python programming] Hi Jim, I did want to bring up that there are some com

Re: [Tutor] search a tuple of tuples

2007-01-21 Thread johnf
On Sunday 21 January 2007 10:30, you wrote: > johnf wrote: > > Hi, > > I want to find a item within a large tuple that contains tuples. > > mytuple = (('name',123,'value'),('first',345,'newvalue')) > > so a 'for loop' works > > istrue = False > > for i in range(len(mytuple)): > > if 'first' in my

[Tutor] pyw bug ?

2007-01-21 Thread Dave S
Hi all, My GUI app dumps some diagnostic output to the terminal, starting it from an XP terminal, all is well. Starting it as app.pyw so no terminal is needed - and err - the app randomly locks because the diagnostic output is - backing up ? Remove diagnostic output & app.pyw is 100% reliable.

[Tutor] direction and draw

2007-01-21 Thread linda.s
I have a segment (two ending points are A and B) which is 0 degree. How to draw a segment with 10 degrees and 15 in length? Thanks, Linda ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor