The Python Papers Volue 2 Issue 1 now available

2007-02-21 Thread [EMAIL PROTECTED]
G'day Pythonistas! Welcome to Issue Two of The Python Papers. It has been an exciting time and we are pleased to have reached this milestone. I'd like to say a big hello to all the people who have provided their input in making this a reality: the python-advocacy list, comp.lang.python, the Python

ANN: IbPy 0.7.0-9.00 - Interactive Brokers Python API

2007-02-21 Thread Troy Melhase
IbPy - Interactive Brokers Python API = IbPy 0.7.0-9.00 Released 21 Feb 2007 What is IbPy? -- IbPy is a third-party implementation of the API used for accessing the Interactive Brokers

New GSM/GPRS board with Python interpreter

2007-02-21 Thread massimo . battisti
Area SX has released a new board based on a GSM/GPRS/GPS engine with embedded Python interpreter. The board features input and output lines, RS232 serial line, debug serial line, backup battery and much more. This board allows you to build a remote SMS or GPRS control or positioning system using

Reading compressed files

2007-02-21 Thread Shadab Sayani
Hi, I have compressed files compressed using different techniques (especially unix compress). So I want to have a module that reads any of these (.Z,.bz,.tgz files) files and manipulates the data. The data has a syntax.It contains HEADER (some information) BODY (some information)

Re: Regex Speed

2007-02-21 Thread Pop User
[EMAIL PROTECTED] wrote: While creating a log parser for fairly large logs, we have run into an issue where the time to process was relatively unacceptable (upwards of 5 minutes for 1-2 million lines of logs). In contrast, using the Linux tool grep would complete the same search in a matter of

BDFL in wikipedia

2007-02-21 Thread Jorge Vargas
Hi I just hit this page in wikipedia BDFL[1] and it redirected me to Guido's wikipedia[2] entry now without causing any troubles (read flamewar) shouldn't a) that page have an explanation of what BDFL is b) shouldn't it mention Linus, Larry Wall, others?[3] c) for the ones that have been around

Re: Python 3.0 unfit for serious work?

2007-02-21 Thread Steven D'Aprano
On Tue, 20 Feb 2007 21:19:26 -0800, John Nagle wrote: Well, something faster really should take over. It's a bit embarassing that the main implementation of Python is still a pure interpreter. Even Javascript has a JIT compiler now. And it's tiny, under 1MB. Python has a compiler,

Re: eval('000052') = 42?

2007-02-21 Thread Laurent Pointal
Astan Chee a écrit : Hi, I just tried to do eval('00052') and it returned 42. Is this a known bug in the eval function? Or have I missed the way eval function works? Thanks Ad Erik replied, a literal value beginning by 0 is interpreted as an octal value (and beginning by 0x it is

Re: BDFL in wikipedia

2007-02-21 Thread Andrew McNamara
Hi I just hit this page in wikipedia BDFL[1] and it redirected me to Guido's wikipedia[2] entry now without causing any troubles (read flamewar) shouldn't a) that page have an explanation of what BDFL is b) shouldn't it mention Linus, Larry Wall, others?[3] c) for the ones that have been around

Re: Regex Speed

2007-02-21 Thread John Machin
On Feb 21, 12:14 pm, Pop User [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: While creating a log parser for fairly large logs, we have run into an issue where the time to process was relatively unacceptable (upwards of 5 minutes for 1-2 million lines of logs). In contrast, using the

Re: converting u'11\xa022' to '11\xa022'

2007-02-21 Thread Laurent Pointal
Gabriel Genellina a écrit : En Wed, 21 Feb 2007 00:31:32 -0300, alf [EMAIL PROTECTED] escribió: 2-list of supported encodings? I don't know how to query the list, except by reading the documentation for the codecs module. from encodings import aliases aliases.aliases {'iso_ir_6':

Re: converting u'11\xa022' to '11\xa022'

2007-02-21 Thread Gabriel Genellina
En Wed, 21 Feb 2007 06:24:55 -0300, Laurent Pointal [EMAIL PROTECTED] escribió: Gabriel Genellina a écrit : En Wed, 21 Feb 2007 00:31:32 -0300, alf [EMAIL PROTECTED] escribió: 2-list of supported encodings? I don't know how to query the list, except by reading the documentation for

Re: ipython shortcut to reload modules

2007-02-21 Thread Greenberg
[EMAIL PROTECTED] wrote: Hey! I'm using ipython as my python shell and often run scripts with the magic command %run: In [1]: %run script.py If modules are loaded within the script these are not reloaded when I rerun the script. Hence, when I changed some of the modules loaded, I have

Re: BDFL in wikipedia

2007-02-21 Thread Gabriel Genellina
En Wed, 21 Feb 2007 05:28:30 -0300, Andrew McNamara [EMAIL PROTECTED] escribió: Hi I just hit this page in wikipedia BDFL[1] and it redirected me to Guido's wikipedia[2] entry [1] http://en.wikipedia.org/wiki/BDFL I suspect, in this case, the redirect is implicit. It's happening because

Re: Weird result returned from adding floats depending on order I add them

2007-02-21 Thread Steve Holden
joanne matthews (RRes-Roth) wrote: I'm getting different results when I add up a list of floats depending on the order that I list the floats. For example, the following returns False: def check(): totalProp=0 inputs=[0.2,0.2,0.2,0.1,0.2,0,0.1] for each in inputs:

Re: Reading compressed files

2007-02-21 Thread Steve Holden
Shadab Sayani wrote: Hi, I have compressed files compressed using different techniques (especially unix compress). So I want to have a module that reads any of these (.Z,.bz,.tgz files) files and manipulates the data. The data has a syntax.It contains HEADER (some information) BODY

Re: BDFL in wikipedia

2007-02-21 Thread Carl Banks
On Feb 20, 9:27 pm, Jorge Vargas [EMAIL PROTECTED] wrote: Hi I just hit this page in wikipedia BDFL[1] and it redirected me to Guido's wikipedia[2] entry now without causing any troubles (read flamewar) shouldn't a) that page have an explanation of what BDFL is b) shouldn't it mention

Re: Sorting directory contents

2007-02-21 Thread Wolfgang Draxinger
Tim Williams wrote: Are you running on windows? No. Of course I could use some installed tool, like ls, but I want a portable solution. HTH :) Not really. Windows is only a niche for desktop systems. In my case the python script is running on a heterogenous grid monitoring system accessing a

Re: eval('000052') = 42?

2007-02-21 Thread André Malo
Astan Chee wrote: Hi, I just tried to do eval('00052') and it returned 42. Is this a known bug in the eval function? Or have I missed the way eval function works? You know, it's just the answer to the ultimate question of Life, the universe, and everything. SCNR, nd --

Re: Weird result returned from adding floats depending on order I add them

2007-02-21 Thread Rhamphoryncus
On Feb 20, 6:08 am, John Machin [EMAIL PROTECTED] wrote: for x in b: ...tot += x ...print repr(x), repr(tot) ... 0.20001 0.20001 0.20001 0.40002 0.20001 0.60009 0.20001 0.80004

Re: eval('000052') = 42?

2007-02-21 Thread Bart Ogryczak
On Feb 21, 5:09 am, Astan Chee [EMAIL PROTECTED] wrote: Hi, I just tried to do eval('00052') and it returned 42. Is this a known bug in the eval function? Or have I missed the way eval function works? It works just fine. Read up on integer literals. 52 #decimal 52 052 #octal 42 0x52

Re: Sorting directory contents

2007-02-21 Thread Peter Otten
Wolfgang Draxinger wrote: I got, hmm not really a problem, more a question of elegance: In a current project I have to read in some files in a given directory in chronological order, so that I can concatenate the contents in those files into a new one (it's XML and I have to concatenate

Re: BDFL in wikipedia

2007-02-21 Thread Steven D'Aprano
On Wed, 21 Feb 2007 02:25:44 -0800, Carl Banks wrote: a) that page have an explanation of what BDFL is b) shouldn't it mention Linus, Larry Wall, others?[3] Since when is Larry Wall benevolent? He should be called the SDFL. :) I can't think what the S stands for... if it was M, I'd say

Re: BDFL in wikipedia

2007-02-21 Thread Robin Becker
Carl Banks wrote: .. Since when is Larry Wall benevolent? He should be called the SDFL. . even the great leader has been referred to as the MDFL :) most language designers get to do it once and then recognize the result as either beneficial or otherwise. The alternative is a

Performance project for the SigEx Foundry

2007-02-21 Thread pablo
have been testing performances of different scripting languages fordatabase access, text processing and client application data transfer. So far, I am getting better performance from PHP, but I don't have any hard data to back it up compared to others. This is a large project for the SigEx

Re: Sorting directory contents

2007-02-21 Thread Jussi Salmela
Larry Bates kirjoitti: Wolfgang Draxinger wrote: Jussi Salmela wrote: I'm not claiming the following to be more elegant, but I would do it like this (not tested!): src_file_paths = dict() prefix = sourcedir + os.sep for fname in os.listdir(sourcedir): if match_fname_pattern(fname):

Re: eval('000052') = 42?

2007-02-21 Thread Neil Cerutti
On 2007-02-21, André Malo [EMAIL PROTECTED] wrote: Astan Chee wrote: Hi, I just tried to do eval('00052') and it returned 42. Is this a known bug in the eval function? Or have I missed the way eval function works? You know, it's just the answer to the ultimate question of Life, the

Re: f---ing typechecking

2007-02-21 Thread Neil Cerutti
On 2007-02-21, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Nick Craig-Wood [EMAIL PROTECTED] wrote: Ie x += a does not equal x = x + a which it really should for all types of x and a One would hope so , yes. However, I think that the first form is supposed to update in

Re: PLY for standard library

2007-02-21 Thread Jakub Stolarski
On 20 Lut, 19:29, Alan Isaac [EMAIL PROTECTED] wrote: If not, what module providing substantially similar functionality is? AFAIK there's no parser generator module in standard library. I would like to see PLY in standard library too. -- Jakub Stolarski --

metaclasses (beginner question)

2007-02-21 Thread Laszlo Nagy
Hello, I would like to create a hierarchy classes, where the leaves have a special attribute called producer_id. In addition, I would like to have a function that can give me back the class assigned to any producer_id value. I tried to implement this with a metaclass, but I failed. Please

Re: metaclasses (beginner question)

2007-02-21 Thread Peter Otten
Laszlo Nagy wrote: I would like to create a hierarchy classes, where the leaves have a special attribute called producer_id. In addition, I would like to have a function that can give me back the class assigned to any producer_id value. I tried to implement this with a metaclass, but I

Replacement for GnomeDateEdit?

2007-02-21 Thread Thomas Bollmeier
Hi, I'm currently designing a dialog using pygtk/Glade. One of the attributes to be edited is a date. I tried to use the GnomeDateEdit widget that is available among the widgets in glade. Unfortunately the time-property only allows me to use timestamps for dates = January 1st 1970. Since the date

Tkinter checkbuttons and variables

2007-02-21 Thread Gigs_
from Tkinter import * states = [] def onpress(i): states[i] = not states[i] root = Tk() for i in range(10): chk = Checkbutton(root, text= str(i), command=lambda i=i: onpress(i)) chk.pack(side=LEFT) states.append(0) root.mainloop() print states after exiting i get

Re: Tkinter checkbuttons and variables

2007-02-21 Thread Diez B. Roggisch
Gigs_ schrieb: from Tkinter import * states = [] def onpress(i): states[i] = not states[i] root = Tk() for i in range(10): chk = Checkbutton(root, text= str(i), command=lambda i=i: onpress(i)) chk.pack(side=LEFT) states.append(0) root.mainloop() print states

Re: Tkinter checkbuttons and variables

2007-02-21 Thread Eric Brunel
On Wed, 21 Feb 2007 15:50:57 +0100, Gigs_ [EMAIL PROTECTED] wrote: from Tkinter import * states = [] def onpress(i): states[i] = not states[i] root = Tk() for i in range(10): chk = Checkbutton(root, text= str(i), command=lambda i=i: onpress(i)) chk.pack(side=LEFT)

Re: metaclasses (beginner question)

2007-02-21 Thread Laszlo Nagy
Without looking into the details -- the (subclass of) type is meant to be the class of the class, or the other way round, your normal classes are instances of (a subclass of) type. You determine the factory Python uses to make a class by adding __metaclass__ = factory to the class body,

Re: builtin set literal

2007-02-21 Thread Dave Opstad
In article [EMAIL PROTECTED], Paul Rubin http://[EMAIL PROTECTED] wrote: [...] However, Python seems to use the -ed suffix for the non-mutating versions of these functions, e.g. sorted(list) instead of the mutating list.sort(). I've found this to be useful in my own Python libraries.

Re: starship.python.net is down

2007-02-21 Thread Matthew . Cahn
Hi, Any news on starship.python.net? It still seems to be down. Matthew On Feb 16, 8:57 am, Tom Bryan [EMAIL PROTECTED] wrote: One of the system administrators had to reboot starship.python.net last night, but it appears that the machine did not come back up properly. starship.python.net is

Question about updating in a GUI

2007-02-21 Thread Gheorghe Postelnicu
Hi, I have a GUI which does some visualization based on VTK and Tkinter. The problem I have is kinda complicated to describe, but here is a sketch of it: I have a basic Observer pattern in place for events (such as the change current 2D slice visualized) and it generally works well. However, I

Creating a daemon process in Python

2007-02-21 Thread Sakagami Hiroki
Hi, What is the easiest way to create a daemon process in Python? Google says I should call fork() and other system calls manually, but is there no os.daemon() and the like? Regards, -- Sakagami Hiroki -- http://mail.python.org/mailman/listinfo/python-list

Re: getting a thread out of sleep

2007-02-21 Thread mark
On 20 Feb 2007 21:26:18 -0800, placid [EMAIL PROTECTED] wrote: On Feb 21, 4:21 pm, placid [EMAIL PROTECTED] wrote: On Feb 21, 4:12 pm, mark [EMAIL PROTECTED] wrote: On 20 Feb 2007 20:47:57 -0800, placid [EMAIL PROTECTED] wrote: On Feb 21, 3:08 pm, mark [EMAIL PROTECTED] wrote: Right

Re: Creating a daemon process in Python

2007-02-21 Thread Benjamin Niemann
Hello, Sakagami Hiroki wrote: What is the easiest way to create a daemon process in Python? Google says I should call fork() and other system calls manually, but is there no os.daemon() and the like? You could try http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 HTH --

Re: Creating a daemon process in Python

2007-02-21 Thread Eirikur Hallgrimsson
Sakagami Hiroki wrote: Hi, What is the easiest way to create a daemon process in Python? I find that this works great. I just pasted my copy, I think you can find it via Google. Eirikur # Daemon Module - basic facilities for becoming a daemon process # By Coy Krill # Combines ideas from

Re: BDFL in wikipedia

2007-02-21 Thread Toby A Inkster
Steven D'Aprano wrote: Carl Banks wrote: Since when is Larry Wall benevolent? He should be called the SDFL. I can't think what the S stands for... if it was M, I'd say Malevolent, but S? Scented, Sexy, Spanish... no, probably not those. I assume Sadistic. -- Toby A Inkster BSc (Hons)

Re: BDFL in wikipedia

2007-02-21 Thread Toby A Inkster
Jorge Vargas wrote: shouldn't it mention Linus, Larry Wall, others?[3] Despite the link you posted, I don't think Linus, Larry Wall, Rasmus Lerdorf, etc describe themselves as BDFLs, even if they fulfil similar roles within their respective development communities. -- Toby A Inkster BSc

Re: Regex Speed

2007-02-21 Thread Pop User
John Machin wrote: Or a Glushkov NFA simulated by bit parallelism re module ... see http://citeseer.ist.psu.edu/551772.html (which Russ Cox (author of the paper you cited) seems not to have read). NR-grep looks interesting, I'll read that. Thanks. Cox uses a pathological regex (regex = a?

network simulator in Python ?

2007-02-21 Thread DanielJohnson
I was wondering if anyblody can suggest me a network simulator written in python in which I can add on my own code and extend its functionality. I am looking for a simulator which will simualte TCP, UDP, RTP and most networking protocol. The learning curve for ns2 and other simulator is too high

Re: f---ing typechecking

2007-02-21 Thread Nick Craig-Wood
Delaney, Timothy (Tim) [EMAIL PROTECTED] wrote: Nick Craig-Wood wrote: x += a does not equal x = x + a which it really should for all types of x and a Actually, this will *never* be the case for classes that do in-place augmented assignment. a = [1]

Re: Regex Speed

2007-02-21 Thread garrickp
On Feb 20, 6:14 pm, Pop User [EMAIL PROTECTED] wrote: Its very hard to beat grep depending on the nature of the regex you are searching using. The regex engines in python/perl/php/ruby have traded the speed of grep/awk for the ability to do more complex searches.

Re: Weird result returned from adding floats depending on order I add them

2007-02-21 Thread Miki
Hello Joanne, ... [float problem] ... I get True returned. Can anyone tell me whats going on and how I can avoid the problem. Thanks If you want to be truly accurate, you can use gmpy.mpq (http:// gmpy.sourceforge.net/). a = [0.2, 0.2, 0.2, 0.1, 0.2, 0.1] b = [0.2, 0.2, 0.2, 0.2, 0.1, 0.1]

Re: Reading compressed files

2007-02-21 Thread Jordan
On Feb 21, 5:21 am, Steve Holden [EMAIL PROTECTED] wrote: Shadab Sayani wrote: Hi, I have compressed files compressed using different techniques (especially unix compress). So I want to have a module that reads any of these (.Z,.bz,.tgz files) files and manipulates the data. The data

Converting a text data file from positional to tab delimited.

2007-02-21 Thread Zeljko Sikic
Hi, You should try www.TextMaster.ca http://www.textmaster.ca/ and download SW which can convert text file from fix positioned to TAB delimited or any other text format. Regards, Jake -- http://mail.python.org/mailman/listinfo/python-list

datetime - easy way to make it use local timezone?

2007-02-21 Thread bwooster47
Is there an easy way to have an automatically constructed local time zone tzinfo object be used with datetime? Following code shows the problem - the time module works fine mostly (%Z works, but %z does not, but that may be the way it is), uses # The following python code outputs: note the

Re: Performance project for the SigEx Foundry

2007-02-21 Thread bearophileHUGS
Pablo: I am looking for articles/studies/benchmarks on the subject. It's not easy to test that, you need to be equally expert on all the languages to test them. This may be a starting point for you: http://shootout.alioth.debian.org/ Bye, bearophile --

Re: Python 3.0 unfit for serious work?

2007-02-21 Thread Aahz
In article [EMAIL PROTECTED], Jay Tee [EMAIL PROTECTED] wrote: If backwards compatibility is not a consideration, then it would be a miracle if there were no problems. Backwards compatibility is a consideration AND there will be problems. That is, the goal of 3.0 is to lower the priority of

Re: Python 3.0 unfit for serious work?

2007-02-21 Thread olsongt
On Feb 20, 9:04 pm, Jeff Templon [EMAIL PROTECTED] wrote: yo, Bjorn, I am not sure I see why my post is bull crap. I think all you are doing is agreeing with me. My post was entitled Python 3.0 unfit for serious work, you just indicated that the Linux distros will agree with me, in order

Re: builtin set literal

2007-02-21 Thread bearophileHUGS
Steven Bethard: take a look at the current state of tuples: 1, 2 1, () That's not a good situation. I presume the situation/syntax of tuples in Python 2.x can't be improved. But can it be improved for Py 3.0? Notes: - I think in Matlab a single element is seen as the same thing as an

Re: builtin set literal

2007-02-21 Thread Steven Bethard
[EMAIL PROTECTED] wrote: Steven Bethard: take a look at the current state of tuples: 1, 2 1, () That's not a good situation. I presume the situation/syntax of tuples in Python 2.x can't be improved. But can it be improved for Py 3.0? I'm not really losing any sleep over the

Re: Regex Speed

2007-02-21 Thread Kirk Sluder
In article [EMAIL PROTECTED], John Machin [EMAIL PROTECTED] wrote: Getting back to the It would be nice ... bit: yes, it would be nice to have even more smarts in re, but who's going to do it? It's not a rainy Sunday afternoon job :-) Well, just as an idea, there is a portable C library for

Re: eval('000052') = 42?

2007-02-21 Thread Roger Miller
On Feb 20, 7:37 pm, John Machin [EMAIL PROTECTED] wrote: On Feb 21, 3:09 pm, Astan Chee [EMAIL PROTECTED] wrote: Hi, I just tried to do eval('00052') and it returned 42. Is this a known bug in the eval function? Or have I missed the way eval function works? Thanks Eight fives are

Re: PLY for standard library

2007-02-21 Thread Paul McGuire
On Feb 21, 7:02 am, Jakub Stolarski [EMAIL PROTECTED] wrote: On 20 Lut, 19:29, Alan Isaac [EMAIL PROTECTED] wrote: If not, what module providing substantially similar functionality is? AFAIK there's no parser generator module in standard library. I would like to see PLY in standard library

Debug Build of Python

2007-02-21 Thread Mark E. Fenner
Hi all, Just curious how to get an all bells and whistles debug build of python. In the source for 2.4.3, I see the following debug related options: From README: (1) e.g. make OPT=-g will build a debugging version of Python on most platforms (2) Additional debugging code to help debug memory

Re: Python 3.0 unfit for serious work?

2007-02-21 Thread Jay Tee
On Feb 21, 8:06 pm, [EMAIL PROTECTED] wrote: I don't know the specifics of your app, but why does everyone insist that they need to use the 'system' python? Hey Grant, don't worry it's not a rant. A completely valid question. Again it's a problem of dependency management ... one of the things

Re: wxPython: non-GUI thread launching new frame? Delegates?

2007-02-21 Thread cyberco
Oh boyI must have hit an all time programmers-low with this That was plain stupid. 2B You don't need the lambda - you can use: wx.CallAfter(parent.OnRequest, param) -- http://mail.python.org/mailman/listinfo/python-list

FloatCanvas in a wxpython application.... layout problems

2007-02-21 Thread nelson -
Hi all, i'm developing an application that uses Floatcanvas to diplay a cartesian plane. how can i embed it into a complex layout? I have this controls MENUS TOOLBAR NOTEBOOK FLOATCANVAS PYSHELL The problem is that i can show all the components but i can't insert the floatcanvas in the right

[Ann] PyGooCanvas 0.6.0

2007-02-21 Thread Gian Mario Tagliaretti
I am pleased to announce version 0.6.0 of the Python bindings for Goocanvas. It is available at: https://developer.berlios.de/projects/pygoocanvas/ The bindings are updated with the new Goocanvas API PyGooCanvas 0.6.0 (Feb 19 2007) = o Rename and implement latest API

Re: Creating a daemon process in Python

2007-02-21 Thread garrickp
On Feb 21, 9:33 am, Eirikur Hallgrimsson [EMAIL PROTECTED] wrote: Sakagami Hiroki wrote: What is the easiest way to create a daemon process in Python? I've found it even easier to use the built in threading modules: import time t1 = time.time() print t_poc.py called at, t1 import threading

Re: Python 3.0 unfit for serious work?

2007-02-21 Thread [EMAIL PROTECTED]
On Feb 21, 1:44 pm, [EMAIL PROTECTED] (Aahz) wrote: Note that I believe it will be many years, perhaps even a decade, before python on a Unix system starts up Python 3.0. That's a pretty safe bet considering that the factory-installed python on my Linux system is still 1.x and you run python2

Question about classes and possible closure.

2007-02-21 Thread Steven W. Orr
This is all an intro learning experience for me, so please feel free to explain why what I'm trying to do is not a good idea. In the Cookbook, they have a recipe for how to create global constants. - class _const: class ConstError(TypeError): pass def

Re: Creating a daemon process in Python

2007-02-21 Thread Benjamin Niemann
[EMAIL PROTECTED] wrote: On Feb 21, 9:33 am, Eirikur Hallgrimsson [EMAIL PROTECTED] wrote: Sakagami Hiroki wrote: What is the easiest way to create a daemon process in Python? I've found it even easier to use the built in threading modules: import time t1 = time.time() print

Re: BDFL in wikipedia

2007-02-21 Thread Jorge Vargas
On 2/21/07, Andrew McNamara [EMAIL PROTECTED] wrote: Hi I just hit this page in wikipedia BDFL[1] and it redirected me to Guido's wikipedia[2] entry now without causing any troubles (read flamewar) shouldn't a) that page have an explanation of what BDFL is b) shouldn't it mention Linus,

Re: BDFL in wikipedia

2007-02-21 Thread Jorge Vargas
On 2/21/07, Toby A Inkster [EMAIL PROTECTED] wrote: Jorge Vargas wrote: shouldn't it mention Linus, Larry Wall, others?[3] Despite the link you posted, I don't think Linus, Larry Wall, Rasmus Lerdorf, etc describe themselves as BDFLs, even if they fulfil similar roles within their

Re: BDFL in wikipedia

2007-02-21 Thread Jorge Vargas
On 2/21/07, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 21 Feb 2007 05:28:30 -0300, Andrew McNamara [EMAIL PROTECTED] escribió: Hi I just hit this page in wikipedia BDFL[1] and it redirected me to Guido's wikipedia[2] entry [1] http://en.wikipedia.org/wiki/BDFL I suspect, in

Re: getting a thread out of sleep

2007-02-21 Thread placid
On Feb 22, 3:23 am, mark [EMAIL PROTECTED] wrote: On 20 Feb 2007 21:26:18 -0800, placid [EMAIL PROTECTED] wrote: On Feb 21, 4:21 pm, placid [EMAIL PROTECTED] wrote: On Feb 21, 4:12 pm, mark [EMAIL PROTECTED] wrote: On 20 Feb 2007 20:47:57 -0800, placid [EMAIL PROTECTED] wrote: On

Re: CherryPy/Turbogears on server not controlled by me

2007-02-21 Thread Jorge Vargas
On 2/20/07, Brian Blais [EMAIL PROTECTED] wrote: Hello, I was wondering if there is a way to run CherryPy/Turbogears on a server that I don't have root access to. I have never run ANY webapp as root. you should follow that advice. in fact don't run any server as root. If I just choose a

Re: Creating a daemon process in Python

2007-02-21 Thread garrickp
On Feb 21, 3:34 pm, Benjamin Niemann [EMAIL PROTECTED] wrote: That's not a daemon process (which are used to execute 'background services' in UNIX environments). I had not tested this by running the script directly, and in writing a response, I found out that the entire interpreter closed when

ANN: IbPy 0.7.0-9.00 - Interactive Brokers Python API

2007-02-21 Thread Troy Melhase
IbPy - Interactive Brokers Python API = IbPy 0.7.0-9.00 Released 21 Feb 2007 What is IbPy? -- IbPy is a third-party implementation of the API used for accessing the Interactive Brokers

pexpect regex help

2007-02-21 Thread jonathan . sabo
I have a pexpect script to walk through a cisco terminal server and I was hoping to get some help with this regex because I really suck at it. This is the code: index = s.expect(['login: ', pexpect.EOF, pexpect.TIMEOUT]) if index == 0: m =

Re: pexpect regex help

2007-02-21 Thread jonathan . sabo
On Feb 21, 6:13 pm, [EMAIL PROTECTED] wrote: I have a pexpect script to walk through a cisco terminal server and I was hoping to get some help with this regex because I really suck at it. This is the code: index = s.expect(['login: ', pexpect.EOF, pexpect.TIMEOUT]) if index

Re: getting a thread out of sleep

2007-02-21 Thread mark
On 21 Feb 2007 14:47:50 -0800, placid [EMAIL PROTECTED] wrote: On Feb 22, 3:23 am, mark [EMAIL PROTECTED] wrote: On 20 Feb 2007 21:26:18 -0800, placid [EMAIL PROTECTED] wrote: On Feb 21, 4:21 pm, placid [EMAIL PROTECTED] wrote: On Feb 21, 4:12 pm, mark [EMAIL PROTECTED] wrote:

RE: f---ing typechecking

2007-02-21 Thread Delaney, Timothy (Tim)
Nick Craig-Wood wrote: Which appears to support my point, x (and a for that matter) are the same for both methods wheter you do x = x + a or x += a. The mechanism is different certainly, but the result should be the same otherwise you are breaking the basic rules of arithmetic the

Re: Question about classes and possible closure.

2007-02-21 Thread Dustan
On Feb 21, 4:30 pm, Steven W. Orr [EMAIL PROTECTED] wrote: This is all an intro learning experience for me, so please feel free to explain why what I'm trying to do is not a good idea. In the Cookbook, they have a recipe for how to create global constants. - class _const:

Re: network simulator in Python ?

2007-02-21 Thread [EMAIL PROTECTED]
On Feb 21, 12:26 pm, DanielJohnson [EMAIL PROTECTED] wrote: I was wondering if anyblody can suggest me a network simulator written in python in which I can add on my own code and extend its functionality. I am looking for a simulator which will simualte TCP, UDP, RTP and most networking

Convert to binary and convert back to strings

2007-02-21 Thread Harlin Seritt
Hi... I would like to take a string like 'supercalifragilisticexpialidocius' and write it to a file in binary forms -- this way a user cannot read the string in case they were try to open in something like ascii text editor. I'd also like to be able to read the binary formed data back into string

Re: Convert to binary and convert back to strings

2007-02-21 Thread Colin J. Williams
Harlin Seritt wrote: Hi... I would like to take a string like 'supercalifragilisticexpialidocius' and write it to a file in binary forms -- this way a user cannot read the string in case they were try to open in something like ascii text editor. I'd also like to be able to read the binary

jython import search path

2007-02-21 Thread Russ
I have a Python program that I want to run in Jython so I can get Java bytecode output. The program runs fine in Python, but when I change the first line of the main program to make it run in Jython, it fails to find some of the imported modules. These are just plain Python imports of code I wrote

Re: getting a thread out of sleep

2007-02-21 Thread placid
On Feb 22, 10:20 am, mark [EMAIL PROTECTED] wrote: On 21 Feb 2007 14:47:50 -0800, placid [EMAIL PROTECTED] wrote: On Feb 22, 3:23 am, mark [EMAIL PROTECTED] wrote: On 20 Feb 2007 21:26:18 -0800, placid [EMAIL PROTECTED] wrote: On Feb 21, 4:21 pm, placid [EMAIL PROTECTED] wrote:

Re: Convert to binary and convert back to strings

2007-02-21 Thread Grant Edwards
On 2007-02-21, Harlin Seritt [EMAIL PROTECTED] wrote: I would like to take a string like 'supercalifragilisticexpialidocius' and write it to a file in binary forms -- this way a user cannot read the string in case they were try to open in something like ascii text editor. Why wouldn't they

Re: Convert to binary and convert back to strings

2007-02-21 Thread Larry Bates
Harlin Seritt wrote: Hi... I would like to take a string like 'supercalifragilisticexpialidocius' and write it to a file in binary forms -- this way a user cannot read the string in case they were try to open in something like ascii text editor. I'd also like to be able to read the binary

Re: jython import search path

2007-02-21 Thread Larry Bates
Russ wrote: I have a Python program that I want to run in Jython so I can get Java bytecode output. The program runs fine in Python, but when I change the first line of the main program to make it run in Jython, it fails to find some of the imported modules. These are just plain Python

Re: Convert to binary and convert back to strings

2007-02-21 Thread Harlin Seritt
On Feb 21, 7:02 pm, Colin J. Williams [EMAIL PROTECTED] wrote: Harlin Seritt wrote: Hi... I would like to take a string like 'supercalifragilisticexpialidocius' and write it to a file in binary forms -- this way a user cannot read the string in case they were try to open in something

Which Crypto Library?

2007-02-21 Thread GiBo
Hi I need some encryption done in my Python 2.5 application. I wonder what's the most recommended library? I've found M2crypto and some OpenSSL wrappers and Python Cryptography Toolkit and some others. No surprise I'm confused :-) What's the most often used library for crypto? For now I need a

Re: Convert to binary and convert back to strings

2007-02-21 Thread Harlin Seritt
On Feb 21, 7:12 pm, Larry Bates [EMAIL PROTECTED] wrote: Harlin Seritt wrote: Hi... I would like to take a string like 'supercalifragilisticexpialidocius' and write it to a file in binary forms -- this way a user cannot read the string in case they were try to open in something like

Re: jython import search path

2007-02-21 Thread Russ
On Feb 21, 4:15 pm, Larry Bates [EMAIL PROTECTED] wrote: Russ wrote: I have a Python program that I want to run in Jython so I can get Java bytecode output. The program runs fine in Python, but when I change the first line of the main program to make it run in Jython, it fails to find

Re: getting a thread out of sleep

2007-02-21 Thread mark
On 21 Feb 2007 16:10:51 -0800, placid [EMAIL PROTECTED] wrote: On Feb 22, 10:20 am, mark [EMAIL PROTECTED] wrote: On 21 Feb 2007 14:47:50 -0800, placid [EMAIL PROTECTED] wrote: On Feb 22, 3:23 am, mark [EMAIL PROTECTED] wrote: On 20 Feb 2007 21:26:18 -0800, placid [EMAIL PROTECTED]

Re: Convert to binary and convert back to strings

2007-02-21 Thread [EMAIL PROTECTED]
On Feb 21, 5:50 pm, Harlin Seritt [EMAIL PROTECTED] wrote: Hi... I would like to take a string like 'supercalifragilisticexpialidocius' and write it to a file in binary forms -- this way a user cannot read the string in case they were try to open in something like ascii text editor. I'd also

guess file type in python

2007-02-21 Thread mark
Is there any way to guess the file type using python? thanks mark For example in unix: file code.py code.py: a python script text executable file Eccentric.gif Eccentric.gif: GIF image data, version 89a, 237 x 277 -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Crypto Library?

2007-02-21 Thread James Stroud
GiBo wrote: Hi I need some encryption done in my Python 2.5 application. I wonder what's the most recommended library? I've found M2crypto and some OpenSSL wrappers and Python Cryptography Toolkit and some others. No surprise I'm confused :-) What's the most often used library for

Bug in time module - %z works in perl, not in python?

2007-02-21 Thread bwooster47
Following python code prints out incorrect UTC Offset - the python docs say that %z is not fully supported on all platforms - but on Linux Fedora FC5, perl code works and python does not - is this a bug or is this expected behavior? For a EST timezone setup, Perl prints correct -0500, while Python

Re: Convert to binary and convert back to strings

2007-02-21 Thread Grant Edwards
On 2007-02-22, Harlin Seritt [EMAIL PROTECTED] wrote: Try opening your file in the 'wb' mode. I tried doing this: text = 'supercalifragilisticexpialidocius' open('sambleb.conf', 'wb').write(text) Afterwards, I was able to successfully open the file with a text editor and it showed:

  1   2   >