[Tutor] FAQ [Was Re: Python Book Recommendations [Was:....]]

2007-08-14 Thread Tim Michelsen
Hello, is there a FAQ for this list where we could put all these recommendations? Thanks, Timmie ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Michael Sparks
Tiger12506, You are COMPLETELY missing the point. The __following__ code > >> > foo = raw_input(...) > >> > x = eval(foo) ONLY works if the user has console access to the machine. If they have console access to the machine AND you're worried about them damaging it THEN an eval(raw_input( ...)

[Tutor] Graphing the random.gauss distribution

2007-08-14 Thread Dick Moores
Kent Johnson posted this to Tutor list Aug 8, 2007 (): > Python provides you with a pseudo random number generator whose output > values are uniformly distributed between the input param

Re: [Tutor] FAQ [Was Re: Python Book Recommendations [Was:....]]

2007-08-14 Thread Kent Johnson
Tim Michelsen wrote: > Hello, > is there a FAQ for this list Sort of: http://effbot.org/pyfaq/tutor-index.htm > where we could put all these recommendations? A better place is perhaps the Python wiki which is editable: http://wiki.python.org/moin/PythonBooks http://wiki.python.org/moin/Beginners

[Tutor] converting a source package into a dll/shared library?

2007-08-14 Thread Duncan Gibson
Is it possible to convert a Python package, with __init__.py and related python modules, into a single DLL or shared library that can be imported in the same way? We have used py2exe and cx_freeze to create a complete executable, but we are curious whether there is a middle way between this singl

Re: [Tutor] Graphing the random.gauss distribution

2007-08-14 Thread Kent Johnson
Dick Moores wrote: > Kent Johnson posted this to Tutor list Aug 8, 2007 > (): > > > > Python provides you with a pseudo random number generator whose output > > values are uniformly dist

Re: [Tutor] converting a source package into a dll/shared library?

2007-08-14 Thread Kent Johnson
Duncan Gibson wrote: > Is it possible to convert a Python package, with __init__.py and > related python modules, into a single DLL or shared library that can > be imported in the same way? > We have used py2exe and cx_freeze to create a complete executable, > but we are curious whether there is a

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Eric Brunson
Michael Sparks wrote: > Tiger12506, > > > You are COMPLETELY missing the point. The __following__ code > > > foo = raw_input(...) > x = eval(foo) > > > ONLY works if the user has console access to the machine. > > If they have console access to the machine > AND you're wo

Re: [Tutor] Python Book Recommendations [Was:[Re: Security]]

2007-08-14 Thread Robert H. Haener IV
wesley chun wrote: >> Another resource is the local used-book stores. $40-$50 programming >> books for $4-$5. They may have some highlighting or underlining, >> but that doesn't usually make the content suffer. Often they'll >> have the CD or floppy disk in the back cover. > > you can also check

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Eric Brunson
Michael Sparks wrote: > On Monday 13 August 2007 21:53, Kent Johnson wrote: > >> Hmm...could be a remote connection such as ssh, which precludes the >> sledgehammer though probably not the sort of mischief you can get into >> with eval()...perhaps there are untrusted remote connections where >>

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Eric Brunson
Michael Sparks wrote: > On Monday 13 August 2007 21:53, Kent Johnson wrote: > >> Hmm...could be a remote connection such as ssh, which precludes the >> sledgehammer though probably not the sort of mischief you can get into >> with eval()...perhaps there are untrusted remote connections where >>

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Alan Gauld
"Michael Sparks" <[EMAIL PROTECTED]> wrote > You are COMPLETELY missing the point. The __following__ code > >> >> > foo = raw_input(...) >> >> > x = eval(foo) > > ONLY works if the user has console access to the machine. Actually no. It applies to stdin which could be a console or a file. I

Re: [Tutor] converting a source package into a dll/shared library?

2007-08-14 Thread Alan Gauld
"Duncan Gibson" <[EMAIL PROTECTED]> wrote > Is it possible to convert a Python package, with __init__.py and > related python modules, into a single DLL or shared library that can > be imported in the same way? Since you refer to DLLs I'll assume a Windoze platform. If so the answer is yes you c

Re: [Tutor] FAQ [Was Re: Python Book Recommendations [Was:....]]

2007-08-14 Thread Alan Gauld
"Tim Michelsen" <[EMAIL PROTECTED]> wrote > is there a FAQ for this list where we could put all these > recommendations? Someone (Mike Hansen?) started one a while back, but like most such ventures the trick is in maintaining it! I'm not sure where it is or what the status is. Alan G _

Re: [Tutor] Graphing the random.gauss distribution

2007-08-14 Thread Dick Moores
At 06:47 AM 8/14/2007, Kent Johnson wrote: >Dick Moores wrote: > > Kent Johnson posted this to Tutor list Aug 8, 2007 > > (): > > > > > > > Python provides you with a pseudo random number g

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Luke Paireepinart
Eric Brunson wrote: > Michael Sparks wrote: > >> On Monday 13 August 2007 21:53, Kent Johnson wrote: >> >> >>> Hmm...could be a remote connection such as ssh, which precludes the >>> sledgehammer though probably not the sort of mischief you can get into >>> with eval()...perhaps there ar

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Eric Brunson
Luke Paireepinart wrote: > Eric Brunson wrote: >> Michael Sparks wrote: >> >>> On Monday 13 August 2007 21:53, Kent Johnson wrote: >>> Hmm...could be a remote connection such as ssh, which precludes the sledgehammer though probably not the sort of mischief you can get into wi

Re: [Tutor] Graphing the random.gauss distribution

2007-08-14 Thread Luke Paireepinart
>> This could be a list comprehension: >> d = [ [k, 0] for k in range(200) ] >> > > So you recommend using list comprehensions wherever possible? (I sure > wouldn't have thought of that one..) > No, of course not! "wherever possible" would include [foo(25) for x in range(300)] in order to

Re: [Tutor] Graphing the random.gauss distribution

2007-08-14 Thread Kent Johnson
Dick Moores wrote: > At 06:47 AM 8/14/2007, Kent Johnson wrote: >> This could be a list comprehension: >> d = [ [k, 0] for k in range(200) ] > > So you recommend using list comprehensions wherever possible? (I sure > wouldn't have thought of that one..) Not "whenever possible", no, but I find si

Re: [Tutor] Python Book Recommendations [Was:[Re: Security]]

2007-08-14 Thread wesley chun
On 8/14/07, Robert H. Haener IV <[EMAIL PROTECTED]> wrote: > When I was putting together my "To Buy" list of Python books, I came across > an online store with some great prices on new books. [...]; their address is: > http://www.bookpool.com > > [...] their 6 Month Rating on Reseller Ratings is

[Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Dick Moores
When sending a reply to a post, to the list, should we also address the reply to the author of the post to which we are replying? (There's gotta be an easier way to say that..) If we do so, then the author gets a duplicate of our reply. I've run some statistics (but no more bar graphs ;-) ). My

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Eric Brunson
Dick Moores wrote: > When sending a reply to a post, to the list, should we also address > the reply to the author of the post to which we are replying? > (There's gotta be an easier way to say that..) If we do so, then the > author gets a duplicate of our reply. > > I've run some statistics (bu

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Luke Paireepinart
Dick Moores wrote: > When sending a reply to a post, to the list, should we also address > the reply to the author of the post to which we are replying? > (There's gotta be an easier way to say that..) If we do so, then the > author gets a duplicate of our reply. > > I've run some statistics (bu

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Kent Johnson
Dick Moores wrote: > When sending a reply to a post, to the list, should we also address > the reply to the author of the post to which we are replying? > (There's gotta be an easier way to say that..) If we do so, then the > author gets a duplicate of our reply. This is configurable for each s

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Tom Fitzhenry
On Tue, Aug 14, 2007 at 11:06:05AM -0700, Dick Moores wrote: > Replying only to the list takes a bit of trouble. The default > behavior seems to be that the "Reply" button addresses the author > only and not the list; "Reply to all" addresses both the list, the > author, and any others included

Re: [Tutor] Graphing the random.gauss distribution

2007-08-14 Thread Dick Moores
At 10:28 AM 8/14/2007, you wrote: >Dick Moores wrote: > > At 06:47 AM 8/14/2007, Kent Johnson wrote: > >> This could be a list comprehension: > >> d = [ [k, 0] for k in range(200) ] > > > > So you recommend using list comprehensions wherever possible? (I sure > > wouldn't have thought of that one..

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Dick Moores
At 11:56 AM 8/14/2007, Kent Johnson wrote: >Dick Moores wrote: > > When sending a reply to a post, to the list, should we also address > > the reply to the author of the post to which we are replying? > > (There's gotta be an easier way to say that..) If we do so, then the > > author gets a duplica

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Michael Sparks
On Tuesday 14 August 2007 16:48, Eric Brunson wrote: ... > The only thing I can imagine is > that you're stuck in some DOS mindset that if you're able to type into > "the console" then you have ultimate access to the machine, which is not > the case when using a true multi-user operating system li

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Carroll, Barry
> Date: Tue, 14 Aug 2007 12:33:16 -0700 > From: Dick Moores <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Question re Tutor List Etiquette > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii"; format=flowed > > At 11:56 AM 8/14/2007, Kent Johnson wro

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Eric Brunson
Whatever. I make it a point to discontinue any debate that degenerates into someone quoting their work experience to me. At that point you've basically told me that you are convinced you know better than I do and nothing I say will convince you otherwise, because you've been doing this for s

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread William O'Higgins Witteman
On Tue, Aug 14, 2007 at 08:11:33PM +0100, Tom Fitzhenry wrote: >On Tue, Aug 14, 2007 at 11:06:05AM -0700, Dick Moores wrote: >> Replying only to the list takes a bit of trouble. The default >> behavior seems to be that the "Reply" button addresses the author >> only and not the list; "Reply to al

Re: [Tutor] Livewires - stuck on a class

2007-08-14 Thread Alan Gauld
"Tonu Mikk" <[EMAIL PROTECTED]> wrote > I create more robots in this way which seems to work: > class Robot: >pass By using an empty class you are losing m,uch of the power of classes. Try this: class Robot: def __init__(self, x, y, shape=None): self.x = x self.y = y

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Alan Gauld
"Michael Sparks" <[EMAIL PROTECTED]> wrote > Yes, there are a tiny set of scenarios where doing > eval(raw_input(...)) could > be a problem. The idea that its always a gaping security hole is > completely > bogus. The number of scenarios is not tiny but the likelihood of attack by that route i

Re: [Tutor] Livewires - stuck on a class

2007-08-14 Thread christopher . henk
[EMAIL PROTECTED] wrote: ->To: tutor@python.org>From: Tonu Mikk <[EMAIL PROTECTED]>>Sent by: [EMAIL PROTECTED]>Date: 08/14/2007 03:23PM>Subject: [Tutor] Livewires - stuck on a class>>I made some progress on the Livewires robots game - I got as far as>page >10 on the attached 5-robots.pdf file.

[Tutor] Python Book Recommendations

2007-08-14 Thread David Handel
If you can afford it, Safari Books online is a wonderful resource. http://www.safaribooksonline.com/ I am using the $39.95 month to month "all you can eat" deal. You have unlimited access online to 100's of books from many IT publishers. It is great to cross read about the same subjects from man

Re: [Tutor] Livewires - stuck on a class

2007-08-14 Thread Tonu Mikk
[EMAIL PROTECTED] wrote: > >Then I was hoping to repeat the sequence for moving the robots placed > >in > >the robots list by using this code: > >for x in robots: > ># code for moving the robots > > Glancing at your code to move the robots. I don't see you using you x > from for x in robots.

Re: [Tutor] Python Book Recommendations

2007-08-14 Thread Brian Wisti
On 8/14/07, Brian Wisti <[EMAIL PROTECTED]> wrote: > > > On 8/14/07, David Handel <[EMAIL PROTECTED]> wrote: > > > > If you can afford it, Safari Books online is a wonderful resource. > > http://www.safaribooksonline.com/ > > I am using the $39.95 month to month "all you can eat" deal. You have >

Re: [Tutor] Security [Was: Re: Decoding]

2007-08-14 Thread Tiger12506
The point is that even though eval(raw_input()) is not a security threat, Alan's suggestion of myscript.py < some.txt might be. And even though the script written will not be a security issue, the *coding practice* that it teaches will lead to times when he does encounter that "tiny set of scenario

Re: [Tutor] Python Book Recommendations [Was:[Re: Security]]

2007-08-14 Thread Terry Carroll
On Mon, 13 Aug 2007, bhaaluu wrote: > Programming isn't for everyone! Until you find out whether or not > it's for you, don't spend hundreds and thousands of dollars on > computer programming books! =) Programming isn't unique in that respect. I tried to learn Chinese a few years back. I'm not

Re: [Tutor] Python Book Recommendations

2007-08-14 Thread Terry Carroll
On Tue, 14 Aug 2007, Brian Wisti wrote: > Check with your local library, too. Or even your not-so-local library. > The Seattle Public Library provides access to a limited selection of the > Safari books (stuff published in the last 2 years from a handful of > publishers). Maybe your region has

Re: [Tutor] Python Book Recommendations

2007-08-14 Thread Fiyawerx
My company has a subscription with the books24x7.com site, and I'm sure they offer individual accounts, but so far I'm ashamed that I've paid close to 200$ worth of computer books that I could have been accessing online for free. Including 'dummies' books, Teach yourself whatever, and just a multit

Re: [Tutor] Python Book Recommendations [Was:[Re: Security]]

2007-08-14 Thread Kent Johnson
Terry Carroll wrote: > What I recommend is: > > 1) Get one book that's about Python, to learn from. An example, if you > already know how to program, would be Wes's Core Python book. Try to pick > one that's not too simple, because you'll want something that you can > still use once you know

[Tutor] xls file

2007-08-14 Thread Kirk Bailey
Ii want to read a xls file and use the data in part of it. What module would help make sense of one? -- Salute! -Kirk Bailey Think +-+ | BOX | +-+ knihT Fnord. ___ Tutor maillist