'REPL' style IDE

2007-08-20 Thread beginner
Hi Everyone, I am using the Wing IDE. It works great when developing applications, but the workflow is like Visual Studio -- after you execute it or debug it, the python script ends. What I want is an interactive interpreting environment. I want the IDE to execute a boot script to initialize my

Re: 'REPL' style IDE

2007-08-20 Thread beginner
On Aug 20, 12:50 pm, beginner [EMAIL PROTECTED] wrote: Hi Everyone, I am using the Wing IDE. It works great when developing applications, but the workflow is like Visual Studio -- after you execute it or debug it, the python script ends. What I want is an interactive interpreting

Re: str().join() isn't working

2007-08-20 Thread Robert Dailey
here is a more realized example of the lists I'm trying to join: _user_includes = [ ../src, ../resource, ../inc, ../src, ../data, ../gui, ../script, ../script/actions, ../gui/dispatch, ../gui/factories,

Re: Hot subject: a good python editor and/or IDE?

2007-08-20 Thread Grant Edwards
On 2007-08-20, Dave Cook [EMAIL PROTECTED] wrote: On 2007-08-19, Sébastien [EMAIL PROTECTED] wrote: I am currently using Eclipse+PyDev when developping Python projects but I lack a fast, simple editor for tiny bit of scripts. So here is my question: what is, for you, the current best ( but

Re: str().join() isn't working

2007-08-20 Thread beginner
On Aug 20, 1:16 pm, Robert Dailey [EMAIL PROTECTED] wrote: here is a more realized example of the lists I'm trying to join: _user_includes = [ ../src, ../resource, ../inc, ../src, ../data, ../gui, ../script,

Re: str().join() isn't working

2007-08-20 Thread Carsten Haese
On Mon, 2007-08-20 at 13:16 -0500, Robert Dailey wrote: here is a more realized example of the lists I'm trying to join: _user_includes = [ ../src, # [snip] ] _system_includes = [ ../../../../../../Symbian/9.1/NGAGE_SDK_1.1/EPOC32/include, # [snip] ]

Re: str().join() isn't working

2007-08-20 Thread kyosohma
On Aug 20, 1:16 pm, Robert Dailey [EMAIL PROTECTED] wrote: here is a more realized example of the lists I'm trying to join: _user_includes = [ ../src, ../resource, ../inc, ../src, ../data, ../gui, ../script,

Re: Handwriting Recognition

2007-08-20 Thread [EMAIL PROTECTED]
On Aug 20, 9:00 am, Ian Dickinson [EMAIL PROTECTED] wrote: However a friend of mine who is a special educational needs teacher was asking me if I could write some handwriting recognition software for her, which would allow here pupils to write their input directly on a graphics tablet and

urllib2.urlopen(url) pulling something other than HTML

2007-08-20 Thread [EMAIL PROTECTED]
I am reading Python for Dummies and found the following example of a web crawler that I thought was interesting. The first time I keyed the program and executed it I didn't understand it well enough to debug it so I just skipped it. A few days later I realized that it failed after a few seconds

Re: Handwriting Recognition

2007-08-20 Thread brien colwell
Just a note -- Microsoft has a tablet SDK that solves some of these problems. I think it is for C# On 8/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 20, 9:00 am, Ian Dickinson [EMAIL PROTECTED] wrote: However a friend of mine who is a special educational needs teacher was asking

RE: reading a line in file

2007-08-20 Thread Brian McCann
Hi, I can read in the whole file build.number which has the following lines how do I just capture the value of build.number and assign it to a variable Thanks, Brian contents of file build.number: #Build Number for ANT. Do not edit! #Mon Aug 20 04:04:51 EDT 2007 build.number=1 buildinfo.py

CIE Colorspace Conversions

2007-08-20 Thread Greg Taylor
Greetings, I'm not sure if this is the right place to probe for interest, but I figured I'd give it a shot. Recently, a project I undertook at work required us to convert between the various CIE color spaces (XYZ, Lab, LCH, Luv, etc.). I looked long and hard but didn't find any Python library

Re: reading a line in file

2007-08-20 Thread Tim Williams
On 20/08/07, Brian McCann [EMAIL PROTECTED] wrote: Hi, I can read in the whole file build.number which has the following lines how do I just capture the value of build.number and assign it to a variable Thanks, Brian contents of file build.number: #Build Number for ANT. Do not edit!

RE: reading a line in file

2007-08-20 Thread Brian McCann
Hi Tim, The sample data is in file build.number contents of file build.number: #Build Number for ANT. Do not edit! #Mon Aug 20 04:04:51 EDT 2007 build.number=1 Thanks, Brian From: [EMAIL PROTECTED] on behalf of Tim Williams Sent: Mon 8/20/2007 2:59 PM

Re: I Need help from all the group participants

2007-08-20 Thread [EMAIL PROTECTED]
I would be happy to help but I don't have a clear understand of what the poster needs. -- http://mail.python.org/mailman/listinfo/python-list

Re: reading a line in file

2007-08-20 Thread Shawn Milochik
Hopefully this will help (using your input file) #!/usr/bin/env python import re buildinfo = input.txt input = open(buildinfo, 'r') regex = re.compile(r^\s*build.number=(\d+)\s*$) for line in input: if re.search(regex, line): print line buildNum =

Re: Python equivalent of Perl's $/

2007-08-20 Thread John K Masters
On 10:30 Mon 20 Aug , Nick Craig-Wood wrote: Something like this maybe? import re input_data = I am currently working my way through Jeffrey Friedl's book Mastering Regular Expressions. Great book apart from the fact it uses Perl for the examples. One particular expression that

Re: I Need help from all the group participants

2007-08-20 Thread Boris Ozegovic
[EMAIL PROTECTED] wrote: I would be happy to help but I don't have a clear understand of what the poster needs. Suppose you want to find out what is someone's pulse/heart rate, you can ask question in many ways, syntaxically, but with same semantic. One way to find out someone's pulse is to

Re: Python equivalent of Perl's $/

2007-08-20 Thread [EMAIL PROTECTED]
On Aug 19, 11:13 am, John K Masters [EMAIL PROTECTED] wrote: I am currently working my way through Jeffrey Friedl's book Mastering Regular Expressions. Great book apart from the fact it uses Perl for the examples. One particular expression that interests me is '$/ = .\n' which, rather than

Re: reading a line in file

2007-08-20 Thread Tim Williams
On 20/08/07, Brian McCann [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] on behalf of Tim Williams Sent: Mon 8/20/2007 2:59 PM To: Brian McCann Cc: python-list@python.org Subject: Re: reading a line in file On 20/08/07, Brian McCann [EMAIL

Re: Mouse control with ctypes in OS X

2007-08-20 Thread Robert Kern
Paul McNett wrote: Niklas Ottosson wrote: I need to get hold of the mouse position and also need to be able to change it. In windows I have used ctypes.windll.user32.getCursorPos() and ctypes.windll.user32.setCursorPos() with great success in my program but now I also need to make a Mac OS

Re: Handwriting Recognition

2007-08-20 Thread [EMAIL PROTECTED]
import handwriting ... http://docs.python.org/lib/module-handwriting.html ha ha, I kid, I kid. I don't think this is an easy problem to solve. You'd probably want Python to be a wrapper around whatever hand-writing recognition software you find or buy. I know handwriting

Re: reading a line in file

2007-08-20 Thread Tim Williams
On 20/08/07, Shawn Milochik [EMAIL PROTECTED] wrote: Hopefully this will help (using your input file) #!/usr/bin/env python import re buildinfo = input.txt input = open(buildinfo, 'r') regex = re.compile(r^\s*build.number=(\d+)\s*$) for line in input: if re.search(regex, line):

Re: regular expression dictionary search

2007-08-20 Thread Gabriel Genellina
On 20 ago, 12:48, mkPyVS [EMAIL PROTECTED] wrote: On Aug 20, 9:35 am, Shawn Milochik [EMAIL PROTECTED] wrote: As a side note unless you are searching large buffers it is possibly more costly to compile into a re object then do a match with it as opposed to let the match object perform a

Re: CIE Colorspace Conversions

2007-08-20 Thread Robert Kern
Greg Taylor wrote: Greetings, I'm not sure if this is the right place to probe for interest, but I figured I'd give it a shot. Recently, a project I undertook at work required us to convert between the various CIE color spaces (XYZ, Lab, LCH, Luv, etc.). I looked long and hard but

Re: reading a line in file

2007-08-20 Thread Jay Loden
Shawn Milochik wrote: Hopefully this will help (using your input file) #!/usr/bin/env python import re buildinfo = input.txt input = open(buildinfo, 'r') regex = re.compile(r^\s*build.number=(\d+)\s*$) for line in input: if re.search(regex, line): print line

Re: urllib2.urlopen(url) pulling something other than HTML

2007-08-20 Thread John J. Lee
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: [...] -- f = formatter.AbstractFormatter(formatter.DumbWriter(StringIO())) parser = htmllib.HTMLParser(f) parser.feed(html) parser.close() return parser.anchorlist

Re: 'REPL' style IDE

2007-08-20 Thread Jeff
python-mode in Emacs. -- http://mail.python.org/mailman/listinfo/python-list

Re: I Need help from all the group participants

2007-08-20 Thread Jason
On Aug 20, 1:14 pm, Boris Ozegovic [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I would be happy to help but I don't have a clear understand of what the poster needs. Suppose you want to find out what is someone's pulse/heart rate, you can ask question in many ways, syntaxically, but

Re: str().join() isn't working

2007-08-20 Thread Robert Dailey
Hi all, Thanks for your response. I figured out the issue. I was using list.append() to append another list, when I should have been using expand(). Sorry for the confusion. On 8/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 20, 1:16 pm, Robert Dailey [EMAIL PROTECTED] wrote: here

Re: desperately in need of a tool

2007-08-20 Thread John J. Lee
yagyala [EMAIL PROTECTED] writes: I recently started working for a company that has just implemented its first set of software standards. So far, so good. Here's the problem: one of those standards is that the comments for each routine must indicate every other routine that it calls. As I try

optparse - required options

2007-08-20 Thread Robert Dailey
Hi, I've been reading through the python documentation on the optparse module and I was unable to find out how to specify if an option is optional or required. The documentation vaguely states that actions can be used to do this, however I was not able to figure out how. If anyone could help I'd

Re: 'REPL' style IDE

2007-08-20 Thread JoeSox
On 8/20/07, beginner [EMAIL PROTECTED] wrote: Hi Everyone, I am using the Wing IDE. It works great when developing applications, but the workflow is like Visual Studio -- after you execute it or debug it, the python script ends. What I want is an interactive interpreting environment. I want

RE: reading a line in file

2007-08-20 Thread Brian McCann
Shawn, Tim ,Jay many thanks, It looks like there are many ways this problem can be approached either by using regex or a tokens Tim I'm not familiar with your solution, but will learn about that method also Jay, what do you mean by regex comes with a lot of overhead? --Brian

Re: 'REPL' style IDE

2007-08-20 Thread JoeSox
On 8/20/07, JoeSox [EMAIL PROTECTED] wrote: On 8/20/07, beginner [EMAIL PROTECTED] wrote: Hi Everyone, I am using the Wing IDE. It works great when developing applications, but the workflow is like Visual Studio -- after you execute it or debug it, the python script ends. What I

Re: desperately in need of a tool

2007-08-20 Thread John J. Lee
yagyala [EMAIL PROTECTED] writes: I recently started working for a company that has just implemented its first set of software standards. So far, so good. Here's the problem: one of those standards is that the comments for each routine must indicate every other routine that it calls. As I try

Re: Mouse control with ctypes in OS X

2007-08-20 Thread Robert Kern
Robert Kern wrote: Googling around a bit more, however, I see that the Quartz Event Services is documented and provides similar functionality. The DarwiinRemote project has a mouse emulation mode for the Nintendo Wii controller that uses this API. It's only available in OSX 10.4, however.

Re: reading a line in file

2007-08-20 Thread Jay Loden
Brian McCann wrote: Shawn, Tim ,Jay many thanks, It looks like there are many ways this problem can be approached either by using regex or a tokens Tim I'm not familiar with your solution, but will learn about that method also Jay, what do you mean by regex comes with a lot of

Re: reading a line in file

2007-08-20 Thread Shawn Milochik
Everybody hates regexes. Except me. Discrimination! -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2.urlopen(url) pulling something other than HTML

2007-08-20 Thread Gabriel Genellina
On 20 ago, 15:44, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: -- f = formatter.AbstractFormatter(formatter.DumbWriter(StringIO())) parser = htmllib.HTMLParser(f) parser.feed(html) parser.close() return parser.anchorlist

Re: I Need help from all the group participants

2007-08-20 Thread Boris Ozegovic
Jason wrote: I wonder what John's pulse is? Display John's pulse. I need to know John's pulse. How many beats per minute is John's heart going? What's John's pulse rate? How fast is John's heart rate? How fast is John's blood pumping? What is the rate of John's heart? What is the rate

Re: 'REPL' style IDE

2007-08-20 Thread beginner
On Aug 20, 2:51 pm, JoeSox [EMAIL PROTECTED] wrote: On 8/20/07, beginner [EMAIL PROTECTED] wrote: Hi Everyone, I am using the Wing IDE. It works great when developing applications, but the workflow is like Visual Studio -- after you execute it or debug it, the python script ends.

Re: 'REPL' style IDE

2007-08-20 Thread beginner
On Aug 20, 2:39 pm, Jeff [EMAIL PROTECTED] wrote: python-mode in Emacs. Yeah, but I don't know anything about Emacs and as far as I know it is pretty complicated. -- http://mail.python.org/mailman/listinfo/python-list

Re: reading a line in file

2007-08-20 Thread Jay Loden
Shawn Milochik wrote: Everybody hates regexes. Except me. Discrimination! Actually, I love them, they are an amazingly powerful tool. I just happen to also believe the old axiom when all you have is a hammer, everything looks like your thumb. Also the related some people think when they see a

Re: Python equivalent of Perl's $/

2007-08-20 Thread John K Masters
On 19:19 Mon 20 Aug , [EMAIL PROTECTED] wrote: import StringIO text = \ To mimic Perl's input record separator in Python, you can use a generator. And a substring test. Perhaps something like the following is what you wanted. mockfile = StringIO.StringIO(text) def

mode parameter in popen2-4

2007-08-20 Thread Tobiah
In the popen docs, a file like object is returned, and may be read to or written to depending on the 'mode' parameter ('r', or 'w'). Why is the mode parameter needed for popen2 and greater, when both a stdin and stdout object is returned? One wouldn't want to 'append' to a stream is it

Re: reading a line in file

2007-08-20 Thread Shawn Milochik
Although you're technically correct, I think there's a knee-jerk anti-regex reaction, citing the meaningless overhead. If you're running many thousands of records or something then it becomes a small issue compared to a replace statement or something. But in most cases it makes no difference at

Re: best GUI library for vector drawing program

2007-08-20 Thread chewie54
On Aug 20, 3:04 am, Mats [EMAIL PROTECTED] wrote: If you want to stay within Tcl/Tk you could take a look at my tkpath package:http://tclbitprint.sf.net/ and

Re: urllib2.urlopen(url) pulling something other than HTML

2007-08-20 Thread [EMAIL PROTECTED]
Those responses were both very helpful. John's additional type checking is straight forward and easy to implement. I will also rewrite the application a second time using the class Gabriel offered. Both of these suggestions will help gain some insight into how Python works. Don't even try to

Re: optparse - required options

2007-08-20 Thread Robert Dailey
Well, I don't know what is wrong with people then. I don't see how required arguments are of bad design. Some command-line applications are built around performing tasks based on information received. Compilers, for example. A compiler can't do much of anything unless you give it at the very least

Re: datetime in microseconds

2007-08-20 Thread Robert Dailey
A small off topic question. Why use divmod() instead of the modulus operator? On 8/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 20, 4:17 pm, [EMAIL PROTECTED] wrote: On Aug 20, 3:15 pm, John Machin [EMAIL PROTECTED] wrote: On Aug 20, 9:52 pm, [EMAIL PROTECTED] wrote:

Moving Python's tracker to Roundup on Aug 23rd

2007-08-20 Thread Brett Cannon
On August 23rd Python will be moving off of SourceForge and over to our own issue tracker run on Roundup (http://bugs.python.org/). During the transition there will be a time where the SourceForge tracker is no longer being used but that the new tracker has not been brought up yet. We expect

RE: reading a line in file

2007-08-20 Thread Brian McCann
Hi Shawn, what if I had a file com.properties with the below line in it If I needed to capture the value of everything separeted by a : and asign each to a variable would regex be the right method to grab those? like a=jdbc b=oracle [EMAIL PROTECTED] d=1521 e:XE --Brian

Pattern for error checking easiest-first?

2007-08-20 Thread jquinn+google
Heres the situation: class AbstractThing(): def changeMe(self,blah): if blah 1: raise MyException self.blah = blah class NetworkedThing(AbstractThing): def changeMe(self,blah): if blah self.getUpperLimitOverTheNetworkSlowly: raise

Re: Development for dual core machine

2007-08-20 Thread Willi Richert
Andy wrote: Thanks guys for the suggestions. Andy It might be that you have to set the CPU affinity for your python process so that it works at all. I had that problem on a dual core machine with hyperthread enabled. Using taskset (http://www.linuxcommand.org/man_pages/taskset1.html) helped

Re: I Need help from all the group participants

2007-08-20 Thread Paul Rubin
Jason [EMAIL PROTECTED] writes: I want the result of John's auscultation. Give me John's heart beats, or give John death! Okay, probably not the last one. Dr. Hackenbush takes John's pulse Hmm, either he's dead, or my watch has stopped. --Groucho Marx --

Re: optparse - required options

2007-08-20 Thread Jay Loden
Robert Dailey wrote: Well, I don't know what is wrong with people then. I don't see how required arguments are of bad design. Some command-line applications are built around performing tasks based on information received. Compilers, for example. A compiler can't do much of anything unless you

Re: str().join() isn't working

2007-08-20 Thread Terry Reedy
Robert Dailey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Hi all, | | Thanks for your response. I figured out the issue. I was using | list.append() to append another list, when I should have been using | expand(). Sorry for the confusion. The method is .extend, not .expand ;=)

Re: datetime in microseconds

2007-08-20 Thread Robert Kern
Robert Dailey wrote: A small off topic question. Why use divmod() instead of the modulus operator? Because he needed both the quotient and the remainder. % only gives you the remainder. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made

Re: reading a line in file

2007-08-20 Thread Jay Loden
Shawn Milochik wrote: Although you're technically correct, I think there's a knee-jerk anti-regex reaction, citing the meaningless overhead. If you're running many thousands of records or something then it becomes a small issue compared to a replace statement or something. But in most cases

Re: str().join() isn't working

2007-08-20 Thread Robert Dailey
Yeah! That's it lol. Sorry, I wasn't looking at the documentation. At least you got the point! Thanks again guys. On 8/20/07, Terry Reedy [EMAIL PROTECTED] wrote: Robert Dailey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Hi all, | | Thanks for your response. I figured out

Re: Newbie question about a web server

2007-08-20 Thread Chris Allen
On Aug 20, 12:02 am, Frank Millman [EMAIL PROTECTED] wrote: Hi all I have just started to dabble in writing my own web server. I googled for 'python web server', and this is the first hit - http://fragments.turtlemeat.com/pythonwebserver.php It has the source code for a simple web

Re: Latest models of Gibson guitars

2007-08-20 Thread Lew
RickH wrote: On Aug 19, 9:24 pm, Randall Ainsworth [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Hermit [EMAIL PROTECTED] wrote: How does the image quality compare with a DSLR? Depends on whether it's a Paul or a Strat. A Strat is a Fender, but I'd rather win a Gibson es175.

Re: Symbolic Link

2007-08-20 Thread Hyuga
On Aug 19, 4:29 pm, mosscliffe [EMAIL PROTECTED] wrote: The source file is in an area which python can see, but not the browser. I am trying to make a link in a browser friendly area so I can use it to display an image file. You might want to try using an .htaccess file. Place a file called

Any advice on ways for sharing a small Python application with the world?

2007-08-20 Thread Bert Heymans
Hi, I made a Python cli application for resizing batches of images based on the PIL. You can find it here http://heymans.org/pyresize.html It's just an straight forward command line interface application but I guess many people would find a use for it, it can be used as a module as well. There's

Re: Python equivalent of Perl's $/

2007-08-20 Thread [EMAIL PROTECTED]
On Aug 20, 1:02 pm, John K Masters [EMAIL PROTECTED] wrote: On 19:19 Mon 20 Aug , [EMAIL PROTECTED] wrote: import StringIO text = \ To mimic Perl's input record separator in Python, you can use a generator. And a substring test. Perhaps something like the following is what

Re: reading a line in file

2007-08-20 Thread Tim Williams
On 20/08/07, Brian McCann [EMAIL PROTECTED] wrote: Shawn, Tim ,Jay many thanks, It looks like there are many ways this problem can be approached either by using regex or a tokens Tim I'm not familiar with your solution, but will learn about that method also Hi Brian, buildNum =

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-20 Thread Albert Y. C. Lai
Twisted wrote: A link to a copy in a non-toxic format would be nice. http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EWD1298.html -- http://mail.python.org/mailman/listinfo/python-list

GeneratorExit should derive from BaseException, not Exception

2007-08-20 Thread Chad Austin
Hi all, First, I'd like to describe a system that we've built here at IMVU in order to manage the complexity of our network- and UI-heavy application: Our application is a standard Windows desktop application, with the main thread pumping Windows messages as fast as they become available. On

Re: Newbee Question

2007-08-20 Thread hd1956
On Aug 20, 11:06 am, [EMAIL PROTECTED] wrote: On Aug 20, 9:58 am, Shawn Milochik [EMAIL PROTECTED] wrote: On 8/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 20, 9:23 am, HD1956 [EMAIL PROTECTED] wrote: This is probably a simple code. I am a truck driver who gets paid by

Re: Overriding Thread.join in derived class.

2007-08-20 Thread Graham Dumpleton
On Aug 20, 5:40 am, Gabriel Genellina [EMAIL PROTECTED] wrote: On 18 ago, 04:31, Graham Dumpleton [EMAIL PROTECTED] wrote: If one creates a thread using threading.Thread and makes it a daemon by calling setDaemon(), then when Python is exiting it will not attempt to call join() on that

Re: Any advice on ways for sharing a small Python application with the world?

2007-08-20 Thread Bjoern Schliessmann
Bert Heymans wrote: does anyone know of other ways to share something that might just be too small for a sourceforge project but too big to be a snippet? You could submit it to http://pypi.python.org/. Regards, Björn -- BOFH excuse #271: The kernel license has expired --

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-20 Thread Bikal KC
Ingo Menger wrote: On 20 Aug., 01:56, Xah Lee [EMAIL PROTECTED] wrote: (for you math illiterates out there: ... (for you mathematicians out there: ... Please, Xah Lee, could you possibly stop to explain things that are absolutely trivial? If somebody has doubts about the etymology of a

Re: Where we need to use Python ?

2007-08-20 Thread Dustan
On Aug 20, 10:13 am, Wildemar Wildenburger [EMAIL PROTECTED] wrote: Michael Bentley wrote: On Aug 20, 2007, at 1:02 AM, [EMAIL PROTECTED] wrote: And Is it a interpreted language or a programming language It comes in which category I very keen to know this please tell [ open on

wx.Frame event handler problems

2007-08-20 Thread nrmn
i have a function (event handler) inside a wx.Frame subclass which reads 2 kinds of data (differentiated by a prefix char) from a file and updates the text on the UI. def onStartParsing(self, event): file = open('data.txt','r') while 1: input =

Syslog

2007-08-20 Thread greg
Hi All, Could anyone tell me how I could syslog to a specific log (e.g. /var/ log/daemon.log, /var/log/syslog.log...)? Thanks very much in advance! -Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbee Question

2007-08-20 Thread James Stroud
[EMAIL PROTECTED] wrote: On Aug 20, 11:06 am, [EMAIL PROTECTED] wrote: On Aug 20, 9:58 am, Shawn Milochik [EMAIL PROTECTED] wrote: On 8/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 20, 9:23 am, HD1956 [EMAIL PROTECTED] wrote: This is probably a simple code. I am a truck

Re: Latest models of Gibson guitars

2007-08-20 Thread Twisted
On Aug 20, 8:05 am, Lew [EMAIL PROTECTED] wrote: Twisted wrote: On Aug 19, 2:41 pm, [EMAIL PROTECTED] wrote: This is a newsgroup of programming language Python, stop with this! Python?! Python is as off-topic here as guitars, unlike, say, Java... When referring to this newsgroup or

Retrieving a variable's name.

2007-08-20 Thread rodrigo
How would I go about retrieving a variable's name (not its value)? I want to write a function that, given a list of variables, returns a string with each variable's name and its value, like: a: 100 b: 200 I get the feeling this is trivial, but I have been unable to find an answer on my own.

Re: str().join() isn't working

2007-08-20 Thread Asun Friere
On Aug 21, 4:34 am, [EMAIL PROTECTED] wrote: to concatenate 2 lists to each other before it does the join, ... is impossible in Python. The + operator is only for addition and for two or more strings. Really? [1,2,3] + [4,5,6] [1, 2, 3, 4, 5, 6] --

Re: What does this thread have to do with classical music,

2007-08-20 Thread Art Deco
ah [EMAIL PROTECTED] wrote: Art Deco wrote: ah [EMAIL PROTECTED] wrote: Art Deco wrote: ah [EMAIL PROTECTED] wrote: Art Deco wrote: ah [EMAIL PROTECTED] wrote: Art Deco wrote: ah [EMAIL PROTECTED] wrote: Art Deco wrote: ah [EMAIL PROTECTED] wrote: Art Deco wrote: Who wrote? What does

Re: str().join() isn't working

2007-08-20 Thread John Machin
On Aug 21, 4:34 am, [EMAIL PROTECTED] wrote: In your statement, your script tries to concatenate 2 lists to each other before it does the join, which is impossible in Python. The + operator is only for addition and for two or more strings. Not so; the + operator is for *any* class which has

Is there a way to change the default string encoding?

2007-08-20 Thread Ron Garret
Is there a way to change the default string encoding used by the string.encode() method? My default environment is utf-8 but I need it to be latin-1 to avoid errors like this: 'Andr\xe9 Ramel'.decode() Traceback (most recent call last): File stdin, line 1, in module

Re: Any advice on ways for sharing a small Python application with the world?

2007-08-20 Thread Pablo Torres
On Aug 20, 4:59 pm, Bert Heymans [EMAIL PROTECTED] wrote: Hi, I made a Python cli application for resizing batches of images based on the PIL. You can find it herehttp://heymans.org/pyresize.html It's just an straight forward command line interface application but I guess many people would

Python project solicitation

2007-08-20 Thread JoeSox
Hello All, I was wondering if anyone would be interested in improving a module I quickly hacked together this past Sunday: pswrdgen.py It is a semantic password generator that uses WordNet 2.1, random capitalization, and character swapping. http://code.google.com/p/pswrdgen/ I must say this

Re: Retrieving a variable's name.

2007-08-20 Thread Gabriel Genellina
On 20 ago, 22:03, rodrigo [EMAIL PROTECTED] wrote: How would I go about retrieving a variable's name (not its value)? I want to write a function that, given a list of variables, returns a string with each variable's name and its value, like: a: 100 b: 200 I get the feeling this is

Re: GeneratorExit should derive from BaseException, not Exception

2007-08-20 Thread Terry Reedy
Chad Austin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] || try: | result = yield chatGateway.checkForInvite({'userId': userId}) | logger.info('checkForInvite2 returned %s', result) would not except GeneratorExit: do whatever solve your problem? | except Exception: Such catchalls

Re: Retrieving a variable's name.

2007-08-20 Thread Evan Klitzke
On 8/20/07, rodrigo [EMAIL PROTECTED] wrote: How would I go about retrieving a variable's name (not its value)? I want to write a function that, given a list of variables, returns a string with each variable's name and its value, like: a: 100 b: 200 Let me preface my response by saying

Re: Pattern for error checking easiest-first?

2007-08-20 Thread Gabriel Genellina
On 20 ago, 18:01, [EMAIL PROTECTED] wrote: The problem is that code like this does error checking backwards. A call to NetworkedThing.changeMe will first do a slow error check and then a fast one. Obviously there are various ways to get around this - either have the subclass explicitly ask

Re: str().join() isn't working

2007-08-20 Thread Terry Reedy
Robert Dailey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Yeah! That's it lol. Sorry, I wasn't looking at the documentation. At least | you got the point! But newbies might not have. In any case, 'dir(list)' in interactive mode prints the list methods and similarly for other

Re: mode parameter in popen2-4

2007-08-20 Thread Gabriel Genellina
On 20 ago, 17:26, Tobiah [EMAIL PROTECTED] wrote: In the popen docs, a file like object is returned, and may be read to or written to depending on the 'mode' parameter ('r', or 'w'). Why is the mode parameter needed for popen2 and greater, when both a stdin and stdout object is returned?

Re: Retrieving a variable's name.

2007-08-20 Thread Paul Rubin
rodrigo [EMAIL PROTECTED] writes: How would I go about retrieving a variable's name (not its value)? I want to write a function that, given a list of variables, returns a string with each variable's name and its value, like: a: 100 b: 200 I get the feeling this is trivial, but I have

Re: Retrieving a variable's name.

2007-08-20 Thread Evan Klitzke
On 8/20/07, Evan Klitzke [EMAIL PROTECTED] wrote: On 8/20/07, rodrigo [EMAIL PROTECTED] wrote: How would I go about retrieving a variable's name (not its value)? I want to write a function that, given a list of variables, returns a string with each variable's name and its value, like:

Re: Syslog

2007-08-20 Thread Hamish Moffatt
greg wrote: Could anyone tell me how I could syslog to a specific log (e.g. /var/ log/daemon.log, /var/log/syslog.log...)? Thanks very much in advance! It's up to your syslogd to route messages into particular files, based on their facility and/or priority. Check out /etc/syslog.conf or

Re: Retrieving a variable's name.

2007-08-20 Thread James Stroud
rodrigo wrote: How would I go about retrieving a variable's name (not its value)? I want to write a function that, given a list of variables, returns a string with each variable's name and its value, like: a: 100 b: 200 I get the feeling this is trivial, but I have been unable to find

wxpython thread exception crash

2007-08-20 Thread [david]
What am I doing wrong? I'm trying to capture stdErr in a multi-threaded program. This code crashes wxPython with /Py Assertion Error: C++ assertion m_count=-1 || m_count=-2 failed/ What I'm trying to do is redirect stderr and stdout to a wxPython text control. In an ideal world, when the worker

File Read Cache - How to purge?

2007-08-20 Thread Signal
To become part of a larger script that will read through all files on a given drive, I was playing around with reading files and wanted to see if there was an optimum value for a read size on my system. What I noticed is that the file being read is cached on subsequent reads. Based on some

Re: wxpython thread exception crash

2007-08-20 Thread Stephen Hansen
On 8/20/07, [david] [EMAIL PROTECTED] wrote: What am I doing wrong? I'm trying to capture stdErr in a multi-threaded program. You can't reliably access the GUI anywhere except in the main thread; you're printing to stderr from the worker thread, and thus its writing to the GUI control, and

Adjusting the names of custom exceptions (since raising strings is deprecated)

2007-08-20 Thread Silfheed
Heyas So this probably highlights my lack of understanding of how naming works in python, but I'm currently using FailUnlessRaises in a unit test and raising exceptions with a string exception. It's working pretty well, except that I get the deprecation warning that raising a string exception is

Re: Newbie question about a web server

2007-08-20 Thread I V
On Mon, 20 Aug 2007 00:02:47 -0700, Frank Millman wrote: When responding to the POST data received, it sends a 301 response, no headers, and then the html page. [...] According to the notes, You don't have to know much about the HTTP protocol at all. Except some basic that when the client

<    1   2   3   >