Re: How to define a db file for sqlite?

2009-03-08 Thread John Machin
On Mar 8, 6:32 pm, Muddy Coder wrote: > Hi Folks, > > I just downloaded and installed pysqlite, and I can import sqlite3 > smoothly. Then, I need to connect sqlite by syntax: > > >>>conn = sqlite3.connect('adirectory/db') > > I wish the data will be stored into directory ---> adirectory, with a >

Re: Ban Xah Lee

2009-03-08 Thread Hendrik van Rooyen
"Grant Edwards" wrote: >There you go: a 30-second psychological diagnosis by an >electrical engineer based entirely on Usenet postings. It >doesn't get much more worthless than that... Oh it is not entirely worthless - as a working hypothesis, it seems to cover and explain the observed facts

Re: Parsing unicode (devanagari) text with xml.dom.minidom

2009-03-08 Thread Martin v. Löwis
> Regarding minidom, you might be happier with the xml.etree package that > comes with Python2.5 and later (it's also avalable for older versions). > It's a lot easier to use, more memory friendly and also much faster. OTOH, choice of XML library is completely irrelevant for the issue at hand. If

Re: wxPython fast and slow

2009-03-08 Thread iu2
On Mar 6, 6:52 pm, Mike Driscoll wrote: > ... > Can you post a sample application so we can try to figure out what's > wrong? You might also cross-post this to thewxPythonmailing list. > They might know. > > Mike- Hide quoted text - > > - Show quoted text - Hi, thanks for your reply Here is a s

Re: speeding up reading files (possibly with cython)

2009-03-08 Thread Peter Otten
per wrote: > i have a program that essentially loops through a textfile file thats > about 800 MB in size containing tab separated data... my program > parses this file and stores its fields in a dictionary of lists. > > for line in file: > split_values = line.strip().split('\t') > # do stuff

Re: Parsing/Crawler Questions - solution

2009-03-08 Thread lkcl
On Mar 7, 9:56 pm, "bruce" wrote: > > > and this solution will somehow allow a user to create a web parsing/scraping > app for parising links, and javascript from a web page? not just parsing the links and the "static" javascript, but: * actually executing the javascript, giving the quot

Re: Parsing unicode (devanagari) text with xml.dom.minidom

2009-03-08 Thread Stefan Behnel
Martin v. Löwis wrote: >> Regarding minidom, you might be happier with the xml.etree package that >> comes with Python2.5 and later (it's also avalable for older versions). >> It's a lot easier to use, more memory friendly and also much faster. > > OTOH, choice of XML library is completely irrelev

Re: Ban Xah Lee

2009-03-08 Thread Byung-Hee HWANG
Xah Lee writes: > Of interest: > > • Why Can't You Be Normal? > http://xahlee.org/Netiquette_dir/why_cant_you_be_normal.html > > • Ban Xah Lee > http://xahlee.org/Netiquette_dir/ban_Xah_Lee.html > > I consider this post relevant because i've been perennially gossiped > about in comp.lang.

help with printing to stdout...

2009-03-08 Thread Daniel Dalton
Hi, I've got a program here that prints out a percentage of it's completion. Currently with my implimentation it prints like this: 0% 1% 2% 3% 4% etc taking up lots and lots of lines of output... So, how can I make it write the percentage on the same line eg. while working: print percent every

Re: Parsing unicode (devanagari) text with xml.dom.minidom

2009-03-08 Thread Martin v. Löwis
> For the described problem, maybe. But certainly not for the application. > The background was parsing the XML dump of an entire web site, which I > would expect to be larger than what minidom is designed to handle > gracefully. Switching to cElementTree before major code gets written is > almost

Re: help with printing to stdout...

2009-03-08 Thread Chris Rebert
On Sun, Mar 8, 2009 at 1:37 AM, Daniel Dalton wrote: > Hi, > > I've got a program here that prints out a percentage of it's > completion. Currently with my implimentation it prints like this: > 0% > 1% > 2% > 3% > 4% > > etc taking up lots and lots of lines of output... So, how can I make it > wri

comparing (c)ElementTree and minidom (was: Parsing unicode (devanagari) text with xml.dom.minidom)

2009-03-08 Thread Stefan Behnel
Martin v. Löwis wrote: >> The background was parsing the XML dump of an entire web site, which I >> would expect to be larger than what minidom is designed to handle >> gracefully. Switching to cElementTree before major code gets written is >> almost certainly a good idea here. > > I think minidom

Re: speeding up reading files (possibly with cython)

2009-03-08 Thread Carl Banks
On Mar 7, 3:06 pm, per wrote: > hi all, > > i have a program that essentially loops through a textfile file thats > about 800 MB in size containing tab separated data... my program > parses this file and stores its fields in a dictionary of lists. When building a very large structure like you're

Re: wxPython fast and slow

2009-03-08 Thread Carl Banks
On Mar 8, 1:52 am, iu2 wrote: > On Mar 6, 6:52 pm, Mike Driscoll wrote: > > > ... > > Can you post a sample application so we can try to figure out what's > > wrong? You might also cross-post this to thewxPythonmailing list. > > They might know. > > > Mike- Hide quoted text - > > > - Show quoted

Re: Help cleaning up some code

2009-03-08 Thread andrew cooke
odeits wrote: > On Mar 7, 1:07 pm, Scott David Daniels wrote: >> odeits wrote: >> > I am looking to clean up this code... any help is much appreciated. >> > Note: It works just fine, I just think it could be done cleaner. >> >> > The result is a stack of dictionaries. the query returns up to >> >

Re: Help cleaning up some code

2009-03-08 Thread andrew cooke
andrew cooke wrote: > odeits wrote: >> On Mar 7, 1:07 pm, Scott David Daniels wrote: >>> odeits wrote: >>> > I am looking to clean up this code... any help is much appreciated. >>> > Note: It works just fine, I just think it could be done cleaner. >>> >>> > The result is a stack of dictionaries. t

Re: speeding up reading files (possibly with cython)

2009-03-08 Thread Timothy N. Tsvetkov
> > If that's the problem, the solution is: get more memory. > Or maybe think about algorithm, which needs less memory... My experience tells me, that each time when you want to store a lot of data into dict (or other structure) to analyze it then, you can find a way not to store so much amount of

Re: "/a" is not "/a" ?

2009-03-08 Thread Lie Ryan
Mel wrote: wrote: Steven D'Aprano writes: It is never correct to avoid using "is" when you need to compare for identity. When is it ever necessary to compare for identity? Ho-hum. MUDD game. def broadcast (sender, message): for p in all_players: if p is not sender:

Re: "/a" is not "/a" ?

2009-03-08 Thread Lie Ryan
Robert Kern wrote: On 2009-03-07 08:14, Christian Heimes wrote: Steven D'Aprano wrote: Yes. Floating point NANs are required to compare unequal to all floats, including themselves. It's part of the IEEE standard. As far as I remember that's not correct. It's just the way C has interpreted the

Re: help with printing to stdout...

2009-03-08 Thread D'Arcy J.M. Cain
On Sun, 8 Mar 2009 01:59:03 -0800 Chris Rebert wrote: > > etc taking up lots and lots of lines of output... So, how can I make it > > write the percentage on the same line eg. > Use the carriage return character to overwrite the line (you'll need > to forego `print`): Why do you say that? > from

Re: help with printing to stdout...

2009-03-08 Thread Hendrik van Rooyen
"Daniel Dalton" wrote: > I've got a program here that prints out a percentage of it's > completion. Currently with my implimentation it prints like this: > 0% > 1% > 2% > 3% > 4% > > etc taking up lots and lots of lines of output... So, how can I make it > write the percentage on the same line e

Re: help with printing to stdout...

2009-03-08 Thread Lie Ryan
Chris Rebert wrote: On Sun, Mar 8, 2009 at 1:37 AM, Daniel Dalton wrote: Hi, I've got a program here that prints out a percentage of it's completion. Currently with my implimentation it prints like this: 0% 1% 2% 3% 4% etc taking up lots and lots of lines of output... So, how can I make it wr

Re: Ban Xah Lee

2009-03-08 Thread D'Arcy J.M. Cain
On Sun, 08 Mar 2009 18:38:24 +0900 Byung-Hee HWANG wrote: > Xah Lee writes: [snip] > Don't worry, Xah. At least, my minds is running on your rails. Please do > not stop. BTW, what do you think about using Gnus instead of G2/1.0? So you are going to repeat his postings in their entirety so that t

Re: speeding up reading files (possibly with cython)

2009-03-08 Thread Tim Chase
Steven D'Aprano wrote: per wrote: currently, this is very slow in python, even if all i do is break up each line using split() ** and store its values in a dictionary, ** indexing by one of the tab separated values in the file. If that's the problem, the sol

Re: wxPython fast and slow

2009-03-08 Thread John Posner
> def move_panel(self, evt): > def gen(): > for x in range(200): > yield x > for x in range(200, 0, -1): > yield x > for x in gen(): > self.square.SetPosition((x, 30)) > time.sleep(0.005) > I can'

Re: wxPython fast and slow

2009-03-08 Thread Mike Driscoll
On Mar 8, 3:52 am, iu2 wrote: > On Mar 6, 6:52 pm, Mike Driscoll wrote: > > > ... > > Can you post a sample application so we can try to figure out what's > > wrong? You might also cross-post this to thewxPythonmailing list. > > They might know. > > > Mike- Hide quoted text - > > > - Show quoted

Callback from c thread with ctypes

2009-03-08 Thread Victor Lin
Hi, I am going to develop a c library binding with ctypes. That c library will call callback from worker threads it created. Here comes the problem : Will the GIL be acquired before it goes into Python function? I got a little try.. DSPPROC = WINFUNCTYPE(None, DWORD, DWORD, c_void_p, DWORD, c_vo

Re: can't print the exception cause/context in Python3.0?

2009-03-08 Thread Gabriel Genellina
En Sat, 07 Mar 2009 21:18:22 -0200, BigHand escribió: On 3月7日, 下午11时21分, "Gabriel Genellina" wrote: En Sat, 07 Mar 2009 11:46:08 -0200, BigHand escribió: > I want the exception printted like this: >   File "", line 2, in  "a()" >   File "", line 2, in a        "b()" >   File "", line 2,

Re: Callback from c thread with ctypes

2009-03-08 Thread Diez B. Roggisch
Victor Lin schrieb: Hi, I am going to develop a c library binding with ctypes. That c library will call callback from worker threads it created. Here comes the problem : Will the GIL be acquired before it goes into Python function? I got a little try.. DSPPROC = WINFUNCTYPE(None, DWORD, DWORD,

Re: RELEASED Python 3.1 alpha 1

2009-03-08 Thread Colin J. Williams
Benjamin Peterson wrote: On behalf of the Python development team and the Python community, I'm happy to announce the first alpha release of Python 3.1. Python 3.1 focuses on the stabilization and optimization of features and changes Python 3.0 introduced. The new I/O system has been rewritten

Re: Callback from c thread with ctypes

2009-03-08 Thread Christian Heimes
Victor Lin wrote: > Hi, > > I am going to develop a c library binding with ctypes. That c library > will call callback from worker threads it created. Here comes the > problem : Will the GIL be acquired before it goes into Python > function? > > I got a little try.. > > DSPPROC = WINFUNCTYPE(Non

Re: 2.6.1 - simple division

2009-03-08 Thread farsight
On Mar 8, 2:16 pm, farsi...@gmail.com wrote: > >>> 4 / 5.0 > > 0.84>>> 0.8 * 5 > > 4.0 > > python 2.6.1 on mac. What the hell is going on here? Pure curiosity prompted me to try the following: >>> 40 / 5.0 8.0 Strange... -- http://mail.python.org/mailman/listinfo/python-list

Re: Callback from c thread with ctypes

2009-03-08 Thread Victor Lin
On 3月8日, 下午9時56分, "Diez B. Roggisch" wrote: > Victor Lin schrieb: > > > > > Hi, > > > I am going to develop a c library binding with ctypes. That c library > > will call callback from worker threads it created. Here comes the > > problem : Will the GIL be acquired before it goes into Python > > fu

Re: Callback from c thread with ctypes

2009-03-08 Thread Victor Lin
On 3月8日, 下午10時20分, Christian Heimes wrote: > Victor Lin wrote: > > Hi, > > > I am going to develop a c library binding with ctypes. That c library > > will call callback from worker threads it created. Here comes the > > problem : Will the GIL be acquired before it goes into Python > > function? >

Re: 2.6.1 - simple division

2009-03-08 Thread Gabriel Genellina
En Sun, 08 Mar 2009 12:22:50 -0200, escribió: On Mar 8, 2:16 pm, farsi...@gmail.com wrote: >>> 4 / 5.0 0.84 >>> 0.8 * 5 4.0 python 2.6.1 on mac. What the hell is going on here? Pure curiosity prompted me to try the following: 40 / 5.0 8.0 Strange... See http://docs.py

Re: Callback from c thread with ctypes

2009-03-08 Thread Christian Heimes
Victor Lin wrote > I know I have to call PyEval_InitThreads if my module create threads > that will contact python stuff, for example, call a python callback > function from threads. But however, it is ctypes. I have no idea > should I do that for the imported dll? If it is, how? You have to initi

Re: 2.6.1 - simple division

2009-03-08 Thread Lie Ryan
farsi...@gmail.com wrote: On Mar 8, 2:16 pm, farsi...@gmail.com wrote: 4 / 5.0 0.84 This one is a common FAQ. Basically floating point is never to be trusted. This issue is quite language agnostic, however some language decided to "hide" the issue, python does not. For more

Re: Callback from c thread with ctypes

2009-03-08 Thread Lie Ryan
Victor Lin wrote: On 3月8日, 下午9時56分, "Diez B. Roggisch" wrote: Victor Lin schrieb: Hi, I am going to develop a c library binding with ctypes. That c library will call callback from worker threads it created. Here comes the problem : Will the GIL be acquired before it goes into Python functio

Re: 2.6.1 - simple division

2009-03-08 Thread koranthala
On Mar 8, 7:22 pm, farsi...@gmail.com wrote: > On Mar 8, 2:16 pm, farsi...@gmail.com wrote: > > > >>> 4 / 5.0 > > > 0.84>>> 0.8 * 5 > > > 4.0 > > > python 2.6.1 on mac. What the hell is going on here? > > Pure curiosity prompted me to try the following:>>> 40 / 5.0 > > 8.0 > > Stran

Re: create boolean

2009-03-08 Thread Lie Ryan
Scott David Daniels wrote: Lie Ryan wrote: Fencer wrote: The literal translation of that would be: if n is not None and n != []: b = True else: b = False it is a bit verbose, so one might want to find something shorter b = True if n is not None and n != [] else False I always feel if and

Re: 2.6.1 - simple division

2009-03-08 Thread farsight
Thanks all, that's very helpful, sorry to waste your time with a common question. I have tried the decimal module and will definitely keep using it if I need to do this kind of calculation again. I have 1 more question that the floating point article that was linked didn't really answer: >>> x =

Re: Guidance - Professional Python Development

2009-03-08 Thread Martin P. Hellwig
RT wrote: Can you recommend any books or articles that you have found offer useful advice on program structure, design and use of classes or any other features or best practices that you feel are important for professional Python development. In my opinion, 'professional development' has sur

Re: 2.6.1 - simple division

2009-03-08 Thread Duncan Booth
farsi...@gmail.com wrote: > Thanks all, that's very helpful, sorry to waste your time with a > common question. I have tried the decimal module and will definitely > keep using it if I need to do this kind of calculation again. Try to remember though that the decimal module simply replaces one so

Re: 2.6.1 - simple division

2009-03-08 Thread farsight
Thanks duncan, thats very helpful. I'll be more careful with floating point numbers in future. -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Lisp to Learn?

2009-03-08 Thread Arne Vajhøj
Xah Lee wrote: For those of you imperative programers who kept on hearing about lisp and is tempted to learn, then, ... You: * consider yourself unfairly treated by various communities * post a long drivel about various Lisp flavors to newsgroups that are not in any way Lisp related ? There

Re: RELEASED Python 3.1 alpha 1

2009-03-08 Thread Benjamin Peterson
Colin J. Williams ncf.ca> writes: > Do you have any schedule for a Windows > binary release? They should materialize on Monday. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ban Xah Lee

2009-03-08 Thread r
On Mar 8, 7:50 am, "D'Arcy J.M. Cain" wrote: > So you are going to repeat his postings in their entirety so that those > that block him will see them anyway, right?  Wrong.  We'll just block > your posts too. > > *plonk* This is to all usenet readers who think they own c.l.py!

Re: Ban Xah Lee

2009-03-08 Thread r
On Mar 7, 5:52 pm, Xah Lee wrote: > HARASSMENT BY JOHN BOKMA > > I was harassed by a newsgroup poster John Bokma (a regular of > comp.lang.perl.misc) to have my web hosting service provider kick me > off. This happened in 2006. I know the feeling. I have this super geek with nothing but time on

Re: "/a" is not "/a" ?

2009-03-08 Thread Mark Dickinson
On Mar 7, 2:14 pm, Christian Heimes wrote: > Steven D'Aprano wrote: > > Yes. Floating point NANs are required to compare unequal to all floats, > > including themselves. It's part of the IEEE standard. > > As far as I remember that's not correct. It's just the way C has > interpreted the standard

Re: Windows install to custom location after building from source

2009-03-08 Thread Tim Golden
Gabriel Genellina wrote: En Fri, 06 Mar 2009 06:52:00 -0200, escribió: I have succeeded in building Python 2.6.1 from source under Windows XP by running Visual C++ 2008 Express on the PCbuild/pcbuild.sln file both from the Visual C++ application as well as from the commandline [...] I would li

Set & Frozenset?

2009-03-08 Thread Hans Larsen
Could you help me ? How could I "take" an elemment from a set or a frozenset .-) ? From a string (unicode? Python<3), or from a tuple,or from a list: Element by index or slice. From a dict: by key. But what concerning a set o

Re: RELEASED Python 3.1 alpha 1

2009-03-08 Thread laplacia...@gmail.com
On Mar 7, 6:59 pm, Carl Banks wrote: > > I see that Brett Canon's importlib has finally made it into Python > standard library.  Congrats there (if you still read this list), I am > struggling with Python's arcane import semantics (for something > ridiculously silly) now and I feel your pain. > H

Re: Help cleaning up some code

2009-03-08 Thread odeits
On Mar 8, 4:48 am, "andrew cooke" wrote: > odeits wrote: > > On Mar 7, 1:07 pm, Scott David Daniels wrote: > >> odeits wrote: > >> > I am looking to clean up this code... any help is much appreciated. > >> > Note: It works just fine, I just think it could be done cleaner. > > >> > The result is a

Re: Set & Frozenset?

2009-03-08 Thread Diez B. Roggisch
Hans Larsen schrieb: Could you help me ? How could I "take" an elemment from a set or a frozenset .-) ? From a string (unicode? Python<3), or from a tuple,or from a list: Element by index or slice. From a dict: by key. But

Re: where is the PyString_AsString in Python 3.0?

2009-03-08 Thread Stefan Behnel
BigHand wrote: > I know that there is no PyString_AsString in Python3.0, > could you guys give me instruction about how can I do with the > following ? > > PyObject *exc_type = NULL, *exc_value = NULL, *exc_tb = NULL; > PyErr_Fetch(&exc_type, &exc_value, &exc_tb); > > how do I transfer the exc_ty

Re: where is the PyString_AsString in Python 3.0?

2009-03-08 Thread Stefan Behnel
BigHand wrote: > Finally I got the results now. This did take me 10 hours to solve > this. the docs of 3.0.. You will have to get used to Unicode. The code you used against the C-API mimics almost exactly the steps you'd use at the Python level. Stefan -- http://mail.python.org/mailman/listin

Re: Ban Xah Lee

2009-03-08 Thread Steven D'Aprano
r wrote: > This is to all usenet readers who think they own c.l.py! [snip abusive, anti-social rant] Well, after kill-filing this kiddie for a few months, I thought I'd give him a chance. By pure luck I chose this post to read. Good news "r", you've earned yourself a permanent kill-filing. I'll

Re: Set & Frozenset?

2009-03-08 Thread Tim Golden
Diez B. Roggisch wrote: Hans Larsen schrieb: Could you help me ? How could I "take" an elemment from a set or a frozenset .-) ? From a string (unicode? Python<3), or from a tuple,or from a list: Element by index or slice. From a dict: by k

Re: Set & Frozenset?

2009-03-08 Thread Tim Golden
Tim Golden wrote: Diez B. Roggisch wrote: Hans Larsen schrieb: Could you help me ? How could I "take" an elemment from a set or a frozenset .-) ? From a string (unicode? Python<3), or from a tuple,or from a list: Element by index or slice.

Sharing objects between processes

2009-03-08 Thread ET
I have been using the 'threading' library and decided to try swapping it out for 'processing'... while it's awesome that processing so closely mirrors the threading interface, I've been having trouble getting my processes to share an object in a similar way. Using the 'with' keyword didn't work, a

Re: Sharing objects between processes

2009-03-08 Thread Tim Golden
ET wrote: Using the 'with' keyword didn't work... Just an aside here for any multiprocessing maintainers watching ;) . I expect that the "didn't work" here refers to this bug: http://bugs.python.org/issue5261 Altho' if the OP cares to clarify, it might be something else. TJG -- http://mail.

Re: Sharing objects between processes

2009-03-08 Thread Aaron Brady
On Mar 8, 1:36 pm, ET wrote: > I have been using the 'threading' library and decided to try swapping it > out for 'processing'... while it's awesome that processing so closely > mirrors the threading interface, I've been having trouble getting my > processes to share an object in a similar way. >

Re: Chandler, Python, speed

2009-03-08 Thread Tim Wintle
On Sat, 2009-03-07 at 22:05 +, Ville M. Vainio wrote: > Alan G Isaac wrote: > > > 3. Chandler is not really an email client. So specifically, > > which of its functionalities is it slow, and what evidence > > if any is there that Python is causing this? > > I remember reading "somewhere" tha

Re: wxPython fast and slow

2009-03-08 Thread iu2
On Mar 8, 1:42 pm, Carl Banks wrote: > On Mar 8, 1:52 am, iu2 wrote: > > > > > On Mar 6, 6:52 pm, Mike Driscoll wrote: > > > > ... > > > Can you post a sample application so we can try to figure out what's > > > wrong? You might also cross-post this to thewxPythonmailing list. > > > They might k

Re: Chandler, Python, speed

2009-03-08 Thread Ville M. Vainio
Ville M. Vainio wrote: > Alan G Isaac wrote: > >> 3. Chandler is not really an email client. So specifically, >> which of its functionalities is it slow, and what evidence >> if any is there that Python is causing this? > > I remember reading "somewhere" that the cause of slowness is/was > arch

Re: Windows install to custom location after building from source

2009-03-08 Thread Scott David Daniels
Tim Golden wrote: ... Anyhow, at the end I have a working Python 2.7a0 running under Windows. Do you mean 3.1a0? As far as I know, 2.7a0 requires the use of the time machine, as it is expected to be 3 months out. If you do get an installer built, even having a semi-official copy around for th

Re: Windows install to custom location after building from source

2009-03-08 Thread Martin v. Löwis
> In addition, the CVS version of pywin32 which I built in > order to run the msi.py script has a small bug in genpy > which prevents it from generating COM support in the way > in which msi.py does it. I'm using Python 2.4 to run msi.py; that has always worked fine for me. Regards, Martin P.S.

Re: Windows install to custom location after building from source

2009-03-08 Thread Martin v. Löwis
> Do you mean 3.1a0? As far as I know, 2.7a0 requires the use > of the time machine, as it is expected to be 3 months out. The current trunk calls itself 2.7a0. I think you might be referring to 3.0a1. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows install to custom location after building from source

2009-03-08 Thread Tim Golden
Martin v. Löwis wrote: In addition, the CVS version of pywin32 which I built in order to run the msi.py script has a small bug in genpy which prevents it from generating COM support in the way in which msi.py does it. I'm using Python 2.4 to run msi.py; that has always worked fine for me. Int

Re: Windows install to custom location after building from source

2009-03-08 Thread Tim Golden
Scott David Daniels wrote: Tim Golden wrote: ... Anyhow, at the end I have a working Python 2.7a0 running under Windows. Do you mean 3.1a0? As far as I know, 2.7a0 requires the use of the time machine, as it is expected to be 3 months out. No; 2.7a0 is the version number of the svn HEAD.

Re: Eclipse And PyDev

2009-03-08 Thread Fabio Zadrozny
> Thanks. I noticed that when I was on my windows box at work and I > would check it and click apply then ok and when I go back to those > prefs and it isn't checked. I did that a few times. I will try it on > my Linux box tomorrow at home and see if I have the same results. If it doesn't work fo

Re: Windows install to custom location after building from source

2009-03-08 Thread Martin v. Löwis
> What does the merge do? I can't find mention of it > in the docs. It merges the msvcrt merge module into the installer (and then monkey patches it, to revert the msm decision of setting ALLUSERS). I tried to integrate it originally as a step after creating the msi. Unfortunately, the merge objec

Re: Ban Xah Lee

2009-03-08 Thread r
On Mar 8, 1:24 pm, Steven D'Aprano wrote: > r wrote: > > This is to all usenet readers who think they own c.l.py! > > [snip abusive, anti-social rant] > > Well, after kill-filing this kiddie for a few months, I thought I'd give him > a chance. By pure luck I chose this post to read. > > Good news

Re: Windows install to custom location after building from source

2009-03-08 Thread Tim Golden
Martin v. Löwis wrote: What does the merge do? I can't find mention of it in the docs. It merges the msvcrt merge module into the installer (and then monkey patches it, to revert the msm decision of setting ALLUSERS). I tried to integrate it originally as a step after creating the msi. Unfortun

Re: Windows install to custom location after building from source

2009-03-08 Thread Gabriel Genellina
En Sun, 08 Mar 2009 18:08:50 -0200, Martin v. Löwis escribió: What does the merge do? I can't find mention of it in the docs. It merges the msvcrt merge module into the installer (and then monkey patches it, to revert the msm decision of setting ALLUSERS). I tried to integrate it originally

Re: Themed TK (tk Tile) at last?!

2009-03-08 Thread Boris Borcic
Python Nutter wrote: Looks like we finally get tkinter GUI based programs according to Issue# 2983 in Python 3.1a so our programs don't look like something out of early 1980's Please don't confuse History gratuitously. Make that mid 90's. Cheers, BB -- http://mail.python.org/mailman/listinfo/

last and final attempt to search for python ods library.

2009-03-08 Thread Krishnakant
hello all, Sorry for the frustrated mail. This is my last attempt to search for a nice python library for creating open document spreadsheet. I tryed python-ooolib but did not find a few features like merging cells (may be I am missing out some thing stupid ). I have asked for some help before

Re: Ban Xah Lee

2009-03-08 Thread Boris Borcic
seconded. -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows install to custom location after building from source

2009-03-08 Thread Martin v. Löwis
> merge.py attempts to import config.py but I can't find it... Just create an empty one. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows install to custom location after building from source

2009-03-08 Thread Martin v. Löwis
> First, it relies on config.py whose existence msi.py > optionally ignores. Feel free to create a patch for that. > File "", line 2, in OpenDatabase > pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, > None, None, 0, -2147024786), None) This is 0x8007006e; 0x6E, in turn, mi

Re: Parsing unicode (devanagari) text with xml.dom.minidom

2009-03-08 Thread rparimi
On Mar 8, 12:42 am, Stefan Behnel wrote: > rpar...@gmail.com wrote: > > I am trying to process an xml file that contains unicode characters > > (seehttp://vyakarnam.wordpress.com/). Wordpress allows exporting the > > entire content of the website into an xml file. Using > > xml.dom.minidom,  I wro

Re: last and final attempt to search for python ods library.

2009-03-08 Thread JanC
Krishnakant wrote: > This is my last attempt to search for a nice python library for creating > open document spreadsheet. > > I tryed python-ooolib but did not find a few features like merging cells > (may be I am missing out some thing stupid ). You could add that feature to python-ooolib. > I

factory functions & methods

2009-03-08 Thread Aaron Brady
Hello, I am creating a container. I have some types which are built to be members of the container. The members need to know which container they are in, as they call methods on it, such as finding other members. I want help with the syntax to create the members. Currently, the container has to

Re: Windows install to custom location after building from source

2009-03-08 Thread Tim Golden
Martin v. Löwis wrote: merge.py attempts to import config.py but I can't find it... Just create an empty one. Won't quite work: merge tries to find full_current_version which is determined (if None) in msi.py from the rather involved current version stuff. I'm going to give up on this for to

How to extract some text?

2009-03-08 Thread Oltmans
I'm at a loss to figure out how to extract some text from a string. Here is a string: setTimeout("location.href='http://youtube.example.com/login.aspx'", 5000); and I want to only retrieve the URL from above i.e I only want this http://youtube.example.com/login.aspx from the above string. Any ide

Re: How to extract some text?

2009-03-08 Thread Chris Rebert
On Sun, Mar 8, 2009 at 2:18 PM, Oltmans wrote: > I'm at a loss to figure out how to extract some text from a string. > Here is a string: > > setTimeout("location.href='http://youtube.example.com/login.aspx'", > 5000); > > and I want to only retrieve the URL from above i.e I only want this > http:/

Re: Windows install to custom location after building from source

2009-03-08 Thread Martin v. Löwis
>> Just create an empty one. > > Won't quite work: merge tries to find full_current_version > which is determined (if None) in msi.py from the rather > involved current version stuff. Only if you don't pass an msi file on the command line. So I recommend that you do that. > I'm going to give up

Re: How to extract some text?

2009-03-08 Thread Tim Pinkawa
On Sun, Mar 8, 2009 at 5:18 PM, Oltmans wrote: > I'm at a loss to figure out how to extract some text from a string. > Here is a string: > > setTimeout("location.href='http://youtube.example.com/login.aspx'", > 5000); > > and I want to only retrieve the URL from above i.e I only want this > http:/

Re: wxPython fast and slow

2009-03-08 Thread Scott David Daniels
iu2 wrote: Here is the timer version. It works even more slowly, even with PyScripter active: ... I actually tried this one first. Due to the slow speed I changed to looping inside the event. I don't understand why it takes so long to move that square with wx.Timer set to 1 ms interval. Perhaps

Re: factory functions & methods

2009-03-08 Thread andrew cooke
Aaron Brady wrote: > Hello, > > I am creating a container. I have some types which are built to be > members of the container. The members need to know which container > they are in, as they call methods on it, such as finding other > members. I want help with the syntax to create the members. >

Re: factory functions & methods

2009-03-08 Thread andrew cooke
andrew cooke wrote: > above is with 3.0. for some odd reason i thing the order of teh args to > MethodType may have changed recently, so be careful. sorry, no, had 2.6 running there... andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: How to extract some text?

2009-03-08 Thread Oltmans
On Mar 9, 3:37 am, Chris Rebert wrote: > Learn about the methods of the string class > (str):http://docs.python.org/library/stdtypes.html#id4 > > You'll probably be most interested in .split() OK, thanks I got it. I was trying to use Regex but .split() just worked like a charm. Thank you ;) > >

NEWB: dividing numbers

2009-03-08 Thread Lo
I just tried python first time. 2/3 the result is zero I want the result to be .333... How do I get this? Thanks a lot L -- http://mail.python.org/mailman/listinfo/python-list

Re: NEWB: dividing numbers

2009-03-08 Thread Diez B. Roggisch
Lo schrieb: I just tried python first time. 2/3 the result is zero I want the result to be .333... Well, that's not going to happen - 2/3 is .666 if not done with integers... How do I get this? Use floating points. >>> 2.0 / 3.0 0.3 Diez -- http://mail.python.org/mailma

Re: NEWB: dividing numbers

2009-03-08 Thread Grant Edwards
On 2009-03-08, Lo wrote: > I just tried python first time. > > 2/3 > > the result is zero > > I want the result to be .333... How odd. > How do I get this? 1./3 -- Grant -- http://mail.python.org/mailman/listinfo/python-list

Re: NEWB: dividing numbers

2009-03-08 Thread Chris Rebert
On Sun, Mar 8, 2009 at 3:08 PM, Lo wrote: > I just tried python first time. > > 2/3 > > the result is zero > > I want the result to be .333... > > How do I get this? Add the following to the top of your program: from __future__ import division That tells Python to use the proper kind of divisio

Re: NEWB: dividing numbers

2009-03-08 Thread Michal Wyrebski
Lo pisze: I just tried python first time. 2/3 the result is zero Float type must be specified explicitly: 2/3.0 or 2.0/3 In Python 3.x operators behave differently and '2/3' would give float number as a result. I want the result to be .333... Than try: 1/3.0 because 2/3.0 will never

Re: NEWB: dividing numbers

2009-03-08 Thread MRAB
Lo wrote: I just tried python first time. 2/3 the result is zero I want the result to be .333... How do I get this? That's integer division (integer divided by integer is integer). If you want the result to be floating point then make one of them floating point: 2.0 / 3 or do this

Re: Guidance - Professional Python Development

2009-03-08 Thread Scott David Daniels
RT wrote: I have been doing Python development at work for several years. I started with the official documentation and tutorial, by necessity, the examples tend to be rather simple and none of them really explain the process of developing complete, industrial strength Python applications.

Re: create boolean

2009-03-08 Thread Rhodri James
On Sat, 07 Mar 2009 05:03:08 -, Grant Edwards wrote: On 2009-03-07, Rhodri James wrote: On Fri, 06 Mar 2009 15:34:08 -, Grant Edwards wrote: On 2009-03-06, Fencer wrote: Hi, I need a boolean b to be true if the variable n is not None and not an empty list, otherwise b should b

  1   2   >