Re: [Tutor] Need some info

2010-04-21 Thread Alan Gauld
"Marco Rompré" wrote Hi! in my programming course at university, I need to create a python model with 2 concepts in a one towards many relation each of them having 2-3 properties. Are you allowed to use a relational database as part of the solution? That would simplify things because manag

[Tutor] Changing Default Install Path on Windows

2010-04-21 Thread Luke Paireepinart
Hi guys, my first post to the list with a question rather than a response in a few years, I think :) (NOTE: I solved my question while writing this e-mail, I'm just mailing this to the list for future users now) I'm running Windows 7 64-bit. I currently have 3 python installs. First I installed

Re: [Tutor] the binary math "wall"

2010-04-21 Thread spir ☣
On Tue, 20 Apr 2010 19:11:24 -0700 (PDT) Lowell Tackett wrote: > > >>> round(18.15*100) == 1815 > > True > > Interestingly, this is the [above] result when I tried entered the same > snippet: > > Python 2.5.1 (r251:54863, Oct 14 2007, 12:51:35) > [GCC 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)]

Re: [Tutor] the binary math "wall"

2010-04-21 Thread Dave Angel
Lowell Tackett wrote: --- On Tue, 4/20/10, Steven D'Aprano wrote: From: Steven D'Aprano The simplest, roughest way to fix these sorts of problems (at the risk of creating *other* problems!) is to hit them with a hammer: round(18.15*100) == 1815 True In

[Tutor] classes passing information

2010-04-21 Thread Stefan Lesicnik
Hi Guys, I'm slowly starting to understand classes coming from basic non oo scripting. I guess the problem comes in that you think you understand, and then look at code and its totally different and confusing. My question is maybe more generic with functions as opposed to classes, but i've be

Re: [Tutor] Python Examples of processing MS Outlook

2010-04-21 Thread Emile van Sebille
On 4/16/2010 2:13 AM Peter Meagher said... Does anyone have references to simple MS Outlook 2007 processing code that I could vulture for my purposes? (The code that I adapted was from an old Office 2000 vba text, so the version 2007 may not be that essential to my purposes) You may what to di

Re: [Tutor] the binary math "wall"

2010-04-21 Thread Lowell Tackett
>From the virtual desk of Lowell Tackett --- On Wed, 4/21/10, Dave Angel wrote: > From: Dave Angel > Subject: Re: [Tutor] the binary math "wall" > To: "Lowell Tackett" > Cc: tutor@python.org, "Steven D'Aprano" > Date: Wednesday, April 21, 2010, 6:46 AM > > > Lowell Tackett wrote: > > -

Re: [Tutor] the binary math "wall"

2010-04-21 Thread Emile van Sebille
On 4/21/2010 8:37 AM Lowell Tackett said... So, I am setting my self very high standards of accuracy, simply because those are the standards imposed by the project I am adapting, and I can require nothing less of my finished project. Then keep the source data in tenths (or 100ths or 1000ths) a

[Tutor] set and sets.Set

2010-04-21 Thread Bala subramanian
Friends, Someone please write me the difference between creating set with set() and a sets.Set(). >>> a=set([1,2,3]) >>> b=sets.Set([1,2,3]) >>> print a set([1, 2, 3]) >>> print b Set([1, 2, 3]) Thanks, Bala ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] the binary math "wall"

2010-04-21 Thread Dave Angel
Lowell Tackett wrote: From the virtual desk of Lowell Tackett --- On Wed, 4/21/10, Dave Angel wrote: From: Dave Angel Subject: Re: [Tutor] the binary math "wall" To: "Lowell Tackett" Cc: tutor@python.org, "Steven D'Aprano" Date: Wednesday, April 21, 2010, 6:46 AM Lowell Tackett wr

Re: [Tutor] set and sets.Set

2010-04-21 Thread bob gailer
On 4/21/2010 12:28 PM, Bala subramanian wrote: Friends, Someone please write me the difference between creating set with set() and a sets.Set(). When sets were introduced to Python in version 2.3. they came as a separate "sets" module. In version 2.6 built-in set/frozenset types replaced th

Re: [Tutor] the binary math "wall"

2010-04-21 Thread Lowell Tackett
>From the virtual desk of Lowell Tackett --- On Wed, 4/21/10, Dave Angel wrote: > From: Dave Angel > Subject: Re: [Tutor] the binary math "wall" > To: "Lowell Tackett" > Cc: tutor@python.org, "Steven D'Aprano" > Date: Wednesday, April 21, 2010, 12:31 PM > Lowell Tackett wrote: > > From t

Re: [Tutor] classes passing information

2010-04-21 Thread Alan Gauld
"Stefan Lesicnik" wrote Caveat: I know zilch about pyGtk. My question is maybe more generic with functions as opposed to classes, but i've been trying some pyGtk and I am unsure how i get values back from other classes. They should be returned by the methods. So you just assign the method r

Re: [Tutor] the binary math "wall"

2010-04-21 Thread Ricardo Aráoz
Lowell Tackett wrote: > >From the virtual desk of Lowell Tackett > > > > --- On Wed, 4/21/10, Dave Angel wrote: > > >> From: Dave Angel >> Subject: Re: [Tutor] the binary math "wall" >> To: "Lowell Tackett" >> Cc: tutor@python.org, "Steven D'Aprano" >> Date: Wednesday, April 21, 2010, 12:3

Re: [Tutor] set and sets.Set

2010-04-21 Thread wesley chun
> When sets were introduced to Python in version 2.3. they came as a separate > "sets" module. > > In version 2.6 built-in set/frozenset types replaced this module. 2.4 > So either way is OK for now, but the sets module might go away in a newer > version. agreed cheers, -- wesley - - - - - -

Re: [Tutor] Remote access from Windows PC to a Linux box

2010-04-21 Thread Mike Baker
Thanks Tim, Your subprocess examples got me started in the right direction. I've moved on to a slightly more advanced problem that I need help with. I want to remotely start a Tshark packet capture session on one of our Linux machines in the lab. I want to start the session from my Windows mach

Re: [Tutor] Remote access from Windows PC to a Linux box

2010-04-21 Thread Yashwin Kanchan
Hi Mike have you tried running the tshark process in the background... *CMD_LIST=[PLINK,sess_name,'/usr/bin/sudo /usr/sbin/tshark &', '-a', 'duration:10', '-i', 'wlan0', '-T', 'text', '-V','>', 'out.txt'];* Or if you are using NOHUP try redirecting this way... *CMD_LIST=[PLINK,sess_name,'/usr/b

Re: [Tutor] Remote access from Windows PC to a Linux box

2010-04-21 Thread Mike Baker
Yashwin, Thanks! Your nohup redirection worked great! - Mike On Wed, Apr 21, 2010 at 2:45 PM, Yashwin Kanchan wrote: > Hi Mike > > have you tried running the tshark process in the background... > > *CMD_LIST=[PLINK,sess_name,'/usr/bin/sudo /usr/sbin/tshark &', '-a', > 'duration:10', '-i', 'w

Re: [Tutor] set and sets.Set

2010-04-21 Thread Steven D'Aprano
On Thu, 22 Apr 2010 02:28:03 am Bala subramanian wrote: > Friends, > Someone please write me the difference between creating set with > set() and a sets.Set(). The sets module, including sets.Set(), were first introduced in Python 2.3 and is written in Python. The built-in set object was introdu

Re: [Tutor] the binary math "wall"

2010-04-21 Thread Steven D'Aprano
On Thu, 22 Apr 2010 01:37:35 am Lowell Tackett wrote: > Recalling (from a brief foray into college Chem.) that a result could > not be displayed with precision greater than the least precise > component that bore [the result]. So, yes, I could accept my input > as the arbitrator of accuracy. Unf

[Tutor] Fwd: python tutor needed

2010-04-21 Thread Danny Yoo
Forwarding for Lumka: -- Forwarded message -- From: Lumka Msibi Date: Tue, Apr 20, 2010 at 2:51 PM Subject: Fwd: python tutor needed To: Danny Yoo , "dany.yoo" This communication is intended for the addressee only. It is confidential. If you have received this communication in

Re: [Tutor] the binary math "wall"

2010-04-21 Thread Dave Angel
Steven D'Aprano wrote: On Thu, 22 Apr 2010 01:37:35 am Lowell Tackett wrote: Were I to accumulate many of these "legs" into perhaps a 15 mile traverse-accumulating little computer errors along the way-the end result could be catastrophically wrong. YES!!! And just by being aware of th