Re: Newsgroups and mailing lists (was Re: Slightly OT: Why all thespam?)

2007-05-25 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: >I *did* try to explain all this a week or two ago. Did I not make myself >clear? Aah ! This makes a couple of assumptions, none of which are necessarily based on fact, namely: 1) That the people involved read what you wrote. 2) That they understood i

Re: csv.reader length?

2007-05-25 Thread Peter Otten
Larry Bates wrote: > Did you try: > > import crystal_ball > > num_lines=crystal_ball(reader) Yes. The answer was a little more comprehensive than I had asked for. >>> print num_lines 42 Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing NS in ElementTree

2007-05-25 Thread Stefan Behnel
Sebastian Bassi wrote: > I would like to remove the namespace information from my elements and > have just the tag without this information. This > "{http://uniprot.org/uniprot}"; is preapended into all my output. for el in root.getiterator(): if el.tag[0] == '{': el.tag = el.tag

Re: NLTK: Natural language processing in Python

2007-05-25 Thread tool69
NLTK seems very interesting, and the tutorial are very well done. Thanks for it ! Kib² -- http://mail.python.org/mailman/listinfo/python-list

Removing NS in ElementTree

2007-05-25 Thread Sebastian Bassi
I would like to remove the namespace information from my elements and have just the tag without this information. This "{http://uniprot.org/uniprot}"; is preapended into all my output. I understand that the solution is related with "_namespace_map" but I don't know much more. >>> for x in eleroot

NLTK: Natural language processing in Python

2007-05-25 Thread Steven Bird
NLTK — the Natural Language Toolkit — is a suite of open source Python modules, data sets and tutorials supporting research and development in natural language processing. It comes with 50k lines of code, 300Mb of datasets, and a 360 page book which teaches both Python and Natural Language Process

Re: Large Amount of Data

2007-05-25 Thread Vyacheslav Maslov
Larry Bates wrote: > Jack wrote: >> Thanks for the replies! >> >> Database will be too slow for what I want to do. >> >> "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> In <[EMAIL PROTECTED]>, Jack wrote: >>> I need to process large amount of data

Re: Long double in Python

2007-05-25 Thread [EMAIL PROTECTED]
On May 25, 2:40?pm, Charles Vejnar <[EMAIL PROTECTED]> wrote: > Hi, > > I have a C library using "long double" numbers. I would like to be able to > keep this precision in Python (even if it's not portable) : for the moment I > have to cast the "long double" numbers to "double" numbers. > > 1st sol

Re: conditionally creating functions within a class?

2007-05-25 Thread Steve Holden
kaens wrote: > So, I have a class that has to retrieve some data from either xml or > an sql database. > This isn't a problem, but I was thinking "hey, it would be cool if I > could just not define the functions for say xml if I'm using sql", so > I did some fiddling around with the interpreter. >

Re: Module listing in order.

2007-05-25 Thread Steve Holden
Wildemar Wildenburger wrote: > Peter Otten wrote: >> Ramashish Baranwal wrote: >> >> > I want a way to get the contents in the order of their declaration, > i.e. [B, A, D]. Does anyone know a way to get it? > My suggestion would be to actually parse the text of the modu

Re: conditionally creating functions within a class?

2007-05-25 Thread kaens
On 5/25/07, kaens <[EMAIL PROTECTED]> wrote: > > then I try doing this within a function: meant "within a class" here, whoops. -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Amount of Data

2007-05-25 Thread kaens
On 5/25/07, Jack <[EMAIL PROTECTED]> wrote: > I need to process large amount of data. The data structure fits well > in a dictionary but the amount is large - close to or more than the size > of physical memory. I wonder what will happen if I try to load the data > into a dictionary. Will Python us

Re: How to get started as a xhtml python mysql freelancer ?

2007-05-25 Thread gert
On May 26, 2:09 am, Paul McNett <[EMAIL PROTECTED]> wrote: > gert wrote: > > I made something that i was hoping it could make people happy enough > > so i could make a living by providing support for commercial use of > >http://sourceforge.net/projects/dfo/ > > > But in reality i am a lousy sales m

Re: Module listing in order.

2007-05-25 Thread Wildemar Wildenburger
Peter Otten wrote: > Ramashish Baranwal wrote: > > I want a way to get the contents in the order of their declaration, i.e. [B, A, D]. Does anyone know a way to get it? >>> My suggestion would be to actually parse the text of the module. "Brute >>> force" is what it's cal

Re: printing list, is this a bug?

2007-05-25 Thread William Chang
oh okay. thanks. -- http://mail.python.org/mailman/listinfo/python-list

conditionally creating functions within a class?

2007-05-25 Thread kaens
So, I have a class that has to retrieve some data from either xml or an sql database. This isn't a problem, but I was thinking "hey, it would be cool if I could just not define the functions for say xml if I'm using sql", so I did some fiddling around with the interpreter. First, I try conditiona

Re: How to get started as a xhtml python mysql freelancer ?

2007-05-25 Thread [EMAIL PROTECTED]
On May 25, 6:48 pm, gert <[EMAIL PROTECTED]> wrote: > I made something that i was hoping it could make people happy enough > so i could make a living by providing support for commercial use > ofhttp://sourceforge.net/projects/dfo/ > > But in reality i am a lousy sales men and was wondering how you

Re: How to get started as a xhtml python mysql freelancer ?

2007-05-25 Thread Paul McNett
gert wrote: > I made something that i was hoping it could make people happy enough > so i could make a living by providing support for commercial use of > http://sourceforge.net/projects/dfo/ > > But in reality i am a lousy sales men and was wondering how you people > sell stuff as a developer ?

How to get started as a xhtml python mysql freelancer ?

2007-05-25 Thread gert
I made something that i was hoping it could make people happy enough so i could make a living by providing support for commercial use of http://sourceforge.net/projects/dfo/ But in reality i am a lousy sales men and was wondering how you people sell stuff as a developer ? -- http://mail.python.o

Re: problem with eval while using PythonCard

2007-05-25 Thread 7stud
On May 25, 4:43 pm, "Michal Lipinski" <[EMAIL PROTECTED]> wrote: > now it's working just fine. but still I dont know why eval dont work ? > > and thx for help > > 25 May 2007 15:05:03 -0700, 7stud <[EMAIL PROTECTED]>: > > > > > Here's a complete example: > > > ### > > #create objec

Re: csv.reader length?

2007-05-25 Thread John Machin
On May 26, 4:49 am, cjl <[EMAIL PROTECTED]> wrote: > P: > > Stupid question: > > reader = csv.reader(open('somefile.csv')) > for row in reader: > do something > > Any way to determine the "length" of the reader (the number of rows) > before iterating through the rows? > > -CJL Of course not. A

Re: webbrowser module bug?

2007-05-25 Thread Paul Boddie
Ron Adam wrote: > > Reseting the default browser with the gnome default application window > confirmed this. The browser selection can either have the quotes around > the args "%s" paremteter, or not depending on how and what sets it. > > Seems to me it should be quoted unless spaces in path names

Re: matplotlib, usetex

2007-05-25 Thread Bill Jackson
Alexander Schmolck wrote the following on 05/25/2007 02:33 PM: > (BTW what happens if you do axis([0,128,0,128])). In [1]: import pylab In [2]: pylab.axis([0,128,0,128]) In [3]: pylab.show() --- Traceback (most recent cal

Re: printing list, is this a bug?

2007-05-25 Thread Robert Kern
William Chang wrote: > Is the different behavior between __repr__ and __str__ intentional > when it comes to printing lists? Basically I want to print out a list > with elements of my own class, but when I overwrite __str__, __str__ > doesn't get called but if I overwrite __repr__, __repr__ will ge

Re: Long double in Python

2007-05-25 Thread Robert Kern
Charles Vejnar wrote: > Hi, > > I have a C library using "long double" numbers. I would like to be able to > keep this precision in Python (even if it's not portable) : for the moment I > have to cast the "long double" numbers to "double" numbers. > > 1st solution . Is it possible that by re-co

Re: Find the closest relative

2007-05-25 Thread MRAB
On May 25, 12:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 25 May 2007 05:09:00 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribió: > > > > > Vehicle > > | > > |--- Two Wheeler > > | | > > | |--- BatteryPowered > > | |--- PetrolPower

Re: csv.reader length?

2007-05-25 Thread Larry Bates
Peter Otten wrote: > 7stud wrote: > >> On May 25, 12:49 pm, cjl <[EMAIL PROTECTED]> wrote: > >>> reader = csv.reader(open('somefile.csv')) >>> for row in reader: >>> do something >>> >>> Any way to determine the "length" of the reader (the number of rows) >>> before iterating through the rows

Re: problem with eval while using PythonCard

2007-05-25 Thread Michal Lipinski
now it's working just fine. but still I dont know why eval dont work ? and thx for help 25 May 2007 15:05:03 -0700, 7stud <[EMAIL PROTECTED]>: > Here's a complete example: > > ### > #create object 's': > > class S(object):pass > class X(object):pass > class Y(object):pass > > s =

Re: Large Amount of Data

2007-05-25 Thread Larry Bates
Jack wrote: > Thanks for the replies! > > Database will be too slow for what I want to do. > > "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> In <[EMAIL PROTECTED]>, Jack wrote: >> >>> I need to process large amount of data. The data structure fits we

Re: problem with eval while using PythonCard

2007-05-25 Thread 7stud
Here's a complete example: ### #create object 's': class S(object):pass class X(object):pass class Y(object):pass s = S() s.components = X() s.components.d1 = Y() s.components.d2 = Y() s.components.d3 = Y() ## ## set some initial values: f

Re: problem with eval while using PythonCard

2007-05-25 Thread 7stud
On May 25, 3:33 pm, "Michal Lipinski" <[EMAIL PROTECTED]> wrote: > Hi > > its my first post. I have a problem, I want to user eval() function in > a for loop to set labels to staticText so i done something like this: > > dzien=self.components.Calendar.GetDate().GetDay() >for i in range(1,8):

Re: matplotlib, usetex

2007-05-25 Thread Alexander Schmolck
Bill Jackson <[EMAIL PROTECTED]> writes: > > The problem does not exist when text.usetex is False. Ideas? I have no idea whether this will resolve your problem, but you could try updating to 0.90 (BTW what happens if you do axis([0,128,0,128])). cheers, 'as -- http://mail.python.org/mailman/l

problem with eval while using PythonCard

2007-05-25 Thread Michal Lipinski
Hi its my first post. I have a problem, I want to user eval() function in a for loop to set labels to staticText so i done something like this: dzien=self.components.Calendar.GetDate().GetDay() for i in range(1,8): act=dzien+i -1 eval( 'self.components.d' + str(i) +

printing list, is this a bug?

2007-05-25 Thread William Chang
Is the different behavior between __repr__ and __str__ intentional when it comes to printing lists? Basically I want to print out a list with elements of my own class, but when I overwrite __str__, __str__ doesn't get called but if I overwrite __repr__, __repr__ will get called. Is this a bug? F

matplotlib, usetex

2007-05-25 Thread Bill Jackson
Hi, I'm having some trouble plotting with the following matplotlibrc: text.usetex : True I tried clearing the cache files under ~/.matplotlib, but this did not help the problem. I'd post on the matplotlib mailing list, but I have a hard enough time browsing sourceforge's achives (frequen

Long double in Python

2007-05-25 Thread Charles Vejnar
Hi, I have a C library using "long double" numbers. I would like to be able to keep this precision in Python (even if it's not portable) : for the moment I have to cast the "long double" numbers to "double" numbers. 1st solution . Is it possible that by re-compiling Python, Python Float object

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Ron Adam wrote: > Got it. > > It looks like the problem started when I told firefox to make itself > the default browser. That changed the way webbrowser.py figured out the > browser to use. So instead of trying them in order, it asked the gnome > configure tool for it. > > def register

Re: csv.reader length?

2007-05-25 Thread Peter Otten
7stud wrote: > On May 25, 12:49 pm, cjl <[EMAIL PROTECTED]> wrote: >> reader = csv.reader(open('somefile.csv')) >> for row in reader: >> do something >> >> Any way to determine the "length" of the reader (the number of rows) >> before iterating through the rows? No. You have to read the reco

Re: sockets, gethostname() changing

2007-05-25 Thread half . italian
On May 24, 8:04 pm, 7stud <[EMAIL PROTECTED]> wrote: > Hi, > > I'm experimenting with a basic socket program(from a book), and both > the client and server programs are on my computer. In both programs, > I call socket.gethostname(), but I discovered that when I am connected > to the internet, bo

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Ron Adam wrote: > Paul Boddie wrote: >> On 25 May, 00:03, Ron Adam <[EMAIL PROTECTED]> wrote: >>> Is anyone else having problems with the webbrowser module? >>> >>> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >>> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >>> Type "help", "copyright"

unhandled exception question

2007-05-25 Thread joshusdog
I'm working on a test application that embeds the Python interpreter. I have the following problem... I've created my own interactive interpreter loop. Essentially, it reads the command from the prompt and calls the following C code: PyObject* pMainModule = PyImport_AddModule("__main__");

Re: csv.reader length?

2007-05-25 Thread 7stud
On May 25, 12:49 pm, cjl <[EMAIL PROTECTED]> wrote: > P: > > Stupid question: > > reader = csv.reader(open('somefile.csv')) > for row in reader: > do something > > Any way to determine the "length" of the reader (the number of rows) > before iterating through the rows? > > -CJL How about: f =

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Paul Boddie wrote: > On 25 May, 00:03, Ron Adam <[EMAIL PROTECTED]> wrote: >> Is anyone else having problems with the webbrowser module? >> >> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >> Type "help", "copyright", "credits" or "license"

Re: Module listing in order.

2007-05-25 Thread Peter Otten
Ramashish Baranwal wrote: >> > I want a way to get the contents in the order of their declaration, >> > i.e. [B, A, D]. Does anyone know a way to get it? >> >> My suggestion would be to actually parse the text of the module. "Brute >> force" is what it's called ;). But doing so with, say, pyparsin

Re: Module listing in order.

2007-05-25 Thread Ramashish Baranwal
> > I want a way to get the contents in the order of their declaration, > > i.e. [B, A, D]. Does anyone know a way to get it? > > My suggestion would be to actually parse the text of the module. "Brute > force" is what it's called ;). But doing so with, say, pyparsing > shouldn't be *very* difficul

csv.reader length?

2007-05-25 Thread cjl
P: Stupid question: reader = csv.reader(open('somefile.csv')) for row in reader: do something Any way to determine the "length" of the reader (the number of rows) before iterating through the rows? -CJL -- http://mail.python.org/mailman/listinfo/python-list

Re: stdlib doc for logger.findCaller() needs update.

2007-05-25 Thread Vinay Sajip
On May 25, 12:27 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > > Is a further 2.4 release planned? > > I'd have thought that unless a security issue appears the answer is > likely to be "no". > You never know - and it didn't take long to commit the change to release24-maint, so why not?! Regards,

Re: Newsgroups and mailing lists (was Re: Slightly OT: Why all thespam?)

2007-05-25 Thread Terry Reedy
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I *did* try to explain all this a week or two ago. Did I not make myself clear? I could ask the same. Quoting from that post: | All I am saying is that it's difficult to catch *everything* when so | much of the cont

Re: webbrowser module bug?

2007-05-25 Thread Paul Boddie
On 25 May, 00:03, Ron Adam <[EMAIL PROTECTED]> wrote: > Is anyone else having problems with the webbrowser module? > > Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >

Re: Proxying every function in a module

2007-05-25 Thread Steve Holden
Josh West wrote: >> First off, don't attempt to start a new thread by replying to a previous >> one. Many newsreaders will merge the two, confusing the hell out of >> everyone and generally not helping. >> > > Ahh, yes. I see what you mean. Explains why it didn't appear the first > time I po

Re: email modul with writing to mboxes (and locking) for python 2.4.*?

2007-05-25 Thread John J. Lee
Matej Cepl <[EMAIL PROTECTED]> writes: > Is there somewhere support for the extension of email module, > which would support writing to (and creating new) mbox folders > (with all bells and whistles, like locking)? It seems to me that > current (Python 2.4.*, I even tried email package > 4.0.2

ICMLA 2007: CALL FOR PAPERS

2007-05-25 Thread icmla
ICMLA 2007: CALL FOR PAPERS The Sixth International Conference on Machine Learning and Applications ICMLA 2007 December 13-15, 2007 Cincinnati, OH, USA

Re: optparse: list out entered values

2007-05-25 Thread Steven Bethard
Nirnimesh wrote: > On May 25, 3:07 am, Nirnimesh <[EMAIL PROTECTED]> wrote: >> I'm using optparse.OptionParser for parsing command line arguments. >> >> parser = optparse.OptionParser() >> parser.add_option("-x", "--xample", help="example", >> default="nothing", >> dest="ex") >> options

Re: Large Amount of Data

2007-05-25 Thread Jack
Thanks for the replies! Database will be too slow for what I want to do. "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In <[EMAIL PROTECTED]>, Jack wrote: > >> I need to process large amount of data. The data structure fits well >> in a dictionary but t

Re: Large Amount of Data

2007-05-25 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Jack wrote: > I need to process large amount of data. The data structure fits well > in a dictionary but the amount is large - close to or more than the size > of physical memory. I wonder what will happen if I try to load the data > into a dictionary. Will Python use swap

Re: Proxying every function in a module

2007-05-25 Thread Josh West
> > First off, don't attempt to start a new thread by replying to a previous > one. Many newsreaders will merge the two, confusing the hell out of > everyone and generally not helping. > Ahh, yes. I see what you mean. Explains why it didn't appear the first time I posted (until later..). So

Re: Large Amount of Data

2007-05-25 Thread Matimus
On May 25, 10:50 am, "Jack" <[EMAIL PROTECTED]> wrote: > I need to process large amount of data. The data structure fits well > in a dictionary but the amount is large - close to or more than the size > of physical memory. I wonder what will happen if I try to load the data > into a dictionary. Wil

Listbox - Active index

2007-05-25 Thread rahulnag22
Hi, I am using a listbox in selectmode = MULTIPLE, I can get the current selected item in the listbox from index = "ACTIVE" , but is there a way to convert this "ACTIVE" to get the current selection index as a number. For multiple selectmode listboxes it returns a tuple of selected indexes, so I w

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Steve Holden wrote: > Ron Adam wrote: >> [EMAIL PROTECTED] wrote: >>> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: Is anyone else having problems with the webbrowser module? Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] o

Large Amount of Data

2007-05-25 Thread Jack
I need to process large amount of data. The data structure fits well in a dictionary but the amount is large - close to or more than the size of physical memory. I wonder what will happen if I try to load the data into a dictionary. Will Python use swap memory or will it fail? Thanks. -- http:

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Brian van den Broek wrote: > Ron Adam said unto the world upon 05/25/2007 12:28 PM: >> [EMAIL PROTECTED] wrote: >>> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: Is anyone else having problems with the webbrowser module? Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:2

Re: Proxying every function in a module

2007-05-25 Thread Steve Holden
Josh West wrote: > Kind and wise fellows, > [...] Please see my separate reply with the same subject line but in a new thread. That reply explains *why* it's in a new thread. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenwe

Re: Proxying every function in a module

2007-05-25 Thread Steve Holden
> Kind and wise fellows, > > I've got a web application with the following structure: > > 1) module of 100 functions corresponding to user actions (e.g. > "update_profile()", "organisations_list()") > 2) a wsgi callable which maps urls to functions eg > /organisations/list/?sort=date_created is

Re: extra xml header with ElementTree?

2007-05-25 Thread Stefan Behnel
Tim Arnold wrote: > Hi, I'm using ElementTree which is wonderful. I have a need now to write out > an XML file with these two headers: > > > > My elements have the root named tocbody and I'm using: > newtree = ET.ElementTree(tocbody) > newtree.write(fname) > > I assume if I add the encoding ar

Re: Shared Memory Space - Accross Apps & Network

2007-05-25 Thread Irmen de Jong
Hendrik van Rooyen wrote: >>> Just to get the ball rolling, I'd suggest two things: >>> >>> Pyro -http://pyro.sf.net > > This is good advice, if you have the power to run it. What do you mean exactly by "the power to run it"? --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: sockets, gethostname() changing

2007-05-25 Thread Steve Holden
7stud wrote: [...] > > The strange thing is: the hostname and port in the output are not what > I'm using in my server program: > - > import socket > > s = socket.socket() > > print "made changes 2" > > host = socket.gethostname() #I'm not connected to the internet when I > use this li

Re: webbrowser module bug?

2007-05-25 Thread Brian van den Broek
Ron Adam said unto the world upon 05/25/2007 12:28 PM: > [EMAIL PROTECTED] wrote: >> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>> Is anyone else having problems with the webbrowser module? >>> >>> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >>> [GCC 4.1.2 (Ubuntu 4.1.2-0u

Re: sockets, gethostname() changing

2007-05-25 Thread 7stud
>For local testing it is *much* easier to have your client >and server use IP address 127.0.0.1 According to my book, an address is a tuple of the form (hostname, port), so I didn't know what you meant by using 127.0.0.1 as the address. I played around with it, and using the tuple ("127.0.0.1", 1

Re: webbrowser module bug?

2007-05-25 Thread Steve Holden
Ron Adam wrote: > [EMAIL PROTECTED] wrote: >> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>> Is anyone else having problems with the webbrowser module? >>> >>> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >>> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >>> Type "help", "co

Proxying every function in a module

2007-05-25 Thread Josh West
Kind and wise fellows, I've got a web application with the following structure: 1) module of 100 functions corresponding to user actions (e.g. "update_profile()", "organisations_list()") 2) a wsgi callable which maps urls to functions eg /organisations/list/?sort=date_created is mapped to orga

Proxying every function in a module

2007-05-25 Thread Josh West
Hello I've got a web application with the following structure: 1) module of 100 functions corresponding to user actions (e.g. "update_profile()", "organisations_list()") 2) a wsgi callable which maps urls to functions eg /organisations/list/?sort=date_created is mapped to organisations_list("date

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
[EMAIL PROTECTED] wrote: > On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >> Is anyone else having problems with the webbrowser module? >> >> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >> Type "help", "copyright", "credits" or "

Re: extra xml header with ElementTree?

2007-05-25 Thread Tim Arnold
"Gerard Flanagan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On May 25, 3:55 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote: >> Hi, I'm using ElementTree which is wonderful. I have a need now to write >> out >> an XML file with these two headers: >> >> >> >> My elements have the

Re: just a bug (done)

2007-05-25 Thread Maksim Kasimov
Carsten Haese: > If you want to convey an arbitrary sequence of bytes as if they were > characters, you need to pick a character encoding that can handle an > arbitrary sequence of bytes. utf-8 can not do that. ISO-8859-1 can, but > you need to specify the encoding explicitly. Observe what happens

Re: extra xml header with ElementTree?

2007-05-25 Thread Gerard Flanagan
On May 25, 3:55 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote: > Hi, I'm using ElementTree which is wonderful. I have a need now to write out > an XML file with these two headers: > > > > My elements have the root named tocbody and I'm using: > newtree = ET.ElementTree(tocbody) > newtree.write(fname

Re: Why isn't this query working in python?

2007-05-25 Thread Carsten Haese
On Fri, 2007-05-25 at 09:51 -0500, Dave Borne wrote: > > I'm trying to run the following query: > ... > > member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id > > Shouldn't you be using the bind variable '?' instead of '%s' ? The parameter placeholder for MySQLdb is, indeed and un

Re: webbrowser module bug?

2007-05-25 Thread kyosohma
On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: > Is anyone else having problems with the webbrowser module? > > Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >

Re: dabo framework dependancies

2007-05-25 Thread daniel gadenne
Hi Paul, Peter, Uwe Thank to the three of you for your clear answers :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Xml parser

2007-05-25 Thread kyosohma
On May 25, 7:04 am, "Amit Khemka" <[EMAIL PROTECTED]> wrote: > On 5/24/07, ashish <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > I want to know weather is there any api available in python for parsing > > xml(XML parser) > > Checkout cElementTree . > > Cheers, > > -- > > Amit Khemka -- onyomo.

Re: just a bug

2007-05-25 Thread Carsten Haese
On Fri, 2007-05-25 at 17:30 +0300, Maksim Kasimov wrote: > I insist - my message is correct and not contradicts no any point of w3.org > xml-specification. The fact that you believe this so strongly and we disagree just as strongly indicates a fundamental misunderstanding. Your fundamental misund

Re: Why isn't this query working in python?

2007-05-25 Thread erikcw
On May 25, 10:51 am, "Dave Borne" <[EMAIL PROTECTED]> wrote: > > I'm trying to run the following query: > ... > > member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id > > Shouldn't you be using the bind variable '?' instead of '%s' ? > (I'm asking because I'm not entirely sure how t

Re: just a bug

2007-05-25 Thread Maksim Kasimov
Jarek Zgoda: > > No, it is not a part of string. It's a part of byte stream, split in a > middle of multibyte-encoded character. > > You cann't get only dot from small letter "i" and ask the parser to > treat it as a complete "i". > ... i know it :)) can you propose something to solve it? ;)

Re: Reading a file and resuming reading.

2007-05-25 Thread Karim Ali
Hrvoje Niksic <[EMAIL PROTECTED]> wrote: >If you open the file in binary mode, you can easily keep track of the >position in file: > >bytepos = 0 >with file(filename) as f: > for line in f: > ... process line ... > bytepos += len(line) > >If you need to restart the operation, simply seek

Re: drag and drop with wxPython ?

2007-05-25 Thread kyosohma
On May 25, 4:46 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On May 22, 10:00 am, stef <[EMAIL PROTECTED]> wrote: > >> hello, > > >> I'm trying to move from Delphi to Python > >> (move from MatLab to Python already succeeded, also thanks to this > >> discussion group).

Re: just a bug

2007-05-25 Thread Jarek Zgoda
Maksim Kasimov napisał(a): >> 'utf8' codec can't decode bytes in position 176-177: invalid data > iMessage[176:178] >> '\xd1]' >> >> And that's your problem. In general you can't just truncate a utf-8 >> encoded string anywhere and expect the result to be valid utf-8. The >> \xd1 at the very e

Re: Why isn't this query working in python?

2007-05-25 Thread Dave Borne
> I'm trying to run the following query: ... > member_id=%s AND expire_date > NOW() AND completed=1 AND (product_id Shouldn't you be using the bind variable '?' instead of '%s' ? (I'm asking because I'm not entirely sure how the execute command is doing the substitution) -Dave -- http://mail.pyt

Re: sockets, gethostname() changing

2007-05-25 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > > and I'm not connected to the internet and I run the program, I get: > > > > my-names-computer.local > > > > When I'm connected to the internet, I get: > > > > dialup-9.999.999.999.dial9.xxx.level9.net > > That would bug me to high hell. A router in the mi

Why isn't this query working in python?

2007-05-25 Thread erikcw
Hi all, I'm trying to run the following query: amember_db = MySQLdb.connect(host="localhost", user="**", passwd="*", db="***") # create a cursor self.amember_cursor = amember_db.cursor() # execute SQL statement sql = """SELECT paymen

Re: just a bug

2007-05-25 Thread Maksim Kasimov
Richard Brodie пишет: > "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> Web browsers are in the very business of reasonably rendering >> ill-formed mark-up. It's one of the things that makes >> implementing a browser take forever. ;) > > For HTML, yes. it accept

Re: just a bug

2007-05-25 Thread Maksim Kasimov
[EMAIL PROTECTED] : > You need to explicitly convert the string of UTF8 encoded bytes to a > Unicode string before parsing e.g. > unicodestring = unicode(encodedbytes, 'utf8') it is only a part of a string - not hole string, i've wrote it before. That meens that the content can not be converted t

Re: Reading a file and resuming reading.

2007-05-25 Thread Hrvoje Niksic
"Karim Ali" <[EMAIL PROTECTED]> writes: > - > while not eof <- really want the EOF and not just an empty line! > readline by line > end while; > - for line in open_file: ... It will stop on EOF, not on empty line. > But also, in cas

Re: just a bug

2007-05-25 Thread Maksim Kasimov
Carsten Haese: > On Fri, 2007-05-25 at 04:03 -0700, sim.sim wrote: > UnicodeDecodeError: 'utf8' codec can't decode bytes in position 176-177: > invalid data iMessage[176:178] > '\xd1]' > > And that's your problem. In general you can't just truncate a utf-8 > encoded string anywhere and ex

Re: How to do this in python with regular expressions

2007-05-25 Thread Mattia Gentilini
Thorsten Kampe ha scritto: >> I'm trying to parsing html with re module. > Just don't. Use an HTML parser like BeautifulSoup Or HTMLParser/htmllib. of course you can mix those and re, it'll be easier than re only. -- |\/|55: Mattia Gentilini e 55 = log2(che_palle_sta_storia) (by mezzo) |/_| ETI

Re: Reading a file and resuming reading.

2007-05-25 Thread Laszlo Nagy
Karim Ali wrote: > Hi, > > Simple question. Is it possible in python to write code of the type: > > - > while not eof <- really want the EOF and not just an empty line! > readline by line > end while; > - > > What I am using now is the im

extra xml header with ElementTree?

2007-05-25 Thread Tim Arnold
Hi, I'm using ElementTree which is wonderful. I have a need now to write out an XML file with these two headers: My elements have the root named tocbody and I'm using: newtree = ET.ElementTree(tocbody) newtree.write(fname) I assume if I add the encoding arg I'll get the xml header: newtree = E

Re: How to do this in python with regular expressions

2007-05-25 Thread Mattia Gentilini
Thorsten Kampe ha scritto: >> I'm trying to parsing html with re module. > Just don't. Use an HTML parser like BeautifulSoup Or HTMLParser/htmllib -- |\/|55: Mattia Gentilini e 55 = log2(che_palle_sta_storia) (by mezzo) |/_| ETICS project at CNAF, INFN, Bologna, Italy |\/| www.getfirefox.com ww

Re: just a bug

2007-05-25 Thread Mattia Gentilini
Richard Brodie ha scritto: > For HTML, yes. it accepts all sorts of garbage, like most > browsers; I've never, before now, seen it accept an invalid > XML document though. It *could* depend on Content-Type. I've seen that Firefox treats XHTML as HTML (i.e. not trying to validate it) if you set Co

Re: Reading a file and resuming reading.

2007-05-25 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Karim Ali wrote: > Simple question. Is it possible in python to write code of the type: > > - > while not eof <- really want the EOF and not just an empty line! > readline by line > end while; > - while True:

Reading a file and resuming reading.

2007-05-25 Thread Karim Ali
Hi, Simple question. Is it possible in python to write code of the type: - while not eof <- really want the EOF and not just an empty line! readline by line end while; - What I am using now is the implicit for loop after a readlines().

Re: just a bug (was: xml.dom.minidom: how to preserve CRLF's inside CDATA?)

2007-05-25 Thread Richard Brodie
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Web browsers are in the very business of reasonably rendering > ill-formed mark-up. It's one of the things that makes > implementing a browser take forever. ;) For HTML, yes. it accepts all sorts of garbage, like most

  1   2   >