Efficient grep using Python?

2004-12-15 Thread Jane Austine
[Fredrik Lundh] >>> bdict = dict.fromkeys(open(bfile).readlines()) >>> >>> for line in open(afile): >>>if line not in bdict: >>>print line, >>> >>> [Tim Peters] >> Note that an open file is an iterable object, yielding the lines in >> the file. The "for" loop exploited that above, bu

Re: NO REALLY

2004-12-15 Thread Eric Pederson
> "Jive" <[EMAIL PROTECTED]> taunted: > > > Subject: NO REALLY > > > > Isn't there a comp.lang.flame or something? > Oh, my, don't you have BIG CAPS! Someone should wash them, thoroughly! Why don't you come up to my room, big boy. -DIRK [is that flaming enough?] -- http://mail.python.or

Re: How do I convert characters into integers?

2004-12-15 Thread Adam DePrince
On Tue, 2004-12-14 at 18:18, Paul Rubin wrote: > Markus Zeindl <[EMAIL PROTECTED]> writes: > > > Now I get every character with a loop: > > > > buffer = "" > > for i in range(len(message)): > >ch = message[i-1:i] > > You mean > ch = message[i] > what you have does the wrong thing when i =

Re: Why are tuples immutable?

2004-12-15 Thread Adam DePrince
On Mon, 2004-12-13 at 17:23, jfj wrote: > Yo. > > Why can't we __setitem__ for tuples? > The way I see it is that if we enable __setitem__ for tuples there > doesn't seem to be any performance penalty if the users don't use it > (aka, python performance independent of tuple mutability). > > On t

Re: lies about OOP

2004-12-15 Thread Adam DePrince
On Tue, 2004-12-14 at 18:27, Roy Smith wrote: > Terry Reedy <[EMAIL PROTECTED]> wrote: > > I did not really 'get' OOP until after learning Python. The > > relatively simple but powerful user class model made more sense to > > me than C++. So introducing someone to Python, where OOP is a > > choic

Re: Efficient grep using Python?

2004-12-15 Thread Tim Peters
[Jane Austine] > fromkeys(open(f).readlines()) and fromkeys(open(f)) seem to be > equivalent. Semantically, yes; pragmatically, no, in the way explained before. > When I pass an iterator instance(or a generator iterator) to the > dict.fromkeys, it is expanded at that moment, I don't know what "e

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-15 Thread Chas Emerick
I haven't seen any solid responses come across the wire, and I suspect there isn't a product or package that will do exactly what you want. However, our company's product, PDFTextStream does do a phenomenal job of extracting text and metadata out of PDF documents. It's crazy-fast, has a clean

Re: Python mascot proposal

2004-12-15 Thread Terry Hancock
In reply to the OP, I think the snake mascot drawing is cute and pretty compelling. On Sunday 12 December 2004 05:49 pm, Luis M. Gonzalez wrote: > 1) I think that Python's logo should reflect its power. > If we use a mascot as its image, we would be giving the wrong idea: > that Python is a "toy"

Python compiler method

2004-12-15 Thread Lady_Valerie
hello guys! i just want to ask favor, coz i want to know how python compiler method could be done? im really clueless of this programming language hope anyone coule help me with this topic... im just focusing only on the compiler of the python.thanks a lot!!! lady valerie -- http://mail.python.

Re: Python vs. Perl

2004-12-15 Thread Dan
I'm inexperienced in both languages, and am toying around with both now, so I offer these comments with warnings of the blind leading the blind. As far as regular expressions go I can't offer much information. They both meet my needs. I prefer the Python syntax, however: it is possible in both lan

RE: Python compiler method

2004-12-15 Thread Delaney, Timothy C (Timothy)
Lady_Valerie wrote: > hello guys! i just want to ask favor, coz i want to know how python > compiler method could be done? im really clueless of this programming > language hope anyone coule help me with this topic... im just focusing > only on the compiler of the python.thanks a lot!!! This shou

Re: Is Python good for graphics?

2004-12-15 Thread Doug Holton
Esmail Bonakdarian wrote: First of all, I *really* like Python ;-) I need some help with the graphical side of things. I would like to do some basic graphics with Python, but I am not sure what the best/most effective way for me to do what I want. Basically, I would like to be able to create some b

Re: lies about OOP

2004-12-15 Thread Dave Benjamin
In article <[EMAIL PROTECTED]>, Adam DePrince wrote: > On Tue, 2004-12-14 at 18:27, Roy Smith wrote: >> Terry Reedy <[EMAIL PROTECTED]> wrote: >> > I did not really 'get' OOP until after learning Python. The >> > relatively simple but powerful user class model made more sense to >> > me than C++.

libxml2/xpath

2004-12-15 Thread Maxim Khesin
I am trying to do some xpath on http://fluidobjects.com/doc.xhtml but cannot get past 'point A' (that is, I am totally stuck): >> import libxml2 >> mydoc = libxml2.parseDoc(text) >> mydoc.xpathEval('/html') >> [] this returns an empty resultlist, which just seems plain wrong. Can anyone throw a s

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-15 Thread Axel Straschil
Hallo! However, our company's product, PDFTextStream does do a phenomenal job of extracting text and metadata out of PDF documents. It's crazy-fast, has a clean API, and in general gets the job done very nicely. It presents two points of compromise from your idea situation: 1. It only produces

Re: Python IDE

2004-12-15 Thread dataangel
fuzzylollipop wrote: TruStudio for Eclipse is nice for those everything must be free socialists. ActiveState Komodo is probably the best commerical Python IDE and the ActiveState Python plugin for Visual Studio is great for those that do VS. It's also great for those college students looking to

Re: Regular Expression

2004-12-15 Thread Fredrik Lundh
Michael McGarry wrote: > I am horrible with Regular Expressions, can anyone recommend a book on it? > > Also I am trying to parse the following string to extract the number after > load average. > > " load average: 0.04, 0.02, 0.01" > > how can I extract this number with RE or otherwise? oth

Small Problem P 2.4 (line>2048 Bytes)

2004-12-15 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
Hi, all ! I have un python script of 75 kB, who make a COM server. It's run OK with Python 2.3 + PyWin + P.I.L. But, with Python 2.4, I obtain a windows error (sorry, it's in french) : python.exe a rencontrée un problème, et doit fermer. erreur sur module: ntdll.dll Exc

Re: Regular Expression

2004-12-15 Thread Michael Fuhr
Timothy Grant <[EMAIL PROTECTED]> writes: > On Tue, 14 Dec 2004 23:16:43 -0700, Michael McGarry > <[EMAIL PROTECTED]> wrote: > > > > " load average: 0.04, 0.02, 0.01" > > > > how can I extract this number with RE or otherwise? > > Lot's of good solutions for the problem. In the special case

Re: PyQt on MAC OS X

2004-12-15 Thread Ronald Oussoren
On 14-dec-04, at 0:42, Michael McGarry wrote: Kevin, thanks that did the trick!!! One problem is my Window created in Qt appears underneath all others on the screen and focus never goes completely onto this window. Kind of weird. Any ideas? Did you use pythonw to start your script? If you use th

Re: lies about OOP

2004-12-15 Thread Gregor Horvath
Daniel T. wrote: [EMAIL PROTECTED] wrote: A paper finding that OOP can lead to more buggy software is at http://www.leshatton.org/IEEE_Soft_98a.html Sure, OOP *can* lead to more buggy software, that doesn't mean it always does. I think that costs(=time) to develop and maintain software depends

xmlrpclib with technorati

2004-12-15 Thread Alan Little
I'm trying to write a generic weblog update notifier using xmlrpclib, starting with technorati. What I want to do is something like this : XML config file that would look like this: http://mail.python.org/mailman/listinfo/python-list

Re: PEP 338: Executing modules inside packages with '-m'

2004-12-15 Thread Nick Coghlan
Martin Bless wrote: [Nick Coghlan <[EMAIL PROTECTED]>] One thing I stumbled across with the current implementation: Why doesn't "python -m abc" work with ./abc/ ./abc/__init__.py assuming ./abc/ is directly on the path? In analogy to normal module import? It doesn't work because abc is a package, r

Re: save an opengl canvas (wxPython)

2004-12-15 Thread Zunbeltz Izaola
"Mike C. Fletcher" <[EMAIL PROTECTED]> writes: > There's sample code in PyOpenGL and OpenGLContext for saving canvases > to PNG or JPEG formats using PIL. Saving to Postscript requires > considerably more work (if you're implying saving as triangles, lines > and the like). There is a GPL library

Re: logging in omniORB for python

2004-12-15 Thread Diez B. Roggisch
> Does anyone know, were the log data is? And how I can store it in a file? > By the way I ask also the omniORB mailing list, but here are the python > experts. it gets written to stdout - and then looks like this: omniORB: ObjRef(IDL:ehotel.de/omphalos/Domain:1.0) -- deleted. omniORB: inputMessa

Re: jython and concatenation of strings

2004-12-15 Thread Jan Gregor
StringBuffer class from java was right solution - yours looses encoding, and in jython I was unable to get it back - in python it worked fine. Jan > I don't use Jython, but are you not able to do something like: > > string_list = [] > for ... in ...: > ... > string_list.append(...) >

Re: Step by step: Compiling extensions with MS Visual C++ Toolkit 2003 - msvccompiler-patch.txt (0/1)

2004-12-15 Thread Fuzzyman
Cool it's nice to see these working. I followed Mike Fletchers instructions and they worked fine for me. I used mingw to get the patch tool. I did the core SDK download by doing a 'full download' (all 13 CAB files and extraction bat separately) and a local install. This is about a 350 odd meg

Re: Suggestion for "syntax error": ++i, --i

2004-12-15 Thread Nick Craig-Wood
Richard Brodie <[EMAIL PROTECTED]> wrote: > "Terry Reedy" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > You could propose to the author of Pychecker that he include, if possible, > > an option to check for and warn about '++', '--'. > > It does already. > > $ cat plusp

getopt: Make argument mandatory

2004-12-15 Thread Frans Englich
Hello, In my use of getopt.getopt, I would like to make a certain parameter mandatory. I know how to specify such that a parameter must have a value if it's specified, but I also want to make the parameter itself mandatory(combined with a mandatory value, the result is that the user must spec

Re: lies about OOP

2004-12-15 Thread Ilja Preuß
Daniel T. wrote: > Mr. Hatton suffers from the same problem that many OO critics suffer. > He thinks that the language choice decides whether the program > written is an OO program. I've seen plenty of very non-OO systems > written in OO languages, I've seen expert OO systems written in > non-OO l

Re: Regular Expression

2004-12-15 Thread Roy Smith
Michael McGarry <[EMAIL PROTECTED]> wrote: > I am horrible with Regular Expressions, can anyone recommend a book on it? I just did a search on the Barnes & Noble site for "regular expression" and came up with a bunch of books. The following looks reasonable: http://search.barnesandnoble.com/bo

Re: Python IDE

2004-12-15 Thread Fredrik Lundh
Chris wrote: > SPE? http://spe.pycs.net/ -- http://mail.python.org/mailman/listinfo/python-list

Flow based programming & python coding style

2004-12-15 Thread Carlos Ribeiro
Hi, A friend of mine passed me some links about a great concept (not new in fact, only new to me): -- http://www.jpaulmorrison.com/fbp/ -- http://c2.com/cgi/wiki?FlowBasedProgramming I found many of the explanations and examples strangely familiar. The C2 Wiki contains a good discussion that dra

Re: Small Problem P 2.4 (line>2048 Bytes)

2004-12-15 Thread Steve Holden
Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle. wrote: Hi, all ! I have un python script of 75 kB, who make a COM server. It's run OK with Python 2.3 + PyWin + P.I.L. But, with Python 2.4, I obtain a windows error (sorry, it's in french) : python.exe a renc

Re: Regular Expression

2004-12-15 Thread Philippe C. Martin
I'm struggling myself and have bought: "Mastering Regular Expressions" 2nd Edition, O'REILLY Jeffrey E. F. Friedl I covers the reg exp concepts + applications in various languages (mostly PERL but some Python also) -- * Philippe C. Martin SnakeCard LLC www.snakecard.com *

Re: flex/bison like module in Python?

2004-12-15 Thread Paul McGuire
"Jerry Sievers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dear Pythonists; > > Curious if there exists in Python package(s) for use as lexer/parser > for implementation of language grammars? > > Already using cmd.py from the standard distro for it's basic features > but wishing

flex/bison like module in Python?

2004-12-15 Thread Jerry Sievers
Dear Pythonists; Curious if there exists in Python package(s) for use as lexer/parser for implementation of language grammars? Already using cmd.py from the standard distro for it's basic features but wishing for much more advanced capability. As such, I refer to flex/bison because though comple

cygwin python.exe symlink breaks when called from .bat file

2004-12-15 Thread gry
[Windows XP Pro, cygwin python 2.4] Under cygwin, the python executable is installed as python2.4.exe with a symbolic link to python.exe. This is fine as long as one is operating only withing the cygwin world. But I execute python from a foo.bat file, and windows barfs on the symbolic link. I r

AsmL/Python relationship? Anyone using AsmL? What for?

2004-12-15 Thread Claudio Grondi
Hi, I have just by chance discovered, that Microsoft research works on a kind of programming language called AsmL, and I'm just curious if AsmL, which is using same concept of significant indentation as Python language, was developed fully independently or is there a kind of relationship (same per

RE: AsmL/Python relationship? Anyone using AsmL? What for?

2004-12-15 Thread Doran_Dermot
Hi Claudio, If I recall correctly Guido van Rossum (creator/father of Python) did not mention AsmL as being an influence. Also AsmL appears to be more recent (circa .NET epoch) than Python (circa 1991). Hence, I would suggest that the Foundations of Software Engineering group at Microsoft have bo

looking for wget-like module for getching software

2004-12-15 Thread Robert P. J. Day
just getting started with python, and i'm designing a program for fetching software from the net, given the package name, version number and/or date stamp, download method (tarball, CVS, etc.) and so on. i've already got a shell script doing this, but python would certainly clean up the code a

Re: Dynamically passing variables to unittest

2004-12-15 Thread Peter Hansen
Tom Haddon wrote: > So, my question is, how do I dynamically > pass the variables from a list, for example to the unittest module so I > can maintain the list of test cases more easily: > > - > import DB > import unittest > > class ConnectString(unittest.TestCase): >

RE: Python IDE

2004-12-15 Thread Mikael Niklasson
This works for me /micke Eclipse version 3.0+ found at http://www.eclipse.org And the pydev-plugin for eclipse that is found at http://pydev.sourceforge.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Sent: Wednesday, December 15, 2004 2:59

Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-15 Thread Jason Tishler
On Wed, Dec 15, 2004 at 07:21:31AM -0800, gry wrote: > Under cygwin, the python executable is installed as python2.4.exe with > a symbolic link to python.exe. This is fine as long as one is > operating only withing the cygwin world. But I execute python from a > foo.bat file, and windows barfs on

Re: Why are tuples immutable?

2004-12-15 Thread Roy Smith
Jp Calderone <[EMAIL PROTECTED]> wrote: > Dictionaries support mutable keys just find. What they don't >support is unhashable keys. > > For some objects, this is an important distinction: lists are >mutable but not hashable. Of course, you could subclass list to make a mutable, hashable li

Re: ANN: Python Test Environment

2004-12-15 Thread Richie Hindle
[Michael / Fuzzyman] > http://www.voidspace.org.uk/atlantibots/pythonutils.html#testenv I've seen this announcement four times now - I don't whether you're seeing problems with it, but it's definitely reaching the mailing list. -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mail

Re: Python IDE

2004-12-15 Thread [EMAIL PROTECTED]
Tomas wrote: > "Fuzzyman" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > If you're willing to pay for one, Komodo is very good. Especially for > > projects. > > I would recomend Wing IDE over Komodo. My experience is that Wing IDE has > far better code completion. And the Source

Fill a Server

2004-12-15 Thread [EMAIL PROTECTED]
I think this is a silly task, but I have to do it. I have to fill a file server (1 TB SATA RAID Array) with files. I wrote a Python script to do this, but it's a bit slow... here it is: import shutil import os import sys import time src = "G:" des = "C:scratch" os.chdir(src) try: for x in xrange

RE: Dynamically passing variables to unittest

2004-12-15 Thread Tom Haddon
Hi Peter, Yeah, you're right, the term "ConnectString" is a little confusing. Perhaps I should change that. Here's a valid call to DB: conn=DB.DB('pg','test','localhost',5432,'test','test') In the context of this unittest, a valid syntax would be (except that this unittest would fail, as this

Re: Efficient grep using Python?

2004-12-15 Thread Fredrik Lundh
Tim Peters wrote: >> bdict = dict.fromkeys(open(bfile).readlines()) >> >> for line in open(afile): >>if line not in bdict: >>print line, >> >> > > Note that an open file is an iterable object, yielding the lines in > the file. The "for" loop exploited that above, but fromkeys() can >

Re: Python IDE

2004-12-15 Thread Grig
I use PyDev (pydev.sf.net), an Eclipse plug-in. I may be biased, since I contributed some code to the project, but it works great for me. An article talking about using PyDev and ant within Eclipse is available at http://www-106.ibm.com/developerworks/library/os-ecant/?ca=drs-tp2604. Grig Chris w

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-15 Thread Skip Montanaro
Dan> I also see an 8-10% speed decrease in 2.4 (I built) from 2.3.3 Dan> (shipped w/Fedora2) in the program I'm writing (best of 3 trials Dan> each). Memory use seems to be about the same. How do you how the compiler flags were the same if you didn't compile both versions yourself?

Re: Fill a Server

2004-12-15 Thread [EMAIL PROTECTED]
I think you solved it Fredrik. The first ten folders looked like this: D:\0\1\2\3\4\5\6\7\8\9 22 Chars long. The rest looked like this: \10\11\12\13\82\83\84 ~ 222 CHars long. Subdir 84 had one file in it named XXX.bat That file broke the 255 limit, then subdir 85 wasn't created

Re: Small Problem P 2.4 (line>2048 Bytes)

2004-12-15 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
Hi ! You are a very good soothsayer (*) ! With # -*- coding: cp-1252 -*-it's bugging With # -*- coding: utf-8 -*- it's OK ! (*) soothsayer is the masculine of pythoniss (good english term ?) -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-li

Re: do you master list comprehensions?

2004-12-15 Thread Matthew Moss
Diez B. Roggisch wrote: > >>> data = [['foo','bar','baz'],['my','your'],['holy','grail']] > >>> [e for l in data for e in l] > ['foo', 'bar', 'baz', 'my', 'your', 'holy', 'grail'] Okay, I tried this in an interactive Python session and it works as stated. My question is, why? How is the interpre

Dr. Dobb's Python-URL! - weekly Python news and links (Dec 15)

2004-12-15 Thread Cameron Laird
QOTW: "[Python demands more thought in optimization, because i]n other languages, by the time you get the bloody thing working it's time to ship, and you don't have to bother worrying about making it optimal." -- Simon Brunning "One of the best features of c.l.py is how questions phrased in the m

Re: change windows system path from cygwin python?

2004-12-15 Thread Jason Tishler
On Wed, Dec 15, 2004 at 06:43:35PM +, Jeff Lindholm wrote: > The only issue with this is you will have to reboot for it take > effect. The above is not quite true -- at least under NT/2000/XP. The reboot is only necessary for the SCM (and services) to notice the change. Otherwise, you just ne

Re: Dynamically passing variables to unittest

2004-12-15 Thread Jim Sizelove
Tom Haddon wrote: Hi Peter, Yeah, you're right, the term "ConnectString" is a little confusing. Perhaps I should change that. Here's a valid call to DB: conn=DB.DB('pg','test','localhost',5432,'test','test') In the context of this unittest, a valid syntax would be (except that this unittest would

Re: do you master list comprehensions?

2004-12-15 Thread Fredrik Lundh
Matthew Moss wrote: >> >>> data = [['foo','bar','baz'],['my','your'],['holy','grail']] >> >>> [e for l in data for e in l] >> ['foo', 'bar', 'baz', 'my', 'your', 'holy', 'grail'] > > Okay, I tried this in an interactive Python session and it works as > stated. My question is, why? How is the inte

Re: change windows system path from cygwin python?

2004-12-15 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > I want to write some kind of install script for my python app that > will add c:\cygwin\usr\bin to the system path. I don't want > to walk around to 50 PC's and twiddle through the GUI to: > > My Computer --> Control Panel --> System --> Advanced --> Environment > > >

Re: getopt: Make argument mandatory

2004-12-15 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Frans Englich wrote: > > Hello, > > In my use of getopt.getopt, I would like to make a certain parameter > mandatory. Isn't a *mandatory option* a contradiction? Why don't you turn it into an argument? You already called it argument in the subject of your post. Ciao,

NO REALLY

2004-12-15 Thread Jive
Isn't there a comp.lang.flame or something? -- http://mail.python.org/mailman/listinfo/python-list

RE: Dynamically passing variables to unittest

2004-12-15 Thread Tom Haddon
Great, works a treat. Thanks -Original Message- From: Jim Sizelove [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 15, 2004 11:28 AM To: [EMAIL PROTECTED] Subject: Re: Dynamically passing variables to unittest Tom Haddon wrote: > Hi Peter, > > Yeah, you're right, the term "ConnectSt

Re: change windows system path from cygwin python?

2004-12-15 Thread Peter Hansen
Fredrik Lundh wrote: <[EMAIL PROTECTED]> wrote: How can a python, or even a .bat script modify the system PATH? It doesn't appear to be in the registry. did you look under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment And see also this helpful recipe: http://aspn.activ

Re: getopt: Make argument mandatory

2004-12-15 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Frans Englich wrote: >> > In my use of getopt.getopt, I would like to make a certain parameter >> > mandatory. >> >> Isn't a *mandatory option* a contradiction? Why don't you turn it into an >> argument? You already called it argument in the subject of your post. > > I p

Is Python good for graphics?

2004-12-15 Thread Esmail Bonakdarian
First of all, I *really* like Python ;-) I need some help with the graphical side of things. I would like to do some basic graphics with Python, but I am not sure what the best/most effective way for me to do what I want. Basically, I would like to be able to create some basic animations where I ca

Re: Is Python good for graphics?

2004-12-15 Thread Fredrik Lundh
Esmail Bonakdarian wrote: > Basically, I would like to be able to create some basic animations > where I can help visualize various sorting algorithms (for instance > http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/sorting.html#insert_anim) > or graph searches (coloring nodes as each gets visited

Re: AsmL/Python relationship? Anyone using AsmL? What for?

2004-12-15 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
Hi ! There are many ideas with same type than Python. Indentation, set, sequences (list), parallel (zip), sequential (iter), map (dictionnary), I had see : Set comprehension :A = {1..20} C = {i | i in A where 2 * i in A} Map comprehension (god) etc. etc. --

Re: subprocess vs. proctools

2004-12-15 Thread Keith Dart
Nick Craig-Wood wrote: There are many ways for a program to fail (non-zero exit codes) but only one way for it to succeed (zero exit code). Therefore rc should be 0 for success. Exactly. And as a convenience the ExitStatus object of proctools handles that for you. As a general rule, I believe Py

Re: I DECLARE THIS THREAD FINISHED

2004-12-15 Thread Paul McGuire
"Jive" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Everyone keep moving. There is nothing to see here. Move along. > You wish! If only ending a thread were that easy - we wouldn't be hearing about "Why is Python slower than Java?" anymore! But I agree with Martijn (note spell

Re: OmniORB(py) compared to ICE? (was: ANNOUNCE: Ice 2.0 released)

2004-12-15 Thread Joshua Adam Ginsberg
On Wed, 2004-12-15 at 22:48 +0100, Wolfgang Keller wrote: > > "The Internet Communications Engine (Ice) is a modern alternative to > > object middleware such as CORBAâ or COM/DCOM/COM+. Ice is easy to learn, > > yet provides a powerful network infrastructure for demanding technical > > applicati

Re: How can i send 8-bit data or binary data with pyserial?

2004-12-15 Thread Scott David Daniels
Fredrik Lundh wrote: "ouz as" <[EMAIL PROTECTED]> wrote: i have an electronic module which only understand binary data. i use python pyserial. for example the module starts when 00100 8-bit binary data sent.but ... in computers, bits are combined into bytes (or longer machine words). the strin

OmniORB(py) compared to ICE? (was: ANNOUNCE: Ice 2.0 released)

2004-12-15 Thread Wolfgang Keller
> "The Internet Communications Engine (Ice) is a modern alternative to > object middleware such as CORBAâ or COM/DCOM/COM+. Ice is easy to learn, > yet provides a powerful network infrastructure for demanding technical > applications. Ice shines where technologies such as SOAP or XML-RPC are >

Re: NO REALLY

2004-12-15 Thread Brian van den Broek
Peter Hansen said unto the world upon 2004-12-15 17:39: Martijn Faassen wrote: Jive wrote: Isn't there a comp.lang.flame or something? I've doublechecked, but I didn't see any significant flaming in this article (and I'm generally not very tolerant of it). My PSU posting was certainly not intend

Re: Module question

2004-12-15 Thread Grumman
Bill Turczyn wrote: Does python have a module similiar to the perl Spreadsheet::WriteExcel Thanks, Bill In a pinch, you can output an HTML table, give the file an .xls extension, and Excel will read it just fine. There's probably a better option in python (under win32, you could use win32com and

ftp

2004-12-15 Thread hawkmoon269
I would like to write a small ftp script that I could use in place of DOS. So far I have this -- from ftplib import FTP server = 'xxx' username = 'xxx' password = 'xxx' file = 'xxx' ftp = FTP(server) ftp.login(username, password) ftp.retrlines('RETR ' + file, open('C:\My Documents\' + file, 'w'

Re: Python IDE

2004-12-15 Thread limodou
Try NewEdit if you have time. http://wiki.wookpecker.org.cn/moin.cgi/NewEdit Chris wrote: What IDE's do y'all recommend for Python? I'm using PythonWin atm, but I'd like something with more functionality. Chris -- I love python! My Blog: http://www.donews.net/limodou -- http://mail.python.org/ma

Re: Module question

2004-12-15 Thread Jeff Shannon
Mike Meyer wrote: Grumman <[EMAIL PROTECTED]> writes: Bill Turczyn wrote: Does python have a module similiar to the perl Spreadsheet::WriteExcel In a pinch, you can output an HTML table, give the file an .xls extension, and Excel will read it just fine. Welll, someone pointed ou

Re: Why are tuples immutable?

2004-12-15 Thread Jeff Shannon
Antoon Pardon wrote: Demanding that users of dictioanaries somehow turn their mutable objects into tuples when used as a key and back again when you retrieve the keys and need the object [...] But, you generally don't "retrieve" _keys_ from dicts. You *use* keys to retrieve *values* from a dict.

Re: spawn* or exec* and fork, what should I use and how ?

2004-12-15 Thread Peter Hansen
Lingyun Yang wrote: I want to use python as a "shell like" program, and execute an external program in it( such as mv, cp, tar, gnuplot) os.execv("/bin/bash",("/usr/bin/gnuplot",'-c "gnuplot < plot.tmp"')) I would suggest checking out the "subprocess" module, new in Python 2.4. It subsumes the f

Re: spawn* or exec* and fork, what should I use and how ?

2004-12-15 Thread Jp Calderone
On Thu, 16 Dec 2004 03:00:45 GMT, Lingyun Yang <[EMAIL PROTECTED]> wrote: >Hi, > >I want to use python as a "shell like" program, > and execute an external program in it( such as mv, cp, tar, gnuplot) > I tried: > > os.execv("/bin/bash",("/usr/bin/gnuplot",'-c "gnuplot < plot.tmp"')) > > s

Re: Why are tuples immutable?

2004-12-15 Thread Adam DePrince
On Mon, 2004-12-13 at 17:23, jfj wrote: Yo. Why can't we __setitem__ for tuples? The way I see it is that if we enable __setitem__ for tuples there doesn't seem to be any performance penalty if the users don't use it (aka, python performance independent of tuple mutability). On the other ha

Re: Why are tuples immutable?

2004-12-15 Thread Jp Calderone
On Wed, 15 Dec 2004 23:38:04 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote: >On Wed, 2004-12-15 at 10:26, Jp Calderone wrote: > > On Wed, 15 Dec 2004 14:18:21 GMT, Roel Schroeven <[EMAIL PROTECTED]> wrote: > > >Antoon Pardon wrote: > > > > Op 2004-12-15, Fredrik Lundh schreef <[EMAIL PROTECTED]>

Re: Why are tuples immutable?

2004-12-15 Thread Adam DePrince
On Wed, 2004-12-15 at 10:26, Jp Calderone wrote: > On Wed, 15 Dec 2004 14:18:21 GMT, Roel Schroeven <[EMAIL PROTECTED]> wrote: > >Antoon Pardon wrote: > > > Op 2004-12-15, Fredrik Lundh schreef <[EMAIL PROTECTED]>: > > >>sorry, but I don't understand your reply at all. are you saying that > > >>d

Re: Python vs. Perl

2004-12-15 Thread Terry Hancock
On Saturday 11 December 2004 04:10 pm, Michael McGarry wrote: > I intend to use a scripting language for GUI development and front end > code for my simulations in C. I want a language that can support SQL, > Sockets, File I/O, and shell interaction. In my humble opinion, anything complicated en

Re: Python 3.0

2004-12-15 Thread Terry Hancock
On Sunday 12 December 2004 09:27 pm, duane osterloth wrote: > I'm looking for a stand alone email program which is not browser based. > I simply want to write, send and receive email without accessing the > internet. Is Python 3.0 that kind of program? I'd appreciate your > response. The fa

Re: Why are tuples immutable?

2004-12-15 Thread Jeremy Bowers
On Wed, 15 Dec 2004 15:08:09 +, Antoon Pardon wrote: > And I think that is a stupid reason. There are enough other situations > were people work with mutable objects but don't wish to mutate specific > objects. Like objects in a sorted sequence you want to keep that way > or objects in a heap

Re: Why are tuples immutable?

2004-12-15 Thread Jeremy Bowers
On Thu, 16 Dec 2004 00:56:50 -0500, Jeremy Bowers wrote: > editing with the object representing the GUI widget; I actually give each > editable object a guaranteed unique id on creation, never changed, and I > define __eq__(self, other) as "return self is other". Before anybody asks why I don't u

Re: Is Python good for graphics?

2004-12-15 Thread Fredrik Lundh
Esmail Bonakdarian wrote: >> how about: >> >> http://vpython.org/ > > hi, > > thanks, I didn't know about that. > > do you (or anyone else) have a recommendation for 2D type > graphics? WCK, Tk's Canvas, wxPython (do they have a canvas-style widget available these days), any other self-respec

Re: How do I convert characters into integers?

2004-12-15 Thread Binu K S
On Wed, 15 Dec 2004 23:59:13 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote: > > message = [chr( (ord( x ) + 3 )%256) for x in message] > Minor correction: message = ''.join([chr( (ord( x ) + 3 )%256) for x in message]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python mascot proposal

2004-12-15 Thread Dimitri Tcaciuc
Hm, interesting. So I'm hearing lots of different opinions here, but it seems like there's not too many radical thoughts about not using snake at all and it can be pretty much summed up to 2 things 1) use a snake 2) combine snake with -some- monty python's symbolic I personally totally like the

<    1   2