Re: [Tutor] reading webpage

2008-02-18 Thread Guess?!?
Hi Kent, Broken machine gives IDLE 1.2.1 >>> import urllib >>> print urllib.getproxies() {'http': 'http://proxy-address:port'} >>> correct machine gives empty dictionary ... { } Thanks Gagan Arora On Feb 18, 2008 7:26 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > Guess?!? wrote: > > Hi All, >

Re: [Tutor] reading webpage

2008-02-18 Thread Kent Johnson
Guess?!? wrote: > Hi All, > > I am trying to read a webpage into a variable. My intention is to search > for patterns within the page. I am stuck because I get this error shown > below > I have 2.5.1 Windows installer. I have tried repairing it but it takes > me down in the same hole ...e

[Tutor] reading webpage

2008-02-18 Thread Guess?!?
Hi All, I am trying to read a webpage into a variable. My intention is to search for patterns within the page. I am stuck because I get this error shown below I have 2.5.1 Windows installer. I have tried repairing it but it takes me down in the same hole ...everything else seems to work fine

Re: [Tutor] Silly question: Modifying code while the script is running

2008-02-18 Thread Michael Langford
import sys code = """import datetime print 'This is a pile of arbitrary code to execute' print sys.argv print datetime.datetime.now()""" if len(sys.argv) > 2: exec(code) else: print "Fooless" --Michael On Feb 18, 2008 5:17 PM, Scott Wolcott <[EMAIL PROTECTED]> wrote: > Okay, I've

Re: [Tutor] [tutor] PIL versus matlab

2008-02-18 Thread Eike Welk
On Sunday 17 February 2008 08:26, Varsha Purohit wrote: > Hello All, >I wanted to know what are the advantages and disadvantages > of using pIL instead of matlab software to deal to image > processing. PIL is for simple tasks like resizing images. It can read and write very many image for

[Tutor] Silly question: Modifying code while the script is running

2008-02-18 Thread Scott Wolcott
Okay, I've got this ircbot that i wrote in python, and while we were all making Terminator jokes, it occurred to me that it would actually be reletively easy to have redqueen (that's the bot) write code into another file. Then you just have to specify the file and import the code and run it. It sou

[Tutor] Putting the Output of Help to a File

2008-02-18 Thread Wayne Watson
See Subject. Is it possible? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet "I know that this defies the law of grav

Re: [Tutor] Web Server

2008-02-18 Thread Ryan
Awesome, thanks, I also forgot to check the error messages(had to go to command line and run it as root) On Mon, 2008-02-18 at 14:05 -0500, Kent Johnson wrote: > Ryan wrote: > > I copied a webserver from one O'Reilly's books, but it only works under > > windows. Can anyone tell me what to change to

Re: [Tutor] tkSimpleDialog, Tkinter, and IDLE

2008-02-18 Thread Kent Johnson
Wayne Watson wrote: > Is tkSimpleDialog really a part of Tkinter? It's kind of an add-on, I guess, not in the main Tkinter module: http://docs.python.org/lib/node685.html > I sometimes see code that has: > > from tkinter import * > import tkSimpleDialog > > The from gets all the names, function

Re: [Tutor] Web Server

2008-02-18 Thread Kent Johnson
Ryan wrote: > I copied a webserver from one O'Reilly's books, but it only works under > windows. Can anyone tell me what to change to get it to work under > linux? What happens when you try it? My guess is you get an error opening a socket to listen to port 80. Try port 8000. Kent > Here is the

[Tutor] Web Server

2008-02-18 Thread Ryan
I copied a webserver from one O'Reilly's books, but it only works under windows. Can anyone tell me what to change to get it to work under linux? Here is the code: webdir = '.' port = 80 import os, sys from BaseHTTPServer import HTTPServer from CGIHTTPServer import CGIHTTPRequestHandler if len(s

Re: [Tutor] tkSimpleDialog, Tkinter, and IDLE

2008-02-18 Thread Ryan
I don't know anything about tkSimpleDialog, but when you try "import tkinter", make sure it's "import Tkinter". The "T" in Tkinter must be capitalized. On Mon, 2008-02-18 at 07:09 -0800, Wayne Watson wrote: > Is tkSimpleDialog really a part of Tkinter? The reason I ask is that it seems > to be neg

Re: [Tutor] Noob requesting help...

2008-02-18 Thread bob gailer
This seems to focus on the NT, but from a Python Tutor List perspective I think we are OT. -- Bob Gailer 919-636-4239 Chapel Hill, NC ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Noob requesting help...

2008-02-18 Thread Marc Tompkins
Mother Mary comes to me Speaking words of wisdom: Let it be, let it be... On Feb 18, 2008 6:30 AM, Reed O'Brien <[EMAIL PROTECTED]> wrote: > On Feb 16, 2008, at 9:58 PM, bob gailer wrote: > > > Marc Tompkins wrote: > >> John, Luke, Marc... can we get a Matthew to join this thread? > > You thinkin

Re: [Tutor] Suggestions to improve this first effort?

2008-02-18 Thread C B Gambrell
Thanks for the responses. I appreciate your help and pointers to statements and modules I was not aware of. I appreciate leaning about the "evil tab" and attempt to vanish it from any future emails form me. Charles ___ Tutor maillist - Tutor@python.o

[Tutor] tkSimpleDialog, Tkinter, and IDLE

2008-02-18 Thread Wayne Watson
Is tkSimpleDialog really a part of Tkinter? The reason I ask is that it seems to be neglected in material on Tkinter. For example, in by Shipman. Further, I sometimes see code that has: from tkinter import * import tkSimpleDialog The from gets all the names, functions too, so why is it i

Re: [Tutor] Noob requesting help...

2008-02-18 Thread Reed O'Brien
On Feb 16, 2008, at 9:58 PM, bob gailer wrote: > Marc Tompkins wrote: >> John, Luke, Marc... can we get a Matthew to join this thread? > You thinking of Matthew Dixon Coles? > > But then wouldn't Paul want to get into the Act? For Pete's sake... ~ro __

Re: [Tutor] Following the Mouse in a Graphics Area

2008-02-18 Thread Kent Johnson
Wayne Watson wrote: > Win XP. > Is there a way to read out the pixel position in a graphics area, and > display it so the user knows the x-y values? I want the user to specify > the center of a circle he wants drawn on an image. When he specifies the > center, then I want to use it as a referenc