Re: "Mail receiver server"

2005-01-31 Thread manatlan
Mitja a écrit : On Mon, 31 Jan 2005 23:23:46 +0100, manatlan <[EMAIL PROTECTED]> wrote: in fact, i'd like to control "computer A" by sending smtp email from "computer B". What kind of server should i write on computer "B", a smtp server ? a pop server ? It would be easier if you used an ex

Re: Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Steve Holden
Aahz wrote: In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: Note that the sort order isn't perfect - I just sorted on the second "word" in each name. PyCon is a *great* place to meet people and discuss ideas. Hope to see you there. Good thing I'm not coming this year, eh

Re: [perl-python] find & replace strings for all files in a dir

2005-01-31 Thread YYusenet
Xah Lee wrote: suppose you want to do find & replace of string of all files in a directory. here's the code: [snip] Xah [EMAIL PROTECTED] http://xahlee.org/PageTwo_dir/more.html When are you going to take the hint (from everybody in comp.lang.perl.misc and comp.lang.python) to stop posting! Yo

Re: msvcp71.dll and Python 2.4 C++ extensions

2005-01-31 Thread "Martin v. Löwis"
Matthias Baas wrote: are there any guidelines about what to do if a Windows extension for Python 2.4 requires the C++ runtime (msvcp71.dll)? No; it should "just work fine". The standard guidelines apply, of course: never try to mix different versions of similar DLLs. If I want to distribute a bin

Re: Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Stephen Thorne
On Mon, 31 Jan 2005 17:49:53 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: > Aahz wrote: > > In article <[EMAIL PROTECTED]>, > > Steve Holden <[EMAIL PROTECTED]> wrote: > > > >>Note that the sort order isn't perfect - I just sorted on the second > >>"word" in each name. PyCon is a *great* place t

Re: serializing data structures

2005-01-31 Thread "Martin v. Löwis"
Philippe C. Martin wrote: I once wrote something in C to do that, but since python usually has a solution for me If you use arbitrary data structures, you could use pickle or xmlrpclib to marshal the data. If you know the data is restricted to a few well-known data types, you could use XDR (De

Re: variable declaration

2005-01-31 Thread Michael Tobis
This is definitely a wart: ... z = 42.3 ... ... def f(): ...if False: ... global z ...z = -666 ... ... f() ... print z -- http://mail.python.org/mailman/listinfo/python-list

Re: Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Steve Holden
Stephen Thorne wrote: On Mon, 31 Jan 2005 17:49:53 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: Aahz wrote: In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: Note that the sort order isn't perfect - I just sorted on the second "word" in each name. PyCon is a *great* place

Re: Browsing text ; Python the right tool?

2005-01-31 Thread Paul Kooistra
Sorry to reply this late guys - I cannot access news from Work, and Google Groups cannot reply to a message so I had to do it at home. Let me address a few of the remarks and questions you guys asked: First of all, the example I gave was just that - an example. Yes, I know Python starts with 0,

Re: serializing data structures

2005-01-31 Thread Philippe C. Martin
Thanks a lot. Regards, Philippe On Tue, 01 Feb 2005 00:20:01 +0100, Martin v. Löwis wrote: > Philippe C. Martin wrote: >> I once wrote something in C to do that, but since python usually has a >> solution for me > > If you use arbitrary data structures, you could use pickle or xmlrpcli

set, dict and other structures

2005-01-31 Thread bearophileHUGS
I'm frequently using Py2.4 sets, I find them quite useful, and I like them, even if they seem a little slower than dicts. Sets also need the same memory of dicts (can they be made to use less memory, not storing values? Maybe this requires too much code rewriting). I presume such sets are like this

ANNOUNCE: KirbyBase 1.7.1 (Bugfix Release)

2005-01-31 Thread Jamey Cribbs
After releasing version 1.7 yesterday, I found a bug this afternoon that could result in incorrect query results if you are doing a regular expression query against more than one string field. So, I felt like I needed to get a quick bug-fix version out the door to try to minimize the damage.

Re: serializing data structures (Martin v. L?wis)

2005-01-31 Thread Philippe C. Martin
Thanks a lot. Regards, Philippe -- *** Philippe C. Martin SnakeCard LLC www.snakecard.com *** -- http://mail.python.org/mailman/listinfo/python-list

Re: serializing data structures

2005-01-31 Thread Paul Rubin
"Philippe C. Martin" <[EMAIL PROTECTED]> writes: > I am trying to figure out the traps/issues about sending data structures > through a TCP/IP socket under the following circumstances: > > 1) there could be a different O/S on both side of the socket > 2) there could be a difference CPU architecure

How can I use PyDoc to generate html file (modul in directory d)

2005-01-31 Thread [EMAIL PROTECTED]
Hello How can I use PyDoc to generate html file when my file.py is in other directory. Sincerely Yours, Pujo -- http://mail.python.org/mailman/listinfo/python-list

Go visit Xah Lee's home page

2005-01-31 Thread aurora
Let's stop discussing about the perl-python non-sense. It is so boring. For a break, just visit Mr Xah Lee's personal page (http://xahlee.org/PageTwo_dir/Personal_dir/xah.html). You'll find lot of funny information and quotes from this queer personality. Thankfully no perl-python stuff there.

Re: Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Aahz
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > >Sorry you can't make it to Python. My even-naiver way of approaching the >problem was to use the sort utility built into Cygwin, thereby avoiding >writing any code at all. That's cheating! ;-) -- Aahz ([EMAIL PROTECTED

Java Integer.ParseInt translation to python

2005-01-31 Thread jose isaias cabrera
Greetings! I've looked through the internet (not long, though) but I have not been able to find a python translation to buffer[0] = (byte)Integer.parseInt(string,16); Has anyone ported any java programs to python and has translated this? any help would be greatly appreciated. thanks. josé -- ht

Re: Java Integer.ParseInt translation to python

2005-01-31 Thread Paul Rubin
"jose isaias cabrera" <[EMAIL PROTECTED]> writes: > I've looked through the internet (not long, though) but I have not > been able to find a python translation to > > buffer[0] = (byte)Integer.parseInt(string,16); > > Has anyone ported any java programs to python and has translated this? I think

Re: Java Integer.ParseInt translation to python

2005-01-31 Thread Sean Blakey
On Mon, 31 Jan 2005 19:23:35 -0500, jose isaias cabrera <[EMAIL PROTECTED]> wrote: > > Greetings! > > I've looked through the internet (not long, though) but I have not been able > to find a python translation to > > buffer[0] = (byte)Integer.parseInt(string,16); > > Has anyone ported any java

Re: Java Integer.ParseInt translation to python

2005-01-31 Thread Bill Mill
Jose, On Mon, 31 Jan 2005 19:23:35 -0500, jose isaias cabrera <[EMAIL PROTECTED]> wrote: > > Greetings! > > I've looked through the internet (not long, though) but I have not been able > to find a python translation to > > buffer[0] = (byte)Integer.parseInt(string,16); Tell me what this does,

Re: Java Integer.ParseInt translation to python

2005-01-31 Thread ech0
buffer[0] = int(string,16) & 0xff that should work -- http://mail.python.org/mailman/listinfo/python-list

Re: set, dict and other structures

2005-01-31 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote: I'm frequently using Py2.4 sets, I find them quite useful, and I like them, even if they seem a little slower than dicts. They look exactly the same speed-wise to me: >>> t1 = Timer('randrange(100) in foo', 'from random import randrange; foo = set(xrange(1000))') >>> t2 =

Re: set, dict and other structures

2005-01-31 Thread Raymond Hettinger
<[EMAIL PROTECTED]> > I'm frequently using Py2.4 sets, I find them quite useful, and I like > them, even if they seem a little slower than dicts. Glad to hear that you find them to be a useful abstraction. Since sets are internally implemented as dicts, they should have almost identical performan

How do I delete the bound character which triggered callback?

2005-01-31 Thread Mudcat
Howdy, I have a simple combox that I have commands entered into which looks like this: """This is a list with the commands to be run in rotisserie fasion.""" self.comList = Pmw.ComboBox(self.boxFrame, labelpos=W, label_text='Command List: ', entry_width=20, selectioncommand=self.temp ) self.comL

Re: set, dict and other structures

2005-01-31 Thread bearophileHUGS
You are really gentle Raymond Hettinger, but surely I'm not asking you/anyone to write some code just for me; I don't have "real applications", I'm just learning/playing. Your words are quite good answers to most of my questions. The only left small topic is about the group/set-like operations/meth

Re: "Mail receiver server"

2005-01-31 Thread Kartic
manatlan said the following on 1/31/2005 5:46 PM: I like the idea, but how to connect the virtual smtp and a python script ? but ... There should be a way to be python only ... because i don't want to be very complex, i just want to get the subject of the email, to run some commands (and perhaps

Re: Java Integer.ParseInt translation to python

2005-01-31 Thread jose isaias cabrera
Yes, that's my problem. I don't want to go through the java stuff. :-) Thanks. - Original Message - From: "Bill Mill" <[EMAIL PROTECTED]> To: "jose isaias cabrera" <[EMAIL PROTECTED]> Cc: Sent: Monday, January 31, 2005 7:28 PM Subject: Re: Java Integer.ParseInt translation to python Jo

Re: set, dict and other structures

2005-01-31 Thread Giovanni Bajo
Raymond Hettinger wrote: > If set-ifying a dictionary turns out to be an essential and > time-critical operation, it is possible to add some special case code > for this. The question is whether it is worth it. If you find the > need is pressing, file a feature request explaining why it is > es

getting data from a port in use

2005-01-31 Thread Dana Marcusanu
Hi to all, I am trying to use Python to get the data received at a specific port (in use) on my computer. I already tried below code which seems to hang at the statement accepting connections. I don't know what else I can try. Any suggestions will be welcome. import socket, select, os PORT = 200

RE: getting data from a port in use

2005-01-31 Thread Tony Meyer
> I am trying to use Python to get the data received at a > specific port (in use) on my computer. I already tried below > code which seems to hang at the statement accepting > connections. Seems to hang, or does hang? Using print statements will tell you whether that's where it's getting stuck

Vancouver Python/Zope/Plone: Creating OS X Cocoa Applications Using XML and Python

2005-01-31 Thread Paul Prescod
February 1, 2005 Creating OS X Cocoa Applications Using XML and Python, Dethe Elza This talk will cover the use of Renaissance and Python to develop programs for OS X, focussing on both rapid application development, and ease of maintenance. Renaissance is an XML dialect for describing Cocoa (or

Re: test_socket.py failure

2005-01-31 Thread x2164
Nick Coghlan <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > hi all, > > > > Linux 2.4.28 > > Glibc 2.2.5 > > gcc 2.95.3 > > > > > > I'm new to Python. > > > > I've compiled Python 2.4 from tar file. > > > > When running 'make test' i'm getting a

Re: getting data from a port in use

2005-01-31 Thread Grant Edwards
On 2005-02-01, Dana Marcusanu <[EMAIL PROTECTED]> wrote: > I am trying to use Python to get the data received at a specific port (in > use) on my computer. What do you mean "in use"? You mean you want to evesdropt on data that's being sent to an existing connection? If so, you'll need to use som

Re: Java Integer.ParseInt translation to python

2005-01-31 Thread jose isaias cabrera
thanks everyone...! - Original Message - From: "ech0" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Monday, January 31, 2005 7:27 PM Subject: Re: Java Integer.ParseInt translation to python buffer[0] = int(string,16) & 0xff that should work -- http://mail.python.org/mailman

Re: set, dict and other structures

2005-01-31 Thread Jeremy Bowers
On Tue, 01 Feb 2005 00:43:21 +, Raymond Hettinger wrote: > My guess is that there will be two issues. One is that no one > implementation of graphs seems to satisfy all users. The second is that > only a small fraction of Python users need for graph support (there is > probably a much greater

Re: variable declaration

2005-01-31 Thread Michael Tobis
Alex Martelli wrote: > Michael Tobis <[EMAIL PROTECTED]> wrote: > he can perfectly > well correct his misexpression if he cares to -- not my job to try to > read his mind and perform exegesis on his words. Well, I hate to try to tell you your job, but it doesn't seem to be to be all that great of

Re: barchart for webpage needed

2005-01-31 Thread Benji York
dimitri pater wrote: I am looking for a Python tool to create graphs and charts on a webpage. Chartdirector is too expensive for me. A simple script for creating a barchart should be sufficient as a starting point. If all you want are bar charts, you can get by with simple HTML. Here's one techni

Python's idiom for function overloads

2005-01-31 Thread Frans Englich
Hello, Since Python doesn't have static typing, how is the same result as traditional function overloads results in acheived? With function overloads the "selection of code path depending on data type" is transparent and automatic since the typing system figure out what goes to what. But in P

need for binary floats (except performance)?

2005-01-31 Thread kartik
Since the Decimal type can represent any given fractional number exactly, including all IEEE binary floating-point numbers, wouldn't it be advisable to use Decimals for all floating point numbers (except possibly for performance)? Thanks, Kartik. -- http://mail.python.org/mailman/listinfo/python-

Next step after pychecker

2005-01-31 Thread Philippe Fremy
Hi, I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification of all types of the program, without any kind of variable declaration. This would definitely brin

Re: need for binary floats (except performance)?

2005-01-31 Thread Paul Rubin
[EMAIL PROTECTED] (kartik) writes: > Since the Decimal type can represent any given fractional number > exactly, It can't. For example, it can't represent 1/3 exactly. > including all IEEE binary floating-point numbers, wouldn't it be > advisable to use Decimals for all floating point numbers (e

Re: Python's idiom for function overloads

2005-01-31 Thread John Hunter
> "Frans" == Frans Englich <[EMAIL PROTECTED]> writes: Frans> Hello, Frans> Since Python doesn't have static typing, how is the same Frans> result as traditional function overloads results in Frans> acheived? With function overloads the "selection of code Frans> path depen

Re: Next step after pychecker

2005-01-31 Thread Paul Rubin
Philippe Fremy <[EMAIL PROTECTED]> writes: > I would like to develop a tool that goes one step further than > pychecker to ensure python program validity. The idea would be to get > close to what people get on ocaml: a static verification of all types > of the program, without any kind of variable

Re: need for binary floats (except performance)?

2005-01-31 Thread Grant Edwards
On 2005-02-01, kartik <[EMAIL PROTECTED]> wrote: > Since the Decimal type can represent any given fractional number > exactly, including all IEEE binary floating-point numbers, wouldn't it > be advisable to use Decimals for all floating point numbers (except > possibly for performance)? That's a

Re: Python's idiom for function overloads

2005-01-31 Thread Philippe Fremy
Hi Frans, Since Python doesn't have static typing, how is the same result as traditional function overloads results in acheived? With dynamic typing obviously. :-) You can not reproduce the C++ overload idiom but you can get something close with manual type testing. > To in a > function

Re: Python's idiom for function overloads

2005-01-31 Thread Steven Bethard
Frans Englich wrote: But in Python, when one wants to be able to pass different data types into a single "entry point" for functionality, how is that best done? To in a function do an if statement with the type() function? It often depends a lot on the specific use case... Do you have a partic

Re: variable declaration

2005-01-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >Robert Brewer <[EMAIL PROTECTED]> wrote: > >> Bah. Nothing teaches you a new language like having your job depend upon >> it. People who study languages merely for "personal growth" learn 50% of >> the syntax and 1% of the co

Re: Next step after pychecker

2005-01-31 Thread Steven Bethard
Philippe Fremy wrote: I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification of all types of the program, without any kind of variable declaration. This would de

Re: python and gpl

2005-01-31 Thread Paul Rubin
Tim Churches <[EMAIL PROTECTED]> writes: > >The question is: does shipping a backend which imports a module that > > links with GPL code make some or all of the library GPL. > We sought formal legal advice on this issue from a lawyer with > expertise in open source licensing ...> > The answer was

Re: tkinter: Can You Underline More Than 1 Char In A Menu Title

2005-01-31 Thread Tim Roberts
Tim Daneliuk <[EMAIL PROTECTED]> wrote: > >I am currently underling the first character of a menu title (to indicate >its shortcut/accelerator key) like this: > >self.WildBtn = Menubutton(self.mBar, text=WILDMENU, underline=0, > state=DISABLED) > >However, I intend to actually have two separat

Dr. Dobb's Python-URL! - weekly Python news and links (Feb 1)

2005-01-31 Thread Cameron Laird
QOTW: "The right solution will end up being unique to Python though. It has to feel like Python." -- Guido van Rossum http://aws.typepad.com/aws/2005/01/amazon_devcon_g_4.html "Sparring with Alex Martelli is like boxing Mike Tyson, except that one experiences brain enhancement rather than brai

Re: variable declaration

2005-01-31 Thread Fredrik Lundh
Michael Tobis wrote: > This is definitely a wart: > > ... z = 42.3 > ... > ... def f(): > ...if False: > ... global z > ...z = -666 > ... > ... f() > ... print z no, it's a declaration. from the documentation: http://docs.python.org/ref/global.html "The global statement i

Re: a sequence question

2005-01-31 Thread Steven Bethard
Nick Coghlan wrote: I'd definitely recommend hiding this trick inside a function. Perhaps something like (using Michael's function name): from itertools import izip, repeat, chain def partition(seq, part_len): return izip(*((iter(seq),) * part_len)) def padded_partition(seq, part_len, pad_val=N

Re: Re: python and gpl

2005-01-31 Thread Tim Churches
Paul Rubin wrote: > > Tim Churches <[EMAIL PROTECTED]> writes: > > >The question is: does shipping a backend which imports a module that > > > links with GPL code make some or all of the library GPL. > > We sought formal legal advice on this issue from a lawyer with > >

Re: tkinter: Can You Underline More Than 1 Char In A Menu Title

2005-01-31 Thread Tim Daneliuk
Tim Roberts wrote: Tim Daneliuk <[EMAIL PROTECTED]> wrote: I am currently underling the first character of a menu title (to indicate its shortcut/accelerator key) like this: self.WildBtn = Menubutton(self.mBar, text=WILDMENU, underline=0, state=DISABLED) However, I intend to actually have two se

Suggesion for an undergrad final year project in Python

2005-01-31 Thread Sridhar
Hi, I am doing my undergrade CS course. I am in the final year, and would like to do my project involving Python. Our instructors require the project to have novel ideas. Can the c.l.p people shed light on this topic? -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Spike Asset Manager release 0.13

2005-01-31 Thread David Fraser
mh wrote: Fredrik- This is a known issue. The tool currently only looks in certain locations or hints rather then spidering the whole hard drive (which could take a bit of time). If you have installed in a non-standard location (or are using a platform or version of software that hasn't been test

Re: How can I use PyDoc to generate html file (modul in directory d)

2005-01-31 Thread [EMAIL PROTECTED]
Hello all, I finaly find the solution, but please share yours if you have different way to do it. Theories: PyDoc menu can only search the module in directory when it was first called and in python directory for example c:\python24. So I have to call PyDoc in my module directory. It would be nec

Re: tkinter: Can You Underline More Than 1 Char In A Menu Title

2005-01-31 Thread Fredrik Lundh
Tim Daneliuk wrote: >>>However, I intend to actually have two separate keys invoke this menu >>>to have it behave differently in different circumstances. >> >> You can, of course, CHANGE the underlined character to match the >> circumstances. > > Yeah, I understand that ... what I want is two char

Advice on OSX cocoa app with Python backend

2005-01-31 Thread Socheat Sou
After a brief, but informative, discussion on Freenode's #zope chatroom, I was advised to consult the gurus on c.l.p. I'm working for a small company who is in desperate need to rewrite it's 15+ year old, flat-file, client-tracking database. The staff uses OSX, while I administer the couple linu

Re: Line graphics on Linux console

2005-01-31 Thread Frank Millman
Frank Millman wrote: > Hi all > > The following is a message I sent to co.os.linux.setup - > > "My question concerns line graphics on a text-based console. ­My > actual problem relates to a [Python] program I have written using > ncurses, b­ut you can easily test it by running a program like > min

Re: variable declaration

2005-01-31 Thread Frans Englich
On Tuesday 01 February 2005 05:08, Cameron Laird wrote: > We learned long ago to treat you, Alex, as an exception. > While it's rather unpythonic to have implicit rules, let's > forgive Robert for failing to mention the one that regards > you as an outlier for inferential purposes. Excellent timi

Re: "Mail receiver server"

2005-01-31 Thread manatlan
Kartic a écrit : manatlan said the following on 1/31/2005 5:46 PM: I like the idea, but how to connect the virtual smtp and a python script ? but ... There should be a way to be python only ... because i don't want to be very complex, i just want to get the subject of the email, to run some com

Re: [Python-Announce] cfgparse v01_00 released

2005-01-31 Thread David Fraser
Dan Gass wrote: I'm pleased to announce the initial release of cfgparse (V01_00) Background - cfgparse is a more convenient, flexible, and powerful module for parsing configuration files than the standard library ConfigParser module. cfg

Forcing interactive interpreter without (-i)

2005-01-31 Thread Miki Tebeka
Hello All, If there a way a script can tell Python to enter interactive mode even if the -i command line switch was not given? I want py2exe to create an interactive session, without writing my own REPL. Thanks. -- Miki Teb

<    1   2