Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Paul Rubin
Torsten Bronger <[EMAIL PROTECTED]> writes: > However, I'm quite sure that when Unicode has arrived almost > everywhere, some languages will start considering such characters in > their core syntax. Python 3.0 allows for Unicode letters in > identifiers, and there's still room for improvement. I

Re: question

2008-03-30 Thread Marc 'BlackJack' Rintsch
On Sun, 30 Mar 2008 20:34:30 -0400, Steve Holden wrote: > [EMAIL PROTECTED] wrote: >> Presume. Silence first, then a broken triad vamps. How long til you >> recognize it? One sec., i'll attach a binary. > > Good grief, is this idibot still around? > > [leaves c.l.py for another month] Oh com

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Torsten Bronger
Hallöchen! Bjoern Schliessmann writes: > Torsten Bronger wrote: > >> Emacs is generally not regarded as being convenient, however, it >> has very strong input methods. I type "\gtrless" and get "?", or >> "\forall" and get "?". Doesn't KNode support UTF-8? > I wonder where the point of this is

Re: Beginner advice

2008-03-30 Thread Marc 'BlackJack' Rintsch
On Mon, 31 Mar 2008 07:23:00 +0200, Paul Scott wrote: > 3. pyXMLRPClib - active? Something better? There is an `xmlrpclib` in the standard library, so there is no need for an external package here. I even think that pyXMLRPClib is the one that's integrated in the standard library, so the externa

Beginner advice

2008-03-30 Thread Paul Scott
I have been tasked to come up with an audio recorder desktop (cross platform if possible - but linux only is OK) that: 1. records a lecture as an MP3 file (pymedia?) 2. Provides a login form for server credentials 3. Uploads via XMLRPC (pyxmlrpclib) to the server as a podcast I have been working

Re: Odd behaviour with list comprehension

2008-03-30 Thread Steve Holden
Terry Reedy wrote: > "Steve Holden" <[EMAIL PROTECTED]> wrote in message [...] > | Well, the fact that the bound variable in the list comprehension does > | indeed remain outside the construct is simply the result of an > | over-zealous wish to emulate for loop semantics. The original reasoning, >

Re: Creating Class Objects in Loop

2008-03-30 Thread John Nagle
Fish wrote: > Hello Folks, > I am reading a CSV file and based on that I am creating TestCase(my > own defined class) objects in a for loop. The problem is each time I > create a new TestCase object in loop, previous objects data is already > copied in that object. What's actually happening to

Re: Rubik's cube translation

2008-03-30 Thread castironpi
On Mar 30, 9:48 pm, "Tim Leslie" <[EMAIL PROTECTED]> wrote: > On Mon, Mar 31, 2008 at 12:24 PM,  <[EMAIL PROTECTED]> wrote: > > How do I get a Rubik's cube translation out of this: > > >  >>> a= numpy.array([[0,1,2],[3,4,5],[6,7,8]]) > >  >>> a > >  array([[0, 1, 2], > >        [3, 4, 5], > >      

Re: Rubik's cube translation

2008-03-30 Thread Tim Leslie
On Mon, Mar 31, 2008 at 12:24 PM, <[EMAIL PROTECTED]> wrote: > How do I get a Rubik's cube translation out of this: > > >>> a= numpy.array([[0,1,2],[3,4,5],[6,7,8]]) > >>> a > array([[0, 1, 2], >[3, 4, 5], >[6, 7, 8]]) > >>> a[:,0],a[:,1],a[:,2] #no good > (array([0, 3, 6]), a

Re: Odd behaviour with list comprehension

2008-03-30 Thread Terry Reedy
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Micah Cowan wrote: | > "Jerry Hill" <[EMAIL PROTECTED]> writes: | > | >> On Fri, Feb 29, 2008 at 10:01 PM, Ken Pu <[EMAIL PROTECTED]> wrote: | >>> Is there a way for me keep the iterating variable in list | >>> compre

Re: Please test Phatch on Windows (was Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL)

2008-03-30 Thread Steve Holden
Stani: You'll be happy to hear that it appears (after a quick test) to work on Vista, though I blush to admit I actually have a Python running on that platform. The font selection is much better than in previous versions - although the names aren't quite the full font names it's pretty easy to

Rubik's cube translation

2008-03-30 Thread castironpi
How do I get a Rubik's cube translation out of this: >>> a= numpy.array([[0,1,2],[3,4,5],[6,7,8]]) >>> a array([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) >>> a[:,0],a[:,1],a[:,2] #no good (array([0, 3, 6]), array([1, 4, 7]), array([2, 5, 8])) >>> I need [[ 6, 3, 0 ], [ 7, 4, 1 ], [ 8, 5, 2

Re: Odd behaviour with list comprehension

2008-03-30 Thread Steve Holden
Micah Cowan wrote: > "Jerry Hill" <[EMAIL PROTECTED]> writes: > >> On Fri, Feb 29, 2008 at 10:01 PM, Ken Pu <[EMAIL PROTECTED]> wrote: >>> Is there a way for me keep the iterating variable in list >>> comprehension local to the list comprehension? >> Kind of. You can use a generator expression

Re: Dispatching functions from a dictionary

2008-03-30 Thread tkpmep
Paul, George, Thanks a mill - the help is greatly appreciated. Thomas Philips -- http://mail.python.org/mailman/listinfo/python-list

Re: python ODF library?

2008-03-30 Thread Bjoern Schliessmann
Matias Surdi wrote: > Found it: > http://opendocumentfellowship.com/development/projects/odfpy While we're at it: This module seems to be centered around creating documents. Where could I possibly find information/examples on how to read an ODF spreadsheet using Python? Regards, Björn -- BO

Re: Serial port error statistics - any comparable data?

2008-03-30 Thread Dan Stromberg
On Sat, 29 Mar 2008 13:14:46 +0200, Hendrik van Rooyen wrote: > Hi, > > I have been doing some tests on a device that we are thinking of > incorporating into a product, and I have seen that reception on a serial > port at 115200 baud over about six metres of RS-232 cable makes > mistakes, to the

Re: question

2008-03-30 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Say you have an auditory waveform. In dream hardware, positives would > accumulate until something, which would trigger a small chain > reaction. In software, with a function f of time t, f( t ), in > constant space, what can you know at t? > > Presume. Silence first,

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Bjoern Schliessmann
Torsten Bronger wrote: > Emacs is generally not regarded as being convenient, however, it > has very strong input methods. I type "\gtrless" and get "?", > or "\forall" and get "?". I wonder where the point of this is. :) Why use fancy unicode chars if they're not better to read (apart from not

Re: Creating Class Objects in Loop

2008-03-30 Thread Gabriel Genellina
En Sun, 30 Mar 2008 19:59:14 -0300, Fish <[EMAIL PROTECTED]> escribió: > Hello Folks, > I am reading a CSV file and based on that I am creating TestCase(my > own defined class) objects in a for loop. The problem is each time I > create a new TestCase object in loop, previous objects data is alread

Re: License of Python

2008-03-30 Thread Bjoern Schliessmann
iu2 wrote: > Due to Competitors... I don't want to expost the language I use A serious competitor that wants to find out _will_ find out, no matter what you try. Regards, Björn -- BOFH excuse #341: HTTPD Error 666 : BOFH was here -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with logic in reading a binary file

2008-03-30 Thread Jorgen Grahn
On Sun, 30 Mar 2008 04:48:59 -0700 (PDT), hdante <[EMAIL PROTECTED]> wrote: > On Mar 30, 4:31 am, John Machin <[EMAIL PROTECTED]> wrote: >> On Mar 30, 3:58 pm, hdante <[EMAIL PROTECTED]> wrote: >> > If you have some legacy binary file that you need to process, try >> > creating a C program that f

Re: Where can I find :

2008-03-30 Thread Jorgen Grahn
On Sat, 29 Mar 2008 21:19:32 -0700, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 29 Mar 2008 20:15:59 -0700 (PDT), pythonnubie > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> Hi All : >> Does anyone know where I can find either a book or a website that >> expla

Creating Class Objects in Loop

2008-03-30 Thread Fish
Hello Folks, I am reading a CSV file and based on that I am creating TestCase(my own defined class) objects in a for loop. The problem is each time I create a new TestCase object in loop, previous objects data is already copied in that object. e.g. my sample CSV file is # -

Re: Using QSystemTrayIcon with PyQt

2008-03-30 Thread Benjamin
On Mar 29, 11:02 pm, Alex Teiche <[EMAIL PROTECTED]> wrote: > Hello, > > I am pretty new to Python, and have never learned C++. I am trying to > implement the following thing into my python application: > > http://doc.trolltech.com/4.3/qsystemtrayicon.html > > Through PyQt. I have been using PyQt

Re: socket error when loading the shell?

2008-03-30 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > using python and wpython. What's wpython? > when using run module or python shell on the run menu in the GUI i > get "socket error, connection refused". > > it worked before, what si wrong now? There's no process listening for the port you try to connect to, so the t

Re: socket error when loading the shell?

2008-03-30 Thread Gabriel Genellina
En Sun, 30 Mar 2008 16:46:00 -0300, <[EMAIL PROTECTED]> escribió: > using python and wpython. Soory, I don't know what wpython is > when using run module or python shell on the run menu in the GUI i get > "socket error, connection refused". > > it worked before, what si wrong now? Try to detect

Export data to OpenDocument Text

2008-03-30 Thread phasma
Hi! I'm trying to save data from sqlite to OpenDocument Text. Code: localtime = time.localtime(time.time()) try: odt_file = zipfile.ZipFile(file_name, "w") except: print("Невозможно открыть файл для

Re: Build complete, now I just need to "install" it...

2008-03-30 Thread Gabriel Genellina
En Sun, 30 Mar 2008 12:04:10 -0300, axl <[EMAIL PROTECTED]> escribió: > I'm going to be adding some features for a python-project with > external modules written in C. However, if I build modules with my > MSVS 2008 compiler (from the Windows SDK), they won't load in Python > 2.5.2, which is bui

Re: Summary of threading for experienced non-Python programmers?

2008-03-30 Thread hdante
On Mar 28, 11:52 am, [EMAIL PROTECTED] wrote: > I'm having trouble explaining the benefits and tradeoffs of threads to my > coworkers and countering their misconceptions about Python's threading model > and facilities. They all come from C++ and are used to thinking of > multithreading as a way to

Re: Dispatching functions from a dictionary

2008-03-30 Thread George Sakkis
On Mar 30, 5:06 pm, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > RVDict= {'1': random.betavariate(1,1), '2': random.expovariate(1), ...} > > This actually calls the functions random.betavariate, etc. when > initializing RVDict. If you print out the contents of

Re: Licensing

2008-03-30 Thread DS
Paul Boddie wrote: > On 29 Mar, 20:24, DS <[EMAIL PROTECTED]> wrote: > >> I'm pretty sure this is the wrong place to ask, but I'm hoping someone >> will point me in the right direction. >> >> I'm getting ready to publish a first open-source project written in >> python. I am planning to use GPL

Re: Summary of threading for experienced non-Python programmers?

2008-03-30 Thread Hrvoje Niksic
Hrvoje Niksic <[EMAIL PROTECTED]> writes: > I believe you stil misunderstand. The select module doesn't provide > an inteface to aio(3). It provides an interface to select() and > poll() system calls, which don't provide asynchronous access to > regular files. It occurred to me that I didn't pr

Re: Tell ya' what:

2008-03-30 Thread Jorgen Grahn
On Fri, 28 Mar 2008 22:01:57 -, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-03-28, Paul Rubin wrote: >> [EMAIL PROTECTED] writes: >>> Did everyone take the course on computer architecture? >> >> Yow! Does your SPEED QUEEN have CABLE? > > Ya know, I was thinking about trying to find an

Re: Pexpect question.

2008-03-30 Thread Jorgen Grahn
On Fri, 28 Mar 2008 08:12:36 -0700 (PDT), Paul Lemelle <[EMAIL PROTECTED]> wrote: > I am trying separate a script that users pexpect into > various functions within the same expect session. The > problem is that the function does not return control > back Main. I do not understand what that sent

Re: Finding Full Path to Process EXE

2008-03-30 Thread misceverything
That's not a problem - I'm only interested in Win2k+. Thanks for the caveat. On a similar note, is there a way (preferably using WMI) to get the full path to the executable that has a port open (the same thing that fport does, just implemented in Python)? -- http://mail.python.org/mailman/listin

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread hdante
On Mar 30, 6:08 pm, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > hdante writes: > > On Mar 30, 9:45 am, Bjoern Schliessmann > [EMAIL PROTECTED]> wrote: > > >> hdante wrote: > > >>> BTW, my opinion is that it's already time that programmer > >>> editors have input methods advanced en

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread hdante
On Mar 30, 3:14 pm, Lie <[EMAIL PROTECTED]> wrote: > On Mar 30, 12:11 pm, hdante <[EMAIL PROTECTED]> wrote: > (snip) > > > BTW, my opinion is that it's already time that programmer editors > > have input methods advanced enough for generating this: > > > if x ≠ 0: > > ∀y ∈ s: > > if y

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Torsten Bronger
Hallöchen! hdante writes: > On Mar 30, 9:45 am, Bjoern Schliessmann [EMAIL PROTECTED]> wrote: > >> hdante wrote: >> >>> BTW, my opinion is that it's already time that programmer >>> editors have input methods advanced enough for generating this: >> >> Could you please list some that do, and are

Re: Dispatching functions from a dictionary

2008-03-30 Thread Paul Rubin
[EMAIL PROTECTED] writes: > RVDict= {'1': random.betavariate(1,1), '2': random.expovariate(1), ...} This actually calls the functions random.betavariate, etc. when initializing RVDict. If you print out the contents of RVDict you'll see that each value in it is just a floating point number, n

standard input, for s in f, and buffering

2008-03-30 Thread Jorgen Grahn
One thing that has annoyed me for quite some time. I apologize if it has been discussed recently. If I run this program on Unix (Python 2.4.4, on Debian Linux) import sys for s in sys.stdin: print '', s , and type the input on the keyboard rather than piping a file into it, t

Re: Creating a python c-module: passing double arrays to c functions. segmentation fault. swig

2008-03-30 Thread sturlamolden
On 30 Mar, 22:21, [EMAIL PROTECTED] wrote: > Hello everybody, > > I'm building a python module to do some heavy computation in C (for > dynamic time warp distance computation). Why don't you just ctypes and NumPy arrays instead? # double timewarp(double x[], int lenx, double y[], int leny); imp

Newbie Question.. How to add python to system path in windows?

2008-03-30 Thread David Anderson
hi All, I have my Phitno 25 installed on the default directory, but How can I dd to the ubild path? Thx -- http://mail.python.org/mailman/listinfo/python-list

Dispatching functions from a dictionary

2008-03-30 Thread tkpmep
To keep a simulation tidy, I created a dispatcher that generates random variables drawn from various distributions as follows: import random RVType = 1 #Type of random variable - pulled from RVDict RVDict= {'1': random.betavariate(1,1), '2': random.expovariate(1), '3': rand

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread hdante
On Mar 30, 9:45 am, Bjoern Schliessmann wrote: > hdante wrote: > > BTW, my opinion is that it's already time that programmer editors > > have input methods advanced enough for generating this: > > Could you please list some that do, and are also convenient? AFAICT there's none. This should be e

Re: Error Raised But dont know what it means

2008-03-30 Thread David Anderson
I found the problem Topic closed On Sun, Mar 30, 2008 at 5:07 PM, David Anderson <[EMAIL PROTECTED]> wrote: > Here is the code: > This one raises the error: > def criaLista(self): > self.listbox.Clear() > for dupla in self.duplas: > self.listbox.Append(dupla.__str__()

Creating a python c-module: passing double arrays to c functions. segmentation fault. swig

2008-03-30 Thread kmgrds
Hello everybody, I'm building a python module to do some heavy computation in C (for dynamic time warp distance computation). The module is working perfectly most of the time, which makes it so difficult to track down the error. and I finally figured out that the strange segmentation faults I get

Re: Summary of threading for experienced non-Python programmers?

2008-03-30 Thread Hrvoje Niksic
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: >> Note that I said "*file* input/output". Twisted and asyncore are >> about asynchronous socket programming that polls over nonblocking file >> descriptors such as found in socket programming, not about wrapping >> aio(3) and the equivalent Windows

Re: Error Raised But dont know what it means

2008-03-30 Thread David Anderson
Here is the code: This one raises the error: def criaLista(self): self.listbox.Clear() for dupla in self.duplas: self.listbox.Append(dupla.__str__()) This one works well but doesn't raises error dupla1 = Duplas("2422", "2455") dupla2 = Duplas("454", "15") list = [] lis

Error Raised But dont know what it means

2008-03-30 Thread David Anderson
Well, I'm dealing with files in Pickle, I'm saving at the file a List of Objects from the same Class, When I try to retrive this information and try to iterate over them this error is raised: TypeError: 'instancemethod' object is not iterable But if I just print the method I get the 'real thing' w

socket error when loading the shell?

2008-03-30 Thread vokinloksar
hi using python and wpython. when using run module or python shell on the run menu in the GUI i get "socket error, connection refused". it worked before, what si wrong now? and i cant find where to start the shell directly. think i had an exe before but cant seem to find it now. -- http://mail

question

2008-03-30 Thread castironpi
Say you have an auditory waveform. In dream hardware, positives would accumulate until something, which would trigger a small chain reaction. In software, with a function f of time t, f( t ), in constant space, what can you know at t? Presume. Silence first, then a broken triad vamps. How long

Re: License of Python

2008-03-30 Thread Steve Holden
iu2 wrote: > Hi guys, > > I'd like to use Python in a commercial application. In fact I would > like to write the application entirely in Python. > But I think I wouldn't like telling what language the application is > written in. > The problem is that including Python's license in the binary, whi

Vote for a New EuroPython Logo!

2008-03-30 Thread Paul Boddie
Earlier this year, the organisers of EuroPython (the annual European Python community conference) decided it was time to update the conference logo: the current logo has been in use since EuroPython began back in 2002. We asked for and received many great submissions for a new logo, and we've made

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Dan Bishop
On Mar 29, 12:34 pm, Lie <[EMAIL PROTECTED]> wrote: > On Mar 29, 5:55 pm, [EMAIL PROTECTED] wrote: > > > I don't know if this is the right place to discuss the death of <> in > > Python 3.0, or if there have been any meaningful discussions posted > > before (hard to search google with '<>' keyword)

Re: Py-Lib 0.9.1 released

2008-03-30 Thread Aster Jian
great works, i will try it. Aster Jian. - Original Message - From: "Carl Friedrich Bolz" <[EMAIL PROTECTED]> To: Sent: Monday, March 31, 2008 2:47 AM Subject: ANN: Py-Lib 0.9.1 released > py lib 0.9.1: bugfix release > = > > The py lib team has just releas

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Gabriel Genellina
En Sun, 30 Mar 2008 11:10:20 -0300, MRAB <[EMAIL PROTECTED]> escribió: > On Mar 30, 6:35 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Sun, 30 Mar 2008 02:11:33 -0300, hdante <[EMAIL PROTECTED]> escribió: >> >> > BTW, my opinion is that it's already time that programmer editors >> >

ANN: Py-Lib 0.9.1 released

2008-03-30 Thread Carl Friedrich Bolz
py lib 0.9.1: bugfix release = The py lib team has just released version 0.9.1 of the py lib - a library aiming to support agile and test-driven python development on various levels. This is mostly a bugfix release, with a couple of new features sneaked in. Most import

Re: html DOM

2008-03-30 Thread Paul Boddie
On 30 Mar, 01:09, "Sam the Cat" <[EMAIL PROTECTED]> wrote: > Is there a package that would allow me the same or similar functionality for > modifying html code via the DOM model as I have in JavaScript ? I'd like to > parse an html file, then modify it and save the result. You could try libxml2do

Re: Licensing

2008-03-30 Thread Paul Boddie
On 29 Mar, 20:24, DS <[EMAIL PROTECTED]> wrote: > I'm pretty sure this is the wrong place to ask, but I'm hoping someone > will point me in the right direction. > > I'm getting ready to publish a first open-source project written in > python. I am planning to use GPLas the license. However, in my

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Lie
On Mar 30, 12:11 pm, hdante <[EMAIL PROTECTED]> wrote: (snip) > BTW, my opinion is that it's already time that programmer editors > have input methods advanced enough for generating this: > > if x ≠ 0: > ∀y ∈ s: > if y ≥ 0: f1(y) > else: f2(y) That would be a nightmare. Progr

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Lie
On Mar 30, 5:25 pm, Bjoern Schliessmann wrote: > Lie wrote: > > Ah yes, that is also used (I completely forgot about that one, my > > math's aren't that sharp anymore) and I think it's used more > > frequently than ><. > > Where did you read that (I mean, which country)? I've never seen > this sig

Re: License of Python

2008-03-30 Thread sturlamolden
On 30 Mar, 17:16, iu2 <[EMAIL PROTECTED]> wrote: > Due to Competitors... I don't want to expost the language I use Either your comepetitors will figure it out, or they don't care. Using Python can be a major competitive advance. If your competitors are smart enough to realise that, you are in tro

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Lie
On Mar 30, 7:48 pm, Bjoern Schliessmann wrote: > Torsten Bronger wrote: > > Maybe he means "?". > > Haven't seen this either, nor do I think it's the same than "<>". > From afar, it looks more like "><". Actually I meant an X-like symbol that is made not by crossing but by ><. I retracted saying

Re: ANN: pygame 1.8 released

2008-03-30 Thread sturlamolden
This is good news, particularly the NumPy support for surface and pixel arrays. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Dan Bishop
On Mar 30, 5:40 am, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > Bjoern Schliessmann writes: > > Lie wrote: > > >> Ah yes, that is also used (I completely forgot about that one, my > >> math's aren't that sharp anymore) and I think it's used more > >> frequently than ><. > > > Where

Re: License of Python

2008-03-30 Thread Lie
On Mar 30, 10:28 pm, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > On Sun, 30 Mar 2008 08:16:39 -0700 (PDT) > > iu2 <[EMAIL PROTECTED]> wrote: > > > > I'd like to use Python in a commercial application. In fact I would > > > > like to write the application entirely in Python. > > > > But I think

Re: Buffer Overflow with Python 2.5 on Vista in import site

2008-03-30 Thread Fuzzyman
On Mar 30, 3:53 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Mar 2008 17:34:27 -0300, Fuzzyman <[EMAIL PROTECTED]> escribió: > > > A very odd error with Python 2.5 (both 2.5.1 and 2.5.2 from the > > official msi installers and running on Vista under Parallels on the > > Mac). > >

Re: "Soup Strainer" for ElementSoup?

2008-03-30 Thread Fredrik Lundh
erikcw wrote: > I'm parsing real-world HTML with BeautifulSoup and XML with > cElementTree. > > I'm guessing that the only benefit to using ElementSoup is that I'll > have one less API to keep track of, right? Or are there memory > benefits in converting the Soup object to an ElementTree? It's

Re: regarding xml elements

2008-03-30 Thread Fredrik Lundh
Raj kumar wrote: > document.createElement("abc") > and i appeneded it by using append() method. > But how i can reflect this change to my xml file? write it out again: http://python.org/doc/current/lib/dom-objects.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Using QSystemTrayIcon with PyQt

2008-03-30 Thread Phil Thompson
On Sunday 30 March 2008, Phil Thompson wrote: > On Sunday 30 March 2008, Alex Teiche wrote: > > On Mar 30, 2:08 am, Phil Thompson <[EMAIL PROTECTED]> wrote: > > > On Sunday 30 March 2008, Alex Teiche wrote: > > > > Hello, > > > > > > > > I am pretty new to Python, and have never learned C++. I am

Re: Build complete, now I just need to "install" it...

2008-03-30 Thread axl
On 30 Mar, 17:40, "Ryan Ginstrom" <[EMAIL PROTECTED]> wrote: > Another option is to compile your extensions with gcc, and specify that it > link to MSVCR71.dll as the C runtime. > > For MinGW, it's sufficient to edit the specs (e.g. in > C:\MinGW\lib\gcc\mingw32\3.4.2) like so: > *libgcc: > %{mthre

RE: Build complete, now I just need to "install" it...

2008-03-30 Thread Ryan Ginstrom
> On Behalf Of axl > Since I don't have access to MSVS 2003 I need to rebuild > Python using MSVS 2008 in order for the binaries to go along. Another option is to compile your extensions with gcc, and specify that it link to MSVCR71.dll as the C runtime. For MinGW, it's sufficient to edit the sp

Re: Create executable from executable with py2exe

2008-03-30 Thread Konstantin Veretennicov
On Sat, Mar 29, 2008 at 3:23 PM, <[EMAIL PROTECTED]> wrote: > Hello, > > Is there any example how can I create executable ... with py2exe > Check out PyBuilder's source code (http://pybuilder.sourceforge.net/). -- kv -- http://mail.python.org/mailman/listinfo/python-list

Re: License of Python

2008-03-30 Thread D'Arcy J.M. Cain
On Sun, 30 Mar 2008 08:16:39 -0700 (PDT) iu2 <[EMAIL PROTECTED]> wrote: > > > I'd like to use Python in a commercial application. In fact I would > > > like to write the application entirely in Python. > > > But I think I wouldn't like telling what language the application is > > > written in. > >

Re: Passing function objects to timeit

2008-03-30 Thread Steven D'Aprano
On Sun, 30 Mar 2008 15:03:21 +0200, Peter Otten wrote: > Maybe the following enhancement of timeit would be worthwhile? [snip] Passing a namespace argument would be excellent. > By the way, haven't we been there before, two years ago? > > http://mail.python.org/pipermail/python-list/2006-Februa

Re: License of Python

2008-03-30 Thread iu2
On 30 מרץ, 15:55, Lie <[EMAIL PROTECTED]> wrote: > On Mar 30, 6:42 pm, iu2 <[EMAIL PROTECTED]> wrote: > > > Hi guys, > > > I'd like to use Python in a commercial application. In fact I would > > like to write the application entirely in Python. > > But I think I wouldn't like telling what language

Re: Using QSystemTrayIcon with PyQt

2008-03-30 Thread Phil Thompson
On Sunday 30 March 2008, Alex Teiche wrote: > On Mar 30, 2:08 am, Phil Thompson <[EMAIL PROTECTED]> wrote: > > On Sunday 30 March 2008, Alex Teiche wrote: > > > Hello, > > > > > > I am pretty new to Python, and have never learned C++. I am trying to > > > implement the following thing into my pyth

Build complete, now I just need to "install" it...

2008-03-30 Thread axl
Hi, I'm going to be adding some features for a python-project with external modules written in C. However, if I build modules with my MSVS 2008 compiler (from the Windows SDK), they won't load in Python 2.5.2, which is built with MSVS 2003. Since I don't have access to MSVS 2003 I need to rebuild

Re: Serial port error statistics - any comparable data?

2008-03-30 Thread Hendrik van Rooyen
On Sunday 30 March 2008 12:19:58 Bjoern Schliessmann wrote: > Diez B. Roggisch wrote: > > if you have the chance, try & attach a machine with legacy rs232 > > port, and see if the errors still remain. > > Additionally, what kind of buffers does your device have? I'm using > pyserial to control a ve

Re: Problem with sqlite

2008-03-30 Thread aiwarrior
Ok regarding Gerhard's comment of the try, except, pass, i came to understand that it's really bad code. And i should have referred that i put that there be cause i was getting: Traceback (most recent call last): File "C:\Python25\Projects\cp.py", line 48, in db = db() File "C:\Python25\P

Re: Problem with sqlite

2008-03-30 Thread aiwarrior
Ok regarding Gerhard's comment of the try, except, pass, i came to understand that it's really bad code. And i should have referred that i put that there be cause i was getting: Traceback (most recent call last): File "C:\Python25\Projects\cp.py", line 48, in db = db() File "C:\Python25\P

Re: Using QSystemTrayIcon with PyQt

2008-03-30 Thread Alex Teiche
On Mar 30, 2:08 am, Phil Thompson <[EMAIL PROTECTED]> wrote: > On Sunday 30 March 2008, Alex Teiche wrote: > > > Hello, > > > I am pretty new to Python, and have never learned C++. I am trying to > > implement the following thing into my python application: > > >http://doc.trolltech.com/4.3/qsyste

Re: Passing function objects to timeit

2008-03-30 Thread George Sakkis
On Mar 30, 9:03 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Steven D'Aprano wrote: > > On Sun, 30 Mar 2008 01:27:18 -0300, Gabriel Genellina wrote: > > >> Second try: > > ... > >> Horrible, I know. Those wrapper1,wrapper2,wrapper3... keep growing with > >> each call. But it's the only way I could

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread MRAB
On Mar 30, 6:35 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 30 Mar 2008 02:11:33 -0300, hdante <[EMAIL PROTECTED]> escribió: > > > BTW, my opinion is that it's already time that programmer editors > > have input methods advanced enough for generating this: > > > if x ≠ 0: > >

Re: Serial port error statistics - any comparable data?

2008-03-30 Thread Hendrik van Rooyen
"Diez B. Roggisch" wrote: >RS232 is unfortunately as bad as a "protocol" as it can get. I've used >it for communication with a microcontroller for just a few bytes every >second. And it failed miserably, so I needed to implement a protocol on >top of it. We normally do this anyway, except for st

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: > I don't know if this is the right place to discuss the death of <> in > Python 3.0, or if there have been any meaningful discussions posted > before (hard to search google with '<>' keyword), but why would anyone > prefer the comparison operator != over <>??? > > I've wr

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Torsten Bronger
Hallöchen! Bjoern Schliessmann writes: > hdante wrote: > >> BTW, my opinion is that it's already time that programmer editors >> have input methods advanced enough for generating this: > > Could you please list some that do, and are also convenient? Define "convenient". Emacs is generally not r

Re: Passing function objects to timeit

2008-03-30 Thread Peter Otten
Steven D'Aprano wrote: > On Sun, 30 Mar 2008 01:27:18 -0300, Gabriel Genellina wrote: > >> Second try: > ... >> Horrible, I know. Those wrapper1,wrapper2,wrapper3... keep growing with >> each call. But it's the only way I could find, at least without changing >> the code template used by timeit.

Re: Passing function objects to timeit

2008-03-30 Thread Steven D'Aprano
On Sun, 30 Mar 2008 10:55:25 +, Steven D'Aprano wrote: > Perhaps it's time for me to take a different approach. Since I can't > call timeit, and I can't inherit from it (same problem with state being > shared between instances), perhaps I should write my own timer. > > > import timeit > impo

Re: License of Python

2008-03-30 Thread Lie
On Mar 30, 6:42 pm, iu2 <[EMAIL PROTECTED]> wrote: > Hi guys, > > I'd like to use Python in a commercial application. In fact I would > like to write the application entirely in Python. > But I think I wouldn't like telling what language the application is > written in. Why is the reason for that?

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Bjoern Schliessmann
Torsten Bronger wrote: > Maybe he means "?". Haven't seen this either, nor do I think it's the same than "<>". >From afar, it looks more like "><". But this does more look like South Park style shut eyes than an operator. :) Regards, Björn -- BOFH excuse #407: Route flapping at the NAP. -

Re: Problem with python

2008-03-30 Thread Lie
[EMAIL PROTECTED] wrote to me: (snip) > OK thanks mate you're the man :) > One more question though :P > If I write a python script in a text editor (I use Programmers > Notepad), how do I write indentations properly? e.g.: > --- > temperature = input

Re: Why prefer != over <> for Python 3.0?

2008-03-30 Thread Bjoern Schliessmann
hdante wrote: > BTW, my opinion is that it's already time that programmer editors > have input methods advanced enough for generating this: Could you please list some that do, and are also convenient? Regards, Björn -- BOFH excuse #288: Hard drive sleeping. Let it wake up on it's own... -

Re: python ODF library?

2008-03-30 Thread Bjoern Schliessmann
Matias Surdi wrote: > Do yo know any good OpenDocumentFormat library for python? > > I'm starting a project on wich I'll have to programatically modify > ODF text documments, so, after reinventing the wheel, I'd like to > know if already something exists. Probably this will help: http://wiki.se

Re: python ODF library?

2008-03-30 Thread hdante
On Mar 30, 9:29 am, Matias Surdi <[EMAIL PROTECTED]> wrote: > Do yo know any good OpenDocumentFormat library for python? > > I'm starting a project on wich I'll have to programatically modify ODF > text documments, so, after reinventing the wheel, I'd like to know if > already something exists. > >

Re: problem with logic in reading a binary file

2008-03-30 Thread Diez B. Roggisch
> > Whatever you say. Can't express what your approval means to me! Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: python ODF library?

2008-03-30 Thread Matias Surdi
Matias Surdi escribió: > Do yo know any good OpenDocumentFormat library for python? > > I'm starting a project on wich I'll have to programatically modify ODF > text documments, so, after reinventing the wheel, I'd like to know if > already something exists. > > Thanks a lot. > Found it: ht

Re: problem with logic in reading a binary file

2008-03-30 Thread hdante
On Mar 30, 9:23 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > hdante schrieb: > > > > > On Mar 30, 4:31 am, John Machin <[EMAIL PROTECTED]> wrote: > >> On Mar 30, 3:58 pm, hdante <[EMAIL PROTECTED]> wrote: > > >>> On Mar 29, 3:44 pm, "[EMAIL PROTECTED]" > >>> <[EMAIL PROTECTED]> wrote: >

python ODF library?

2008-03-30 Thread Matias Surdi
Do yo know any good OpenDocumentFormat library for python? I'm starting a project on wich I'll have to programatically modify ODF text documments, so, after reinventing the wheel, I'd like to know if already something exists. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-lis

Re: problem with logic in reading a binary file

2008-03-30 Thread Diez B. Roggisch
hdante schrieb: > On Mar 30, 4:31 am, John Machin <[EMAIL PROTECTED]> wrote: >> On Mar 30, 3:58 pm, hdante <[EMAIL PROTECTED]> wrote: >> >> >> >>> On Mar 29, 3:44 pm, "[EMAIL PROTECTED]" >>> <[EMAIL PROTECTED]> wrote: Hello, I am having trouble writing the code to read a binary string. I

  1   2   >