[Tutor] Re: Tutor digest, Vol 1 #111 - 13 msgs
Daniel Gau
b4705021@im.ntu.edu.tw
Sun, 29 Aug 1999 01:00:31 +0800
tutor-admin@python.org wrote:
>
> Send Tutor mailing list submissions to
> tutor@python.org
>
> To subscribe or unsubscribe via the web, visit
> http://www.python.org/mailman/listinfo/tutor
> or, via email, send a message with subject or body 'help' to
> tutor-request@python.org
> You can reach the person managing the list at
> tutor-admin@python.org
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of Tutor digest..."
>
> Today's Topics:
>
> 1. Getting Started (Kapil Malhotra)
> 2. RE: Python question for beginners... (alan.gauld@bt.com)
> 3. Re: Getting Started (Joseph J. Strout)
> 4. help (Aaron Marzec)
> 5. Re: help (Tim Wilson)
> 6. Re: help (Joseph J. Strout)
> 7. Auto-responder -- request for comments (David Ascher)
> 8. Re: Auto-responder -- request for comments (Ivan Van Laningham)
> 9. Re: Initializing Tupples (Jonathon)
> 10. Re: Initializing Tupples (Joseph J. Strout)
> 11. Re: help (Stephen)
> 12. RE: how do I get pythons GUI to work (Billy)
> 13. how do I get the python GUI to work (Billy)
>
> --__--__--
>
> Message: 1
> From: "Kapil Malhotra" <malhotra_kapil@hotmail.com>
> To: tutor@python.org
> Date: Thu, 26 Aug 1999 23:24:49 PDT
> Subject: [Tutor] Getting Started
>
> This is Kapil Malhotra from India. I need to learn Python for my project. My
> mail ID is malhotra_kapil@hotmail.com . Please send me any stuff which I
> might find useful.
>
> Regards,
>
> Kapil
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> --__--__--
>
> Message: 2
> From: alan.gauld@bt.com
> To: markm@lineo.com, tutor@python.org
> Subject: RE: [Tutor] Python question for beginners...
> Date: Fri, 27 Aug 1999 09:50:13 +0100
>
> > I am doing a cgi script. I need the script to execute a program and
> > return the program output as a variable preferably.
> > I tried using os.system("/usr/local/bin/program") but that
>
> Look at os.popen(...)
>
> BUT the other issue in CGI work is that your program will
> execute as the cgi or www user. Often that user has very
> restricted access to system commands and files (for good
> security reasons!)
>
> > to work from within the script. It works in the python interpretor
>
> That could be the security restriction above....
>
> > not within the script. Maybe the os.execv command???I don't
>
> Almost certainly not - unless you os.fork() first.
> execv will *replace* your Python program with whatever
> program you execute.
>
> Alan G.
>
> --__--__--
>
> Message: 3
> Date: Fri, 27 Aug 1999 07:33:16 -0700
> To: "Kapil Malhotra" <malhotra_kapil@hotmail.com>, tutor@python.org
> From: "Joseph J. Strout" <joe@strout.net>
> Subject: Re: [Tutor] Getting Started
>
> At 11:24 PM -0700 08/26/99, Kapil Malhotra wrote:
> >This is Kapil Malhotra from India. I need to learn Python for my
> >project. My mail ID is malhotra_kapil@hotmail.com . Please send me
> >any stuff which I might find useful.
>
> That's not how it works. The "stuff you might find useful" is all at
> http://www.python.org. This mailing list is for specific topics and
> questions -- when you have one, ask it, and you'll get an answer.
>
> Cheers,
> -- Joe
>
> ,------------------------------------------------------------------.
> | Joseph J. Strout Biocomputing -- The Salk Institute |
> | joe@strout.net http://www.strout.net |
> `------------------------------------------------------------------'
>
> --__--__--
>
> Message: 4
> From: Aaron Marzec <argskate@netzero.net>
> To: tutor@python.org
> Date: 26 Aug 99 22:15:11 -0500
> Subject: [Tutor] help
>
> can you give me some tips on your python software v1.52
>
> P.S Im a newbie
>
> ________________________________________________________
> NetZero - We believe in a FREE Internet. Shouldn't you?
> Get your FREE Internet Access and Email at
> http://www.netzero.net/download/index.html
>
> --__--__--
>
> Message: 5
> Date: Fri, 27 Aug 1999 12:47:38 -0500 (CDT)
> From: Tim Wilson <wilson@chemsun.chem.umn.edu>
> To: Aaron Marzec <argskate@netzero.net>
> cc: tutor@python.org
> Subject: Re: [Tutor] help
>
> On 26 Aug 1999, Aaron Marzec wrote:
>
> > can you give me some tips on your python software v1.52
> >
> > P.S Im a newbie
>
> You might want to start with the Python Tutorial at
> http://www.python.org/doc/current/tut/tut.html
>
> If you're interested in books, I would recommend "Learning Python" by
> Lutz, Ascher, and Willison from O'Reilly and Associates. You can get it at
> Amazon at
> http://www.amazon.com/exec/obidos/ASIN/1565924649/o/qid=935775937/sr=8-1/002-5025541-6796200
>
> Have fun.
>
> -Tim
>
> --
> Timothy Wilson | "The faster you | Check out:
> Henry Sibley H.S. | go, the shorter | http://slashdot.org/
> W. St. Paul, MN, USA | you are." | http://linux.com/
> wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
>
> --__--__--
>
> Message: 6
> Date: Fri, 27 Aug 1999 10:49:36 -0700
> To: Aaron Marzec <argskate@netzero.net>, tutor@python.org
> From: "Joseph J. Strout" <joe@strout.net>
> Subject: Re: [Tutor] help
>
> At 10:15 PM -0500 08/26/99, Aaron Marzec wrote:
>
> >can you give me some tips on your python software v1.52
>
> Sure, ask a specific question and you'll get a specific answer. Ask
> a general answer like this and you'll get a general answer like "Read
> the docs and experiment." ;)
>
> Cheers,
> -- Joe
>
> ,------------------------------------------------------------------.
> | Joseph J. Strout Biocomputing -- The Salk Institute |
> | joe@strout.net http://www.strout.net |
> `------------------------------------------------------------------'
>
> --__--__--
>
> Message: 7
> Date: Fri, 27 Aug 1999 12:04:20 -0700 (Pacific Daylight Time)
> From: David Ascher <da@ski.org>
> To: tutor@python.org
> Subject: [Tutor] Auto-responder -- request for comments
>
> I'm going to add an autoresponder which will be sent to folks who are
> posting to the tutor list for the first time in a long time. Here is my
> first draft of the message. If anyone has any edits they'd like to see
> happen, let me know.
>
> --david
>
> Your message for tutor@python.org, the Python programming tutor list,
> has been received and is being delivered. This automated response is
> sent to those of you new to the Tutor list, to point out a few
> resources that can help with answering your own questions, or improve
> the chances of getting a useful answer from the other subscribers.
>
> If your question is something akin to:
>
> "I've just heard about Python, and it sounds great! Where can I
> find out more on how to program with Python?"
>
> or:
>
> "What's Python?"
>
> please read section 1 below.
>
> On the other hand, if your question is:
>
> "I've heard that Python is good for hacking -- I want to know more!"
>
> or
>
> "Can you teach me how to break into a computer with Python?"
>
> please read section 2 at the bottom of this email.
>
> Section 1:
> ----------
>
> The most comprehensive overview of python.org help resources is at
> http://www.python.org/Help.html . The Python FAQ is available at
> http://www.python.org/doc/FAQ.html and it has answers to many
> questions that people ask, possibly including your question. Another
> wealth of information and experience can be found via the python.org
> searches, at http://www.python.org/search/ . There you'll find
> comprehensive, easy-to-use searches over the python.org web site and
> the python newsgroup (comp.lang.python, also available as a mailing
> list, python-list@python.org).
>
> Finally, when you do send email to the Tutor list, be as clear as you
> can about the problem, including, when relevant, details like:
>
> - Precise error messages, including complete tracebacks
> - The hardware platform (available in the Python sys module as sys.platform)
> - The python version (sys.version)
> - The python search path (sys.path)
>
> In general, be specific about what was going on connected with the
> problem or what specific concept you're having difficulties with. The
> better the info you provide, the more likely the helpers will be able
> to glean the answer...
>
> Note that no one is paid to read the tutor list or provide answers,
> and most readers often have other work that demands their attention.
> Well-posed requests for help are usually answered fairly promptly, but
> occasionally a request slips by, so if you do not get a response with
> one or two working days (it's usually quicker than that), please feel
> free to send a followup, asking whether anyone is working on your
> question.
>
> Anyway, your message is being delivered to the Tutor list as this one
> is being sent. However, if your question was about as detailed as
> "Teach me how to program in Python", do not count on an answer -- this
> email contains all the information you need to start. Come back with
> a more precise question, and we'll be glad to help.
>
> Thanks!
>
> Section 2:
> ----------
>
> We often get requests which ask about hacking or cracking or breaking
> into computers. If you haven't yet, go read Eric Raymond's seminal
> article "How To Become a Hacker"
> (http://www.tuxedo.org/~esr/faqs/hacker-howto.html). If you want help
> learning how to hack the way Eric defines the word, then come back to
> us (and read Section 1 above). If you want help learning how to
> crack, go look elsewhere -- we're not interested in helping you do
> that.
>
> --__--__--
>
> Message: 8
> Date: Fri, 27 Aug 1999 13:27:49 -0600
> From: Ivan Van Laningham <ivanlan@callware.com>
> Organization: Callware Technologies, Inc.
> CC: tutor@python.org
> Subject: Re: [Tutor] Auto-responder -- request for comments
>
> Hi All--
>
> David Ascher wrote:
> >
> > I'm going to add an autoresponder which will be sent to folks who are
> > posting to the tutor list for the first time in a long time. Here is my
> > first draft of the message. If anyone has any edits they'd like to see
> > happen, let me know.
> >
>
> A good idea!
>
> [bobbitt]
>
> However:
>
> >
> > Section 2:
> > ----------
> >
> > We often get requests which ask about hacking or cracking or breaking
> > into computers. If you haven't yet, go read Eric Raymond's seminal
> > article "How To Become a Hacker"
> > (http://www.tuxedo.org/~esr/faqs/hacker-howto.html).
>
> Well, I take issue with the word "seminal" here. Webster's online says:
>
> Main Entry: sem·i·nal
> Pronunciation: 'se-m&-n&l
> Function: adjective
> Etymology: Middle English, from Middle French, from Latin seminalis,
> from semin-, semen seed -- more at SEMEN
> Date: 14th century
> 1 : of, relating to, or consisting of seed or semen
> 2 : containing or contributing the seeds of later development :
> CREATIVE, ORIGINAL <a seminal book> <one of the most seminal of the
> great poets>
> - sem·i·nal·ly /-n&l-E/ adverb
>
> I would suggest "important," "influential," "creative," or possibly
> even "ovular." The last has the same sense of containing or
> contributing the seeds of later development, but from a slightly
> different perspective;-)
>
> <now-what-was-that-thread-about-stroking-your-WHAT?>-ly y'rs,
> Ivan;-)
> ----------------------------------------------
> Ivan Van Laningham
> Callware Technologies, Inc.
> ivanlan@callware.com
> ivanlan@home.com
> http://www.pauahtun.org
> See also:
> http://www.foretec.com/python/workshops/1998-11/proceedings.html
> Army Signal Corps: Cu Chi, Class of '70
> ----------------------------------------------
>
> --__--__--
>
> Message: 9
> Date: Fri, 27 Aug 1999 19:46:12 +0000 (UTC)
> From: Jonathon <jblake@stamp-coin.com>
> To: tutor@python.org
> Subject: Re: [Tutor] Initializing Tupples
>
> On Wed, 25 Aug 1999, Joseph J. Strout wrote:
>
> >So there must be a difference between what you're telling us, and
>
> Source code from the program I am writing is available at
> http://www.stamp-coin.com/python/script-error/index.html
>
> >copy of Python is seriously screwed up (unlikely). Or, this error
> >occurs not on the code you gave us, but on later code where you try
> >to...
>
> Possible.
>
> >Well, you can't. You need to use a list for that; tuples are immutable.
>
> Let's see if I understand the difference between lists and
> tuples.
>
> Once a Tuple is created, it can not be changed.
> Once a List is created, both it, and its contents can
> be changed --- increased, decreased etc.
>
> IE:
>
> Example_Tuple = ( "joe"0, "curly", "moe" )
> and Example_Tuple retains that value for the duration
> of the program.
>
> Example_List = [ "joe", "curly", "moe" ]
>
> Example_List[0] = "larry"
>
> Changes the 0 element to larry.
>
> Example_List.insert(3, "joe")
>
> Adds "joe" to the list, as the third element.
>
> Example_List[3] = 2
>
> Makes that a number, instead of a string.
>
> << All this appears to work at the python prompt. >>
>
> xan
>
> jonathon
>
> --__--__--
>
> Message: 10
> Date: Fri, 27 Aug 1999 13:19:28 -0700
> To: Jonathon <jblake@stamp-coin.com>, tutor@python.org
> From: "Joseph J. Strout" <joe@strout.net>
> Subject: Re: [Tutor] Initializing Tupples
>
> At 7:46 PM +0000 08/27/99, Jonathon wrote:
>
> > Let's see if I understand the difference between lists and
> > tuples.
> >
> > Once a Tuple is created, it can not be changed.
> > Once a List is created, both it, and its contents can
> > be changed --- increased, decreased etc.
>
> Yep, that's it. (And, for the record, strings are just like tuples.)
>
> > Example_Tuple = ( "joe", "curly", "moe" )
> > and Example_Tuple retains that value for the duration
> > of the program.
>
> Well, not exactly -- you could easily rebind Example_Tuple to
> something else, e.g.:
>
> Example_Tuple = Example_Tuple[:2] # keep only the first two items
> or
> Example_Tuple = Example_Tuple + ("larry", "guido") # append two items
>
> These work because the slice operator [:] or the addition operator
> creates a *new* tuple, rather than modifying the old one in place;
> and then this new tuple is bound to the name "Example_Tuple". Does
> this make sense?
>
> Cheers,
> -- Joe
>
> ,------------------------------------------------------------------.
> | Joseph J. Strout Biocomputing -- The Salk Institute |
> | joe@strout.net http://www.strout.net |
> `------------------------------------------------------------------'
>
> --__--__--
>
> Message: 11
> Date: Fri, 27 Aug 1999 18:15:59 -0400 (EDT)
> From: Stephen <stephen@webadmins.com>
> To: Tim Wilson <wilson@chemsun.chem.umn.edu>
> cc: Aaron Marzec <argskate@netzero.net>, tutor@python.org
> Subject: Re: [Tutor] help
>
> I just picked up python in the last few weeks and started scripting @ work. Take
> my word for it... skip 'Learning Python' and go directly to 'Programming Python'
> if you're already versed in another scripting language (perl/shell/etc).
>
> The 'Learning Python' book put me to sleep...
>
> /***************************************************************\
> * Stephen ("xinu") Klassen -- Unix Systems Administrator *
> * Website: http://stephen.webadmins.com/ UIN: 19224641 (wk) *
> \***************************************************************/
>
> On Fri, 27 Aug 1999, Tim Wilson wrote:
>
> > On 26 Aug 1999, Aaron Marzec wrote:
> >
> > > can you give me some tips on your python software v1.52
> > >
> > > P.S Im a newbie
> >
> > You might want to start with the Python Tutorial at
> > http://www.python.org/doc/current/tut/tut.html
>
> --__--__--
>
> Message: 12
> From: "Billy" <watchman1@bigfoot.com>
> To: <tutor@python.org>
> Date: Fri, 27 Aug 1999 23:46:02 -0400
> charset="iso-8859-1"
> Subject: [Tutor] RE: how do I get pythons GUI to work
>
> I am running win98 when I click on the python GUI the Herd drive works but
> the program never starts I can only use the command line
> Billy Estes
How could I get characters one by one from stdin without
using "curses" module?
Is there any way to check the input every time the user press
a key?
--
~ Daniel Gau <b4705021@im.ntu.edu.tw>
'v' Linux Notes
http://www.linux.org.tw/~plateau/linux_notes/index.htm
// \\ H-Zone http://www.linux.org.tw/hardware/index.php3
/( )\ TwLUG http://www.linux.org.tw/
^`~'^ ICQ Number 30932232