Re: [Tutor] Lists in List question

2005-06-24 Thread Ewald Ertl
Hello Phil! the HTML-Formating look's better than the text-Version. on Thu, 23 Jun 2005 17:15:59 -0500 Phillip Hart <[EMAIL PROTECTED]> wrote : - Phillip Hart > Hello, Phillip Hart > I've been using lis

Re: [Tutor] Changing what you've already printed

2005-06-24 Thread Kent Johnson
Ed Singleton wrote: > Is it possible (and easy) to change something you've already printed > rather than print again? > > Any clues or pointers to documentation gratefully recieved. You might like textui. It creates a console window in Tkinter so it is portable and it supports gotoxy(). http://

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Ron Phillips
Thanks for your response, Shuying Wang -- I was afraid no one even read the post. Now I see I wasn't clear. -- Shuying Wang: I'm not sure what you're trying to do. But I run cgi scripts and makexmlrpc requests with x

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Ron Phillips
##Run a simple CGI server by opening a command line to the parent dir of cgi-bin and runningpython -c "import CGIHTTPServer; CGIHTTPServer.test()"   ##   Oh, dear -- I responded before I read your post, Kent. It turns out it was option b), after all. But I had NO idea I would need to do anything

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Kent Johnson
Ron Phillips wrote: > ## > Run a simple CGI server by opening a command line to the parent dir of > cgi-bin and running > python -c "import CGIHTTPServer; CGIHTTPServer.test()" > > ## > > Oh, dear -- I responded before I read your post, Kent. It turns out it > was option b), after all. But I

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread joe
Hi, I managed to make it work with the following code: #! /usr/bin/python from SimpleXMLRPCServer import CGIXMLRPCRequestHandler def plus(a,b): return a + b server = CGIXMLRPCRequestHandler() server.register_function(plus) server.handle_request() Setting this to run from a cgi director

[Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Adam Cripps
I am a teacher and have written this little Python/Tkinter application to help me with my report writing: http://cvs.sourceforge.net/viewcvs.py/squawk/ It's released under GPL and was quite fun to write. However, currently the application only allows for 15 statements to be managed. Increasing

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Michael P. Reilly
On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: I am a teacher and have written this little Python/Tkinter applicationto help me with my report writing:http://cvs.sourceforge.net/viewcvs.py/squawk/ It's released under GPL and was quite fun to write.However, currently the application only allows

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Adam Cripps
On 6/24/05, Michael P. Reilly <[EMAIL PROTECTED]> wrote: > On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: > > I am a teacher and have written this little Python/Tkinter application > > to help me with my report writing: > > > > http://cvs.sourceforge.net/viewcvs.py/squawk/ > > > > It's relea

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Michael P. Reilly
On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: I hadn't thought about a scrollbar - that would be very useful,although doesn't add to the management side of the statement (i.e.organising them according to subjects).The user can load a text file and adapt that - so they don't have to enter them

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Ron Phillips
Kent wrote:   CGI requires a running HTTP server in front of it. The server receives the HTTP request, sees that it is a CGI request, starts a new process with the environment set according to the CGI protocol, and runs the CGI handler. Do you understand this relationship? (I mean that kindly, yo

[Tutor] Search and Replace

2005-06-24 Thread Reed L. O'Brien
I ma trying to write a script to search adn replace a sizable chink of text in about 460 html pages. It is an old form that usesa search engine no linger availabe. I am wondering if anyone has any advice on the best way to go about that. There are more than one layout place ment for the form, but

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Adam Cripps
On 6/24/05, Michael P. Reilly <[EMAIL PROTECTED]> wrote: > On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: > > I hadn't thought about a scrollbar - that would be very useful, > > although doesn't add to the management side of the statement (i.e. > > organising them according to subjects). > > >

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Kent Johnson
Ron Phillips wrote: > What I ran before were simple little test scripts of the "HelloWorld.py" > variety. I would put them in the cgi-bin directory and invoke them with > the browser, or with the HTTPLib in the command line, and I would get > something back. OK, that is a good test. > > When

Re: [Tutor] Search and Replace

2005-06-24 Thread Kent Johnson
Reed L. O'Brien wrote: > I ma trying to write a script to search adn replace a sizable chink of > text in about 460 html pages. > It is an old form that usesa search engine no linger availabe. > > I am wondering if anyone has any advice on the best way to go about that. > There are more than one l

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Danny Yoo
> The example code in the python online documentation calls a non-existant > "div" function, so it was obviously a typing exercise, not actual code > that anyone ever tested. Hi Ron, Ah, ok, I see. Check the bottom of: http://www.python.org/doc/lib/simple-xmlrpc-servers.html for a worki

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Ron Phillips
Yes, I believe you are right -- I posted a reply to the list indicating that I suspect IIS is at fault; not Python. Or perhaps I should say "my installation of IIS"; I have no confidence whatsoever in my abilities to administer IIS properly.   Thanks for looking at the documentation -- I was stuc

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Kent Johnson
Danny Yoo wrote: > I believe that the example you were looking at earlier, near the bottom > of: > > http://www.python.org/doc/lib/node556.html > > has is a documentation bug: the intent is clearly to compare and contrast > SimpleXMLRPCServer and CGIXMLRPCRequestHandler, so the code should be

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Alan G
> suggest a way of implementing many more statements? Tabbed frames > would be a good way forward (where each tab is a school subject) but > under Tkinter they don't appear to be that easy. Faking tabbed frames is fairly easy. Baasically its two frames one on top of the other, the top one is the

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Ike
for tabs, try the PMW library, notebook widget. its fairly easy to use I have found. Ike Adam Cripps wrote: >I am a teacher and have written this little Python/Tkinter application >to help me with my report writing: > >http://cvs.sourceforge.net/viewcvs.py/squawk/ > >It's released under GPL and

Re: [Tutor] CGIXMLRPCRequestHandler doesn't actually work, does it?

2005-06-24 Thread Danny Yoo
> > has is a documentation bug: the intent is clearly to compare and contrast > > SimpleXMLRPCServer and CGIXMLRPCRequestHandler, so the code should be > > using the same example. The fact that it isn't is confusing, and should > > be fixed. I'll send a bug report now. http://python.org/sf/122

Re: [Tutor] strip an email

2005-06-24 Thread Hugo González Monteverde
Hi nephish, I clearly remember it is very very simple and it is defined in the RFC. As far as I remember, the end of the headers are signalled by an empty line. Try looking for '\n\n', this should do the trick. I've saved a couple of emails and it looks like this should work. something like:

Re: [Tutor] Popen4 and Paths Containing Spaces

2005-06-24 Thread Hugo González Monteverde
Thanks, didn't know it before, as I have done very little Windows programming... only used the command line... > Windows doesn't care. The only place you can't use forward slashes in > path names is in a command prompt. It's been that way since DOS 2.0 in > the 80s. I prefer using the forward s

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Michael P. Reilly
On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: On 6/24/05, Michael P. Reilly <[EMAIL PROTECTED]> wrote:> On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote:> > I hadn't thought about a scrollbar - that would be very useful, > > although doesn't add to the management side of the statement (i.e.>

Re: [Tutor] Search and Replace

2005-06-24 Thread Chad Crabtree
Reed L. O'Brien wrote: >I ma trying to write a script to search adn replace a sizable chink of >text in about 460 html pages. >It is an old form that usesa search engine no linger availabe. > Well in the vein of Kents suggestion there is http://www.crummy.com/software/BeautifulSoup/ however it wi

Re: [Tutor] strip an email

2005-06-24 Thread Bill Campbell
On Fri, Jun 24, 2005, Hugo González Monteverde wrote: >Hi nephish, > >I clearly remember it is very very simple and it is defined in the RFC. >As far as I remember, the end of the headers are signalled by an empty line. > >Try looking for '\n\n', this should do the trick. I've saved a couple of >

[Tutor] fileinput problem

2005-06-24 Thread Kevin Reeder
I'm getting unexpected behaviour from this module. My script is meant to count the number of occurences of a term in one or more files. --- import sys, string, fileinput searchterm, sys.argv[1:] = sys.argv[1], sys.argv[2:] for line in fileinput.input(): num_matches = string.count(line,