Re: [Tutor] passwords in scripts

2006-01-21 Thread Danny Yoo
> > I've written a couple of scripts that check log files on our WIndows > > and Unix servers. These scripts have plain text passwords in them, so > > anyone who can access the filesystem of the Windows server that runs > > the scripts can discover the passwords of the servers. Hello, I guess o

Re: [Tutor] passwords in scripts

2006-01-21 Thread Ivan Furone
2006/1/21, Ben Vinger <[EMAIL PROTECTED]>: > Hello > > I've written a couple of scripts that check log files > on our WIndows and Unix servers. These scripts have > plain text passwords in them, so anyone who can access > the filesystem of the Windows server that runs the > scripts can discover th

Re: [Tutor] [Re] Fwd: Strings backwards

2006-01-21 Thread Victor Bouffier
On Thu, 2006-01-19 at 16:49 -0500, Orri Ganel wrote: > Victor Bouffier wrote: > > >I had to do the string-to-list-then-reverse-string-then-back-to-string > >process myself before knowing about this marvelous operand. > >It works on tuples (all immutable objects) too: > > > [SNIP] > > Not all immu

Re: [Tutor] Starbucks does not use two-phase commit

2006-01-21 Thread Todd Maynard
Danny, I want to thank you for ruining my plans for a relaxing Saturday morning. As a thread newbie I killed several hours playing around with your code. One thing I noticed is that sometimes the program would hang, which I figured was the Queue code blocking in the Ticket claim function. I us

Re: [Tutor] Is this overkill?

2006-01-21 Thread Python
On Sat, 2006-01-21 at 10:09 -0500, Bradly McConnell wrote: > On 1/21/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > > number = input("Please enter a number: ") > > while number != 100: > > additional_number = input("Please enter an additional number: ") > > if additional_number + number > 100:

[Tutor] passwords in scripts

2006-01-21 Thread Ben Vinger
Hello I've written a couple of scripts that check log files on our WIndows and Unix servers. These scripts have plain text passwords in them, so anyone who can access the filesystem of the Windows server that runs the scripts can discover the passwords of the servers. Is there a way to hide/encry

Re: [Tutor] a class knowing its self

2006-01-21 Thread Ben Vinger
Yes, you are right, - Shuying Wang's suggestion fixed the immediate problem, but there is still someting wrong with my code - maybe I'll ask about it again later. --- Ewald Ertl <[EMAIL PROTECTED]> wrote: > > > Have a more precisely look at your code. > s.getName() does just return, what you h

Re: [Tutor] Is this overkill?

2006-01-21 Thread Bradly McConnell
On 1/21/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > number = input("Please enter a number: ") > while number != 100: > additional_number = input("Please enter an additional number: ") > if additional_number + number > 100: > lower_number = input("please enter a lower number: ") > >

Re: [Tutor] unittest and private methods

2006-01-21 Thread Kent Johnson
lemeia wrote: > kent wrote: >>Rereading your mail another possibility comes to mind. It sounds like >>extractTo() is a general-purpose function that is used for a specific >>purpose by the module you are testing. Why not extract extractTo to a >>utility module? Then you can test it as much as yo

Re: [Tutor] unittest and private methods

2006-01-21 Thread Alan Gauld
> I'm really enjoying Python. I don't like the "sentence structure" quite > as much as Smalltalk (ie I like anObject actOn: a untilYouSee: b), Have you looked at Objective C? It uses Smalltalk style messaging, but in a C language framework. > I find it much faster to do things in Python even ov

Re: [Tutor] Is this overkill?

2006-01-21 Thread Alan Gauld
number = input("Please enter a number: ") while number != 100: additional_number = input("Please enter an additional number: ") if additional_number + number > 100: lower_number = input("please enter a lower number: ") you can just 'continue' here since the while loop asks for a

Re: [Tutor] Doubt with classes

2006-01-21 Thread Alan Gauld
swaroop = Person('Swaroop') swaroop.sayHi() swaroop.howMany() kalam = Person('Abdul Kalam') kalam.sayHi() kalam.howMany() swaroop.sayHi() swaroop.howMany() # MY OUTPUT (Initializing Swaroop) Hi, my name is Swaroop. I am the only person here. (Initializing Abdul K