Re: Is there any Generic RSS/ATOM generator in Python?

2008-02-11 Thread Stefan Behnel
js wrote: I'm looking for RSS/ATOM generator I can use in Python. I searched on pypi and the other places but I couldn't find any options on this. (I found many parsers, though) Is there any de-fact standard RSS/ATOM generator? (especially, I'd like to create Atom's) Do I have to do it

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Dotan Cohen
On 11/02/2008, Grant Edwards [EMAIL PROTECTED] wrote: On 2008-02-11, Steve Holden [EMAIL PROTECTED] wrote: Well the history of physics for at least two hundred years has been a migration away from the intuitive. Starting at least as far back as Newtonian mechanics. I once read a very

Re: regarding html source code

2008-02-11 Thread subeen
Another way: import urllib2 usock = urllib2.urlopen('http://abc.com') data = usock.read() usock.close() print data On Feb 12, 12:05 am, Stefan Behnel [EMAIL PROTECTED] wrote: Hi, shashank jain top-posted: On Feb 11, 2008 11:15 PM, Stefan Behnel [EMAIL PROTECTED] wrote: jainshasha

Re: wxpython file dialog

2008-02-11 Thread Guilherme Polo
2008/2/11, Mike Driscoll [EMAIL PROTECTED]: On Feb 10, 6:41 am, Janwillem [EMAIL PROTECTED] wrote: Guilherme Polo wrote: 2008/2/10, Janwillem [EMAIL PROTECTED]: Guilherme Polo wrote: 2008/2/9, Janwillem [EMAIL PROTECTED]: Is there a way to force the wx.FileDialog to show as

Re: how to find current working user

2008-02-11 Thread Chris Mellon
On Feb 11, 2008 12:30 PM, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 11 Feb 2008 15:21:16 -0200, Praveena Boppudi (c) [EMAIL PROTECTED] escribi�: Can anyone tell me how to find current working user in windows? If it is just informational, use os.environ['USERNAME'] Using win32wnet

Re: Help with jabber client in wx

2008-02-11 Thread Jarek Zgoda
Astan Chee pisze: A quick note, the project started as a google talk client, but it seems that xmpppy is flexible enough to support various other/similar XMPP servers, but I mainly use with/in google talk It is open source and I've included the windows executable as an optional download.

Encrypting a short string?

2008-02-11 Thread erikcw
Hi, I'm trying to devise a scheme to encrypt/obfuscate a short string that basically contains the user's username and record number from the database. I'm using this encrypted string to identify emails from a user. (the string will be in the subject line of the email). I'm trying to figure out

Re: Encrypting a short string?

2008-02-11 Thread Paul Rubin
erikcw [EMAIL PROTECTED] writes: database. I'm using this encrypted string to identify emails from a user. (the string will be in the subject line of the email). 1. I hope you're not trying to spam anyone. 2. What happens if the user edits the subject line? I'm trying to figure out which

Python-URL! - weekly Python news and links (Feb 11)

2008-02-11 Thread Gabriel Genellina
QOTW: And don't EVER make the mistake that you can design something better than what you get from ruthless massively parallel trial-and-error with a feedback cycle. That's giving your intelligence _much_ too much credit. - Linus Torvalds

Re: Pure Python Salsa20 Stream Cipher Implementation

2008-02-11 Thread Aahz
In article [EMAIL PROTECTED], Paul Rubin http://[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Aahz) writes: shrug Is there some reason you're using exaggerated language? My only point is that simply saying C compiler! C compiler! ignores the fact that Python itself is multi-platform (and

Re: Topographical sorting

2008-02-11 Thread Frank Niessink
Hi John, 2008/2/11, John [EMAIL PROTECTED]: Now, on to my problem. Topographical sorting essentially involves removing the minimal element in a set (1), and then arbitrarily choosing the next minimal element and removing it as well. So, after removing 1, one could remove 5, then 2, then 3,

Re: Better way to do this?

2008-02-11 Thread Diez B. Roggisch
PRC schrieb: Hi folks, I have a tuple of tuples, in the form-- ((code1, 'string1'),(code2, 'string2'),(code3, 'string3'),) Codes are unique. A dict would probably be the best approach but this is beyond my control. Here is an example: pets = ((0,'cat'),(1,'dog'),(2,'mouse')) If I

AttributeError: 'module' object has no attribute 'letters'

2008-02-11 Thread black_13
what does this error mean? i am trying to use mark hammonds win32 package. Traceback (most recent call last): File aui2.py, line 11, in module import win32com.client File C:\Python25\lib\site-packages\win32com\client\__init__.py, line 12, in module import dynamic, gencache, pythoncom

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Jeff Schwab wrote: Erik Max Francis wrote: Robert Bossy wrote: I'm pretty sure we can still hear educated people say that free fall speed depends on the weight of the object without realizing it's a double mistake. Well, you have to qualify it better than this, because what you've

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Grant Edwards wrote: On 2008-02-09, Thomas Dybdahl Ahle [EMAIL PROTECTED] wrote: Quantum mechanics are closely related to philosophy. I've never understood that claim. You can philosophize about anything: biology, math, weather, the stars, the moon, and so on. I don't see how QM is any

Re: AttributeError: 'module' object has no attribute 'letters'

2008-02-11 Thread Ben Finney
black_13 [EMAIL PROTECTED] writes: what does this error mean? [...] valid_identifier_chars = string.letters + string.digits + _ AttributeError: 'module' object has no attribute 'letters' It means that you're trying to access the attribute 'letters' on a module that doesn't have that

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Steven D'Aprano wrote: On Mon, 11 Feb 2008 19:54:30 +1300, greg wrote: Until DeBroglie formulated its hypothesis of dual nature of matter (and light): wave and particle at the same time. Really it's neither waves nor particles, but something else for which there isn't a good word in

Re: Better way to do this?

2008-02-11 Thread Carl Banks
On Feb 11, 3:57 pm, imho [EMAIL PROTECTED] wrote: PRC ha scritto: Hi folks, I have a tuple of tuples, in the form-- ((code1, 'string1'),(code2, 'string2'),(code3, 'string3'),) Codes are unique. A dict would probably be the best approach but this is beyond my control. Here is an

Re: which one is more efficient

2008-02-11 Thread Steven D'Aprano
On Mon, 11 Feb 2008 10:41:44 -0500, Steve Holden wrote: If the type variable really is a type, of course, then the real solution is hardly radical: stop using the names of types and start using the types: [snip example using type(obj) in (type1, type2)] But if you're using actual types, you

Re: Encrypting a short string?

2008-02-11 Thread Carl Banks
On Feb 11, 4:19 pm, erikcw [EMAIL PROTECTED] wrote: On Feb 11, 4:07 pm, [EMAIL PROTECTED] wrote: erikcw napisal(a): But that can't be reversed, right? I'd like to be able to decrypt the data instead of having to store the hash in my database... In such case it seems you have no choice

Re: Encrypting a short string?

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 19:19:00 -0200, erikcw [EMAIL PROTECTED] escribió: In essence what I'm doing is trying to manage tickets for a helpdesk. I want the ticket identifier to be short enough to fit in the subject line along with the normal subject chosen by the user. So cryptographic

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Jeff Schwab
Erik Max Francis wrote: Robert Bossy wrote: Grant Edwards wrote: After repeated attempts at the tasks set for them in the experiments, the subjects would learn strategies that would work in a Newtonian world, but the initial intuitive reactions were very non-Newtonian (regardless of how

Re: Encrypting a short string?

2008-02-11 Thread marek . rocki
erikcw napisal(a): But that can't be reversed, right? I'd like to be able to decrypt the data instead of having to store the hash in my database... In such case it seems you have no choice but to use a symmetric encryption algorithm - in other words, your original method. If the strings are ~20

Sending Python statement over socket in chunks

2008-02-11 Thread Jeffrey Barish
I have a python module that contains an assignment statement binding a long list of things to a name: list_of_things = [thing1, thing2, ...] where each thing instantiates class Thing when executed. I send this statement through a socket to a remote module that executes it. The problem is that

Re: Better way to do this?

2008-02-11 Thread Tim Chase
I have a tuple of tuples, in the form-- ((code1, 'string1'),(code2, 'string2'),(code3, 'string3'),) Codes are unique. A dict would probably be the best approach but this is beyond my control. Here is an example: pets = ((0,'cat'),(1,'dog'),(2,'mouse')) If I am given a value for the

Re: Encrypting a short string?

2008-02-11 Thread erikcw
On Feb 11, 3:07 pm, [EMAIL PROTECTED] wrote: erikcw napisal(a): Hi, I'm trying to devise a scheme to encrypt/obfuscate a short string that basically contains the user's username and record number from the database. I'm using this encrypted string to identify emails from a user.

Re: Encrypting a short string?

2008-02-11 Thread marek . rocki
erikcw napisal(a): Hi, I'm trying to devise a scheme to encrypt/obfuscate a short string that basically contains the user's username and record number from the database. I'm using this encrypted string to identify emails from a user. (the string will be in the subject line of the email).

Re: Tkinter equiv for setPalette

2008-02-11 Thread Russell E. Owen
In article [EMAIL PROTECTED], Helmut Jarausch [EMAIL PROTECTED] wrote: Hi, I am to convert an old Perl-Tk script to Python. It starts by my $MW= new MainWindow; $MW-setPalette(background = 'AntiqueWhite1', foreground = 'blue'); Is there an equivalent for Tkinter? How can I set default

Re: Pure Python Salsa20 Stream Cipher Implementation

2008-02-11 Thread Paul Rubin
[EMAIL PROTECTED] (Aahz) writes: shrug Is there some reason you're using exaggerated language? My only point is that simply saying C compiler! C compiler! ignores the fact that Python itself is multi-platform (and makes you look foolish); whether any given module should be written in pure

Re: how to find current working user

2008-02-11 Thread Tim Chase
Can anyone tell me how to find current working user in windows? The below should be fairly cross-platform: import getpass whoami = getpass.getuser() print whoami W: tchase L: tim (W: is the result on my windows box, L: is the result on my Linux box) which can be used in concert

Re: Pure Python Salsa20 Stream Cipher Implementation

2008-02-11 Thread Aahz
In article [EMAIL PROTECTED], Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 09 Feb 2008 20:29:58 -0200, Aahz [EMAIL PROTECTED] escribió: In article [EMAIL PROTECTED], Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 09 Feb 2008 01:34:30 -0200, [EMAIL PROTECTED] escribió: On 8 Feb.,

Re: Python equivt of __FILE__ and __LINE__

2008-02-11 Thread thebjorn
On Feb 11, 4:55 pm, Gary Herron [EMAIL PROTECTED] wrote: Bill Davy wrote: Writing a quick and dirty assembler and want to give the user the location of an error. The assembly language is Python. If the user wants to generat some object code they write something like: Label(LoopLable)

Re: wxpython file dialog

2008-02-11 Thread Mike Driscoll
On Feb 11, 2008 12:14 PM, Guilherme Polo [EMAIL PROTECTED] wrote: 2008/2/11, Mike Driscoll [EMAIL PROTECTED]: On Feb 10, 6:41 am, Janwillem [EMAIL PROTECTED] wrote: Guilherme Polo wrote: 2008/2/10, Janwillem [EMAIL PROTECTED]: Guilherme Polo wrote: 2008/2/9, Janwillem [EMAIL

Re: CSV Reader

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 14:41:54 -0200, Mike P [EMAIL PROTECTED] escribi�: CSV_Data = open(working_CSV) data = CSV_Data.readlines() flag=False for record in data: if record.startswith('Transaction ID'): [...] Files are already iterable by lines. There is no need to use readlines(),

Re: Plotting 3d points

2008-02-11 Thread Rasmus Kjeldsen
Elby skrev: Matplotlib as some 3D capabilities too. You can have a look at these examples : http://scipy.org/Cookbook/Matplotlib/mplot3D I got the cookbook examples to work, but where do I read more into what i can do with mplot3d (set type of marker, set size of marker etc.)? A google

Re: Difficulty with inconsistent use of tabs and spaces in indentation in file called string

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 13:34:17 -0200, ibloom [EMAIL PROTECTED] escribi�: I've been trying for a couple days to build a program using pyObjC on a mac, I'm stuck on this error: string: inconsistent use of tabs and spaces in indentation Traceback (most recent call last): File setup.py, line

regarding html source code

2008-02-11 Thread jainshasha
hello friends well i want to create a program which can read my html based coding or any other web page code so i want to know how python can help me in this regard so anyone have ay idea about this thing please reply soon Thanks In Advance --

how to find current working user

2008-02-11 Thread Praveena Boppudi (c)
Hi, Can anyone tell me how to find current working user in windows? Thanks, Praveena. -- http://mail.python.org/mailman/listinfo/python-list

python25_d.lib?

2008-02-11 Thread Robert Dailey
Hi, Currently I'm embedding Python 2.5 into my C++ Visual Studio project. However, during the link stage it is stating that it cannot find python25_d.lib. From what I read in my search through Google on this issue is that you actually have to build Python yourself to get a debug version of the

RE: CSV Reader

2008-02-11 Thread Reedick, Andrew
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of Mike P Sent: Monday, February 11, 2008 11:42 AM To: python-list@python.org Subject: Re: CSV Reader Cheers for the help, the second way looked to be the best in the end, and thanks for the

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Jeff Schwab
Erik Max Francis wrote: Jeff Schwab wrote: Erik Max Francis wrote: Robert Bossy wrote: I'm pretty sure we can still hear educated people say that free fall speed depends on the weight of the object without realizing it's a double mistake. Well, you have to qualify it better than this,

Re: CSV Reader

2008-02-11 Thread Mike P
Cheers for the help, the second way looked to be the best in the end, and thanks for the boolean idea Mike working_CSV = //filer/common/technical/Research/E2C/Template_CSV/ DFAExposureToConversionQueryTool.csv save_file = open(//filer/common/technical/Research/E2C/Template_CSV/

RE: CSV Reader

2008-02-11 Thread Reedick, Andrew
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of Mike P Sent: Monday, February 11, 2008 11:10 AM To: python-list@python.org Subject: Re: CSV Reader Hi Larry, i'm still getting to grips with python, but rest assured i thinkn it's better

Re: How can I kill CGIHTTPServer ?

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 04:18:04 -0200, eching [EMAIL PROTECTED] escribi�: I'm running CGIHTTPServer with the serve_forever method and I cannot get the darn thing to stop unless I kill the command prompt its running in. I searched for similar posts here and found this: See this thread from

Re: Difficulty with inconsistent use of tabs and spaces in indentation in file called string

2008-02-11 Thread [EMAIL PROTECTED]
On Feb 11, 9:34 am, ibloom [EMAIL PROTECTED] wrote: I've been trying for a couple days to build a program using pyObjC on a mac, I'm stuck on this error: string: inconsistent use of tabs and spaces in indentation Traceback (most recent call last):   File setup.py, line 59, in ?    

Re: use 'with' to redirect stdout

2008-02-11 Thread Jean-Paul Calderone
On Mon, 11 Feb 2008 10:37:18 -0500, Neal Becker [EMAIL PROTECTED] wrote: This will work for stdout: from __future__ import with_statement from contextlib import contextmanager import sys @contextmanager def redirect(newfile): orig_stdout = sys.stdout sys.stdout = newfile yield

Re: CSV Reader

2008-02-11 Thread Larry Bates
Mike P wrote: Hi All, I want to read in a CSV file, but then write out a new CSV file from a given line.. I'm using the CSV reader and have the the line where i want to start writing the new file from begins with Transaction ID, i thought it should be something along the lines of

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Dotan Cohen
On 09/02/2008, Ron Provost [EMAIL PROTECTED] wrote: The division between philosophy and science can be fine indeed. Philosophy and science are the two rigorous methods of inquiry into the fundamental nature of things (other methods include religion and superstition). Because of it's

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Dotan Cohen
On 09/02/2008, Ron Provost [EMAIL PROTECTED] wrote: The division between philosophy and science can be fine indeed. Philosophy and science are the two rigorous methods of inquiry into the fundamental nature of things (other methods include religion and superstition). Because of it's

Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]

2008-02-11 Thread Lou Pecora
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Feb 8, 2:53?pm, Lou Pecora [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], ?Grant Edwards [EMAIL PROTECTED] wrote: On 2008-02-08, Dennis Lee Bieber [EMAIL PROTECTED] wrote: ? ? ? A Parsec is a

Re: which one is more efficient

2008-02-11 Thread Steve Holden
Bruno Desthuilliers wrote: Paul Rubin a écrit : ki lo wrote: I have type variable which may have been set to 'D' or 'E' Now, which one of following statements are more efficient if type =='D' or type == 'E': or if re.search(D|E, type): Please let me know because the function is going

CSV Reader

2008-02-11 Thread Mike P
Hi All, I want to read in a CSV file, but then write out a new CSV file from a given line.. I'm using the CSV reader and have the the line where i want to start writing the new file from begins with Transaction ID, i thought it should be something along the lines of below.. obvioulsy this

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Steve Holden
greg wrote: Gabriel Genellina wrote: Before the famous Michelson-Morley experiment (end of s. XIX), some physicists would have said light propagates over ether, some kind of matter that fills the whole space but has no measurable mass, but the experiment failed to show any evidence of

Re: How can I kill CGIHTTPServer ?

2008-02-11 Thread Steve Holden
eching wrote: I'm running CGIHTTPServer with the serve_forever method and I cannot get the darn thing to stop unless I kill the command prompt its running in. I searched for similar posts here and found this:

Hai...

2008-02-11 Thread Manikandan R
Hai, I am working in Python scripting. I an need to find out all the device connected in the network. Just I planned to broad cast the ping address and use the ARP table to get the IP address of the system in the network. As, I am working in Win XP i am not able to use ping -b command to broad

Is there any Generic RSS/ATOM generator in Python?

2008-02-11 Thread js
Hi, I'm looking for RSS/ATOM generator I can use in Python. I searched on pypi and the other places but I couldn't find any options on this. (I found many parsers, though) Is there any de-fact standard RSS/ATOM generator? (especially, I'd like to create Atom's) Do I have to do it myself from

Re: use 'with' to redirect stdout

2008-02-11 Thread Neal Becker
Jean-Paul Calderone wrote: On Mon, 11 Feb 2008 09:15:07 -0500, Neal Becker [EMAIL PROTECTED] wrote: Is there a simple way to use a 'with' statement to redirect stdout in a block? Do you mean without writing a context manager to do the redirection? I mean, whatever is the simplest

Re: ANN: pyparsing 1.4.11 released

2008-02-11 Thread Paul McGuire
On Feb 11, 3:44 am, [EMAIL PROTECTED] wrote: Maybe you can use the in instead of ==, meaning that a certain string conforms to a certain pattern, that defines an implicit class of possibilities, so with the in you look if the string is present in that class of acceptable patterns, instead of

use 'with' to redirect stdout

2008-02-11 Thread Neal Becker
Is there a simple way to use a 'with' statement to redirect stdout in a block? -- http://mail.python.org/mailman/listinfo/python-list

CGI with URL problem

2008-02-11 Thread rodmc
-- sorry if this has shown up twice, but my browser crashed and ended up posting the message when I hit the space bar for some odd reason. Also it was not quite ready. Hi, I am writing a small CGI app which tests if another webpage exists, the pages are on a Wiki system. Anyway when I run the

Re: Is there a web visitor counter available in Python ...

2008-02-11 Thread Jon Fluffy Saul
On Feb 11, 2008 9:21 PM, W. Watson [EMAIL PROTECTED] wrote: ... that is free for use without advertising that I can use on my web pages? I have no idea is suitable for this. My knowledge of Python is somewhat minimal at this point. Maybe Java is better choice. --

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Steve Holden wrote: Well the history of physics for at least two hundred years has been a migration away from the intuitive. In strict linguistic terms the word subatomic is a fine oxymoron. I suspect it's really turtles all the way down. Well, hard to say that's been a monotonic pattern.

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Robert Bossy wrote: Grant Edwards wrote: After repeated attempts at the tasks set for them in the experiments, the subjects would learn strategies that would work in a Newtonian world, but the initial intuitive reactions were very non-Newtonian (regardless of how educated they were in

Re: Encrypting a short string?

2008-02-11 Thread Martin Marcher
Hi, On 2/11/08, erikcw [EMAIL PROTECTED] wrote: In essence what I'm doing is trying to manage tickets for a helpdesk. I want the ticket identifier to be short enough to fit in the subject line along with the normal subject chosen by the user. So cryptographic security isn't really important.

Re: Pure Python Salsa20 Stream Cipher Implementation

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 17:29:49 -0200, Aahz [EMAIL PROTECTED] escribió: In article [EMAIL PROTECTED], Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 09 Feb 2008 20:29:58 -0200, Aahz [EMAIL PROTECTED] escribió: In article [EMAIL PROTECTED], Gabriel Genellina [EMAIL PROTECTED] wrote: En

Re: Encrypting a short string?

2008-02-11 Thread erikcw
On Feb 11, 4:07 pm, [EMAIL PROTECTED] wrote: erikcw napisal(a): But that can't be reversed, right? I'd like to be able to decrypt the data instead of having to store the hash in my database... In such case it seems you have no choice but to use a symmetric encryption algorithm - in other

Re: Getting a Foothold on the IDLE Debugger

2008-02-11 Thread W. Watson
How about that! Thanks. An odd way to do it, but IDLE is suitably odd with respect to its namesake. BTW, what's with the close and exit options on the File menu? They both dump me out of IDLE. Odd. Any idea of whether I can glue the File-?Open to a particular folder? Any other similar

Re: Is there a web visitor counter available in Python ...

2008-02-11 Thread W. Watson
PHP. Well, that's a new one on me. Google gave me some idea of what it's about, and I found some code on how to do it. It requires yet another programming language, which means finding the editor, etc. Jon Fluffy Saul wrote: On Feb 11, 2008 9:21 PM, W. Watson [EMAIL PROTECTED] wrote: ... that

Re: Getting a Foothold on the IDLE Debugger

2008-02-11 Thread [EMAIL PROTECTED]
On Feb 11, 11:15�pm, W. Watson [EMAIL PROTECTED] wrote: I thought I try to step through some simple Python code I wrote with IDLE using Debug. I'm at the early stages of learning Python. I used the shell to Run, then clicked on Debug-Debugger. That brought up a window with Stack and Locals

Possible to tack on random stuff to objects?

2008-02-11 Thread Cruxic
Is it possible to tack on arbitrary attributes to a python object? For example: s = 'nice 2 meet you' s.isFriendly = True In the above example Python complains on the second line with: AttributeError: 'str' object has no attribute 'isFriendly' Is there another way? --

Re: Sending Python statement over socket in chunks

2008-02-11 Thread Diez B. Roggisch
Jeffrey Barish schrieb: I have a python module that contains an assignment statement binding a long list of things to a name: list_of_things = [thing1, thing2, ...] where each thing instantiates class Thing when executed. I send this statement through a socket to a remote module that

Re: Is there a web visitor counter available in Python ...

2008-02-11 Thread Matt Nordhoff
W. Watson wrote: ... that is free for use without advertising that I can use on my web pages? I have no idea is suitable for this. My knowledge of Python is somewhat minimal at this point. Maybe Java is better choice. You can analyze your web logs. That's more accurate than a hit counter,

Re: How can I kill CGIHTTPServer ?

2008-02-11 Thread eching
On Feb 11, 10:24 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 11 Feb 2008 04:18:04 -0200, eching [EMAIL PROTECTED] escribi�: I'm running CGIHTTPServer with the serve_forever method and I cannot get the darn thing to stop unless I kill the command prompt its running in. I

Better way to do this?

2008-02-11 Thread PRC
Hi folks, I have a tuple of tuples, in the form-- ((code1, 'string1'),(code2, 'string2'),(code3, 'string3'),) Codes are unique. A dict would probably be the best approach but this is beyond my control. Here is an example: pets = ((0,'cat'),(1,'dog'),(2,'mouse')) If I am given a value for the

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Jeff Schwab wrote: Erik Max Francis wrote: Grant Edwards wrote: On 2008-02-12, Jeff Schwab [EMAIL PROTECTED] wrote: Fair enough! Dear me, what's Usenet coming to these days... I know, really. Sheesh! Jeff, I won't stand for that! Argue with me! :-) OK, uh... You're a

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Jeff Schwab
Erik Max Francis wrote: Grant Edwards wrote: On 2008-02-12, Jeff Schwab [EMAIL PROTECTED] wrote: Fair enough! Dear me, what's Usenet coming to these days... I know, really. Sheesh! Jeff, I won't stand for that! Argue with me! :-) OK, uh... You're a poopy-head. Forgive the

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Grant Edwards wrote: On 2008-02-12, Jeff Schwab [EMAIL PROTECTED] wrote: Fair enough! Dear me, what's Usenet coming to these days... I know, really. Sheesh! Jeff, I won't stand for that! Argue with me! :-) -- Erik Max Francis [EMAIL PROTECTED] http://www.alcyone.com/max/ San Jose,

Re: wxpython file dialog

2008-02-11 Thread Guilherme Polo
2008/2/11, Mike Driscoll [EMAIL PROTECTED]: On Feb 11, 2008 12:14 PM, Guilherme Polo [EMAIL PROTECTED] wrote: 2008/2/11, Mike Driscoll [EMAIL PROTECTED]: On Feb 10, 6:41 am, Janwillem [EMAIL PROTECTED] wrote: Guilherme Polo wrote: 2008/2/10, Janwillem [EMAIL PROTECTED]:

Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]

2008-02-11 Thread Jeff Schwab
Grant Edwards wrote: On 2008-02-10, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ? ? ? A Parsec is a fixed value (which, admittedly, presumes the culture developed a 360degree circle broken into degrees = minutes = seconds... or, at least, some units compatible with the concept of an arc

Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]

2008-02-11 Thread Grant Edwards
On 2008-02-10, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ? ? ? A Parsec is a fixed value (which, admittedly, presumes the culture developed a 360degree circle broken into degrees = minutes = seconds... or, at least, some units compatible with the concept of an arc second, like 400 grads of,

Re: regarding html source code

2008-02-11 Thread Stefan Behnel
Hi, shashank jain top-posted: On Feb 11, 2008 11:15 PM, Stefan Behnel [EMAIL PROTECTED] wrote: jainshasha wrote: well i have create a program which can read out the html source code files or any other web page source code files through my program so Like this? from lxml import html

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Grant Edwards
On 2008-02-12, Jeff Schwab [EMAIL PROTECTED] wrote: Erik Max Francis wrote: Jeff Schwab wrote: So what's the double mistake? My understanding was (1) the misuse (ok, vernacular use) of the term free fall, and (2) the association of weight with free-fall velocity (If I tie an elephant's

Re: regarding html source code

2008-02-11 Thread Stefan Behnel
jainshasha wrote: well i have create a program which can read out the html source code files or any other web page source code files through my program so Like this? from lxml import html page = html.parse(http://www.google.com;) print page.find(//title).text Google

Re: Difficulty with inconsistent use of tabs and spaces in indentation in file called string

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 21:57:00 -0200, ibloom [EMAIL PROTECTED] escribió: My main problem is, I don't know where to find the file: File string, line 628 As in I don't know what code it is refering to by string ?? It isn't code that I wrote, its something from python or pyObjC Mmm, didn't you

Re: How to broad cast ping address.......

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 13:31:56 -0200, Manikandan R [EMAIL PROTECTED] escribi�: I am working in Python scripting. I an need to find out all the device connected in the network. Just I planned to broad cast the ping address and use the ARP table to get the IP address of the system in

regarding html source code

2008-02-11 Thread jainshasha
hello friends well i have create a program which can read out the html source code files or any other web page source code files through my program so please guys help me out in this problem that how python can help me in this regard and if there is any other language through which i can easily

Re: wxpython file dialog

2008-02-11 Thread Mike Driscoll
On Feb 10, 6:41 am, Janwillem [EMAIL PROTECTED] wrote: Guilherme Polo wrote: 2008/2/10, Janwillem [EMAIL PROTECTED]: Guilherme Polo wrote: 2008/2/9, Janwillem [EMAIL PROTECTED]: Is there a way to force the wx.FileDialog to show as default the thumbnails vie in stead of list view?

Re: Difficulty with inconsistent use of tabs and spaces in indentation in file called string

2008-02-11 Thread Steve Holden
ibloom wrote: My main problem is, I don't know where to find the file: File string, line 628 As in I don't know what code it is refering to by string ?? It isn't code that I wrote, its something from python or pyObjC You'll typically see that in code that's being executed from a

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-11 Thread Erik Max Francis
Jeff Schwab wrote: So what's the double mistake? My understanding was (1) the misuse (ok, vernacular use) of the term free fall, and (2) the association of weight with free-fall velocity (If I tie an elephant's tail to a mouse's, and drop them both into free fall, will the mouse slow the

Re: How to broad cast ping address.......

2008-02-11 Thread Steve Holden
Gabriel Genellina wrote: En Mon, 11 Feb 2008 13:31:56 -0200, Manikandan R [EMAIL PROTECTED] escribi�: I am working in Python scripting. I an need to find out all the device connected in the network. Just I planned to broad cast the ping address and use the ARP table to get the

Re: mmap and shared memory

2008-02-11 Thread Carl Banks
On Feb 11, 6:41 pm, Matias Surdi [EMAIL PROTECTED] wrote: Suppose I've a process P1, which generates itself a lot of data , for example 2Mb. Then, I've a process P2 which must access P1 shared memory and, probably, modify this data. To accomplish this, I've been digging around python's mmap

Re: CSV Reader

2008-02-11 Thread Mike P
Hi Larry, i'm still getting to grips with python, but rest assured i thinkn it's better for me to write hte code for learnign purposes My basic file is here, it comes up with a syntax error on the startswith line, is this because it is potentially a list? My idea was to get the lines number

Re: Help to translate simple VBA code to Python

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 04:15:34 -0200, Alexandr N Zamaraev [EMAIL PROTECTED] escribi�: I use Bentley MicroStation through Automation interface. But I do not known how translate some VBA code to Python. Look for the book Python programming for Win32, by Mark Hammond and Andy Robinson. (The

Re: Python equivt of __FILE__ and __LINE__

2008-02-11 Thread Gary Herron
Bill Davy wrote: Writing a quick and dirty assembler and want to give the user the location of an error. The assembly language is Python. If the user wants to generat some object code they write something like: Label(LoopLable) Load(R4) Dec() JNZ(LoopLabel) I can use

Re: AttributeError: 'module' object has no attribute 'letters'

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 21:33:25 -0200, John Machin [EMAIL PROTECTED] escribió: Otherwise run python from the command line with the -v option and find where it's getting the interloper string module from. interloper: my new word of the day. Thanks! PS: Another way would be to run the script

Difficulty with inconsistent use of tabs and spaces in indentation in file called string

2008-02-11 Thread ibloom
I've been trying for a couple days to build a program using pyObjC on a mac, I'm stuck on this error: string: inconsistent use of tabs and spaces in indentation Traceback (most recent call last): File setup.py, line 59, in ? setup(**setup_options) File

Re: packing greyscale values

2008-02-11 Thread jimgardener
Are you sure the lists you give belong to the same image? the greyvalues list was printed out by python script on a 3X4 sampleimage i made to check this im=Image.open(mypicgrey.jpg) pixels=im.getdata() for pix in pixels: print pix whereas the integers in the second list were from java code

Re: Difficulty with inconsistent use of tabs and spaces in indentation in file called string

2008-02-11 Thread ibloom
My main problem is, I don't know where to find the file: File string, line 628 As in I don't know what code it is refering to by string ?? It isn't code that I wrote, its something from python or pyObjC Ian Bloom -- http://mail.python.org/mailman/listinfo/python-list

Re: use 'with' to redirect stdout

2008-02-11 Thread Neal Becker
Thanks! I understand this better now. This is really an example of a more general pattern: @contextmanager def rebind_attr(object_, attr, value): orig = getattr(object_, attr) setattr(object_, attr, value) yield setattr(object_, attr_, orig) --

Re: translating Python to Assembler

2008-02-11 Thread thebjorn
On Jan 27, 12:23 pm, [EMAIL PROTECTED] wrote: me: go troll somewhere else (you obviously don't know anything about assembler and don't want to learn anything about Python). -- bjorn before you start mouthing off, maybe you should learn assembler. I suppose I shouldn't feed the trolls... but

  1   2   >