Re: Bug in Python APscheduler module.

2010-03-18 Thread Terry Reedy
On 3/19/2010 2:03 AM, anand jeyahar wrote: Hi , I looked everywhere and could find no mention of this(might be looking in the wrong places point me please..). the Python package Advanced python scheduler seems to have a bug with the unschedule func. The site for that package http://ap

Bug in Python APscheduler module.

2010-03-18 Thread anand jeyahar
Hi , I looked everywhere and could find no mention of this(might be looking in the wrong places point me please..). the Python package Advanced python scheduler seems to have a bug with the unschedule func. When passing the function of an object it doesn't remove it from the scheduler. bu

Re: GC is very expensive: am I doing something wrong?

2010-03-18 Thread Patrick Maupin
On Mar 18, 7:13 pm, Weeble wrote: > I am loading a dictionary from a text file and constructing a trie > data structure in memory. However, it takes longer than I'm happy with > - about 12 seconds on my computer. I profiled it, came up with some > clever ideas to cut down on the work (such as by e

Re: sqlite3, memory db and multithreading

2010-03-18 Thread John Nagle
królewna wrote: The problem is simple: I have multiple threads within one program. At least 2 threads have to have access to in-memory sqlite database. It is not possible to pass sqlite objects to those threads because an exception is rised: ProgrammingError: SQLite objects created in a threa

Re: Python bindings tutorial

2010-03-18 Thread Tim Roberts
Dave Angel wrote: >> >There's no real reason parts of an exe cannot be exported, same as a >dll. They are in fact the same structure. And in fact many other files >in the Windows environment are also the same structure, from fonts to ocx's Well, there IS a fundamental difference. EXEs and DL

Re: multiprocessing on freebsd

2010-03-18 Thread Tim Arnold
"Martin P. Hellwig" wrote in message news:hnrabj$c4...@news.eternal-september.org... > On 03/17/10 13:30, Tim Arnold wrote: >> Hi, >> I'm checking to see if multiprocessing works on freebsd for any >> version of python. My server is about to get upgraded from 6.3 to 8.0 >> and I'd sure like to be

example of ssl with SimpleXMLRPCServer in 2.6?

2010-03-18 Thread Rowland Smith
Anyone have an example of using the new ssl module with SimpleXMLRPCServer in 2.6? Thanks, -- -Rowland -- http://mail.python.org/mailman/listinfo/python-list

Re: Truoble With A Search Script for ImageBin.org

2010-03-18 Thread Cameron Simpson
On 18Mar2010 22:43, Steve Holden wrote: | Brandon Conner wrote: | > I'm trying to develop a script that will return the results of a POST | > request that should list all images uploaded by a user. However, when i | > run the script, i get returned the HTML of the page with the search | > form.

Re: import antigravity

2010-03-18 Thread John Bokma
Lawrence D'Oliveiro writes: > In message , Chris > Rebert wrote: > > I see that you published my unobfuscated e-mail address on USENET for all to > see. I obfuscated it for a reason, to keep the spammers away. I'm assuming > this was a momentary lapse of judgement, for which I expect an apology.

Re: Truoble With A Search Script for ImageBin.org

2010-03-18 Thread Steve Holden
Brandon Conner wrote: > Hey Pythoners, > > its my first post here, yay! > > I'm trying to develop a script that will return the results of a POST > request that should list all images uploaded by a user. However, when i > run the script, i get returned the HTML of the page with the search > form

Re: import antigravity

2010-03-18 Thread Chris Rebert
On Thu, Mar 18, 2010 at 12:49 AM, Lawrence D'Oliveiro wrote: > I see that you published my unobfuscated e-mail address on USENET for all to > see. I obfuscated it for a reason, to keep the spammers away. I'm assuming > this was a momentary lapse of judgement, for which I expect an apology. My apo

Re: should writing Unicode files be so slow

2010-03-18 Thread Ben Finney
djc writes: > I have a simple program to read a text (.csv) file Could you please: * simplify it further: make a minimal version that demonstrates the difference you're seeing, without any extraneous stuff that doesn't appear to affect the result. * make it complete: the code you've shown

Truoble With A Search Script for ImageBin.org

2010-03-18 Thread Brandon Conner
Hey Pythoners, its my first post here, yay! I'm trying to develop a script that will return the results of a POST request that should list all images uploaded by a user. However, when i run the script, i get returned the HTML of the page with the search form. I am wondering what am i doing inco

Re: GC is very expensive: am I doing something wrong?

2010-03-18 Thread Terry Reedy
On 3/18/2010 8:13 PM, Weeble wrote: I thought that the cost of garbage collection would be in some way proportional to the amount of garbage created, but I didn't think I was creating any: as far as I can tell the only objects deallocated during the load are strings, which could not be particip

Re: GC is very expensive: am I doing something wrong?

2010-03-18 Thread Xavier Ho
Weeble, Try to use the full arguments of insert(i, x), instead of using list slices. Every time you create a slice, Python copies the list into a new memory location with the sliced copy. That's probably a big performance impact there if done recursively. My 2cp, Xav On Fri, Mar 19, 2010 at 10:

GC is very expensive: am I doing something wrong?

2010-03-18 Thread Weeble
I am loading a dictionary from a text file and constructing a trie data structure in memory. However, it takes longer than I'm happy with - about 12 seconds on my computer. I profiled it, came up with some clever ideas to cut down on the work (such as by exploiting the fact that the dictionary is s

Re: Python bindings tutorial

2010-03-18 Thread Alf P. Steinbach
* Dave Angel: Alf P. Steinbach wrote: * Dave Angel: Stefan Behnel wrote: mikelisa...@gmail.com, 17.03.2010 10:08: Its interesting you've mentioned the hard work involved in this interface (binding to an EXE instead of a DLL). A year or more ago I was looking at interfacing IPMITOOL to python.

Re: Python bindings tutorial

2010-03-18 Thread Dave Angel
Alf P. Steinbach wrote: * Dave Angel: Stefan Behnel wrote: mikelisa...@gmail.com, 17.03.2010 10:08: Its interesting you've mentioned the hard work involved in this interface (binding to an EXE instead of a DLL). A year or more ago I was looking at interfacing IPMITOOL to python. Do to the probl

should writing Unicode files be so slow

2010-03-18 Thread djc
I have a simple program to read a text (.csv) file and split it into several smaller files. Tonight I decided to write a unicode variant and was surprised at the difference in performance. Is there a better way? > from __future__ import with_statement > import codecs > > def _rowreader(filename,

Re: sqlite3, memory db and multithreading

2010-03-18 Thread Aahz
In article , =?UTF-8?B?a3LDs2xld25h?= wrote: > >The problem is simple: I have multiple threads within one program. At >least 2 threads have to have access to in-memory sqlite database. It is >not possible to pass sqlite objects to those threads because an >exception is rised: > >ProgrammingErr

Re: Nested Scopes unintended behaviour ?

2010-03-18 Thread Terry Reedy
On 3/18/2010 6:21 AM, Michael Sparks wrote: After hearing it's expected behaviour in 2.6 it's clear that assigning a name to a value declares the variable to be local, unless there is a global/nonlocal declaration and that unlike much of python (but like yield) this appears based on static

Re: logging: local functions ==> loss of lineno

2010-03-18 Thread Hellmut Weber
Am 11.03.2010 12:14, schrieb Peter Otten: Hellmut Weber wrote: Logging works very well giving the filename and line number of the point where it is called. As long as I use the loggers directly. BUT when I have to wrap the logger call in some other function, I always get file name and line numb

Re: Need advice on starting a Python group

2010-03-18 Thread Mike Orr
On Mar 11, 7:57 am, gb345 wrote: > I'm hoping to get advice from anyone with prior experience setting > up a Python group. > > A friend of mine and I have been trying to start a > scientific-programming-oriented Python group in our school (of > medecine and bio research), with not much success. >

Re: question about tkinter

2010-03-18 Thread furlan
On Wed, 17 Mar 2010 09:32:46 -0400, robert schaefer wrote: > Peter, > > Most of my life has been dealing with recalcitrant HAL's in one guise or > another. These days, I think HAL has permanently taken up residence in > Toyota's engine and brakes. "Stop the car Dave? Have you changed my oil > or

importing python project in my application

2010-03-18 Thread Betül
Hello All, I am new this mail list. I try to embedding python in C++. I want to use this project's class http://gamera.informatik.hsnr.de/ It is a framework in python. I want use Gamera 's classes,functions..etc in my c++ project. I have information about embedding python in c++ but i just want t

Re: highlight words by regex in pdf files using python

2010-03-18 Thread TP
On Wed, Mar 17, 2010 at 7:53 AM, Peng Yu wrote: > On Tue, Mar 16, 2010 at 11:12 PM, Patrick Maupin wrote: >> On Mar 4, 6:57 pm, Peng Yu wrote: >>> I don't find a general pdf library in python that can do any >>> operations on pdfs. >>> >>> I want to automatically highlight certain words (using r

Re: did anybody play with python and window mobile broadband?

2010-03-18 Thread News123
Hy Eglyph, egl...@gmail.com wrote: > On 18 мар, 11:20, News123 wrote: >> I'd like to use a mobile broadband device with a windows python app. >> Did anybody play already with python and the window mobile broadband >> interface? >> > > There was a discussion on this subject in some local forum re

Re: did anybody play with python and window mobile broadband?

2010-03-18 Thread News123
Hi Sanjiva, Sanjiva P. wrote: > On 03/18/2010 10:20 AM, News123 wrote: >> I'm looking for examples: >> - how to connect/disconnect a mobile broadband device (currently I use >> rasdial. not sure it's the best solution) >> - to obtain the device's current mode (GPRS / EDGE / . . . ) >> - to obtai

Re: class inheritance

2010-03-18 Thread JLundell
On Mar 17, 5:12 pm, Steven D'Aprano wrote: > On Mon, 15 Mar 2010 16:34:35 -0700,JLundellwrote: > > It's also unfortunate that Python doesn't have an approximately-equal > > operator; it'd come in handy for floating-point applications while > > preserving hash. If only there were a ~= or ≈ operator

Re: Need to create subprocess...

2010-03-18 Thread Patrick Maupin
On Mar 18, 11:17 am, "drstoka" wrote: > Hello, > > I have to run a program as a child process inside my python program and > redirect it's output through a pipe to a parent program process. > So, I wrote this: > > pipe = Popen('example_program', shell=True, bufsize=0, stdout=PIPE).stdout > > and i

Re: Need to create subprocess...

2010-03-18 Thread Martin P. Hellwig
On 03/18/10 16:17, drstoka wrote: Hello, I have to run a program as a child process inside my python program and redirect it's output through a pipe to a parent program process. So, I wrote this: pipe = Popen('example_program', shell=True, bufsize=0, stdout=PIPE).stdout and it works great. No

Re: Method / Functions - What are the differences?

2010-03-18 Thread John Posner
On 3/10/2010 8:37 PM, Gabriel Genellina wrote: En Wed, 10 Mar 2010 11:45:38 -0300, John Posner escribió: As I promised/threatened, here's the *start* of a write-up on properties, aimed at non-advanced Python programmers: http://www.jjposner.net/media/python-properties-0310.pdf I'd use 'func

Re: C-API PyObject_Call

2010-03-18 Thread Stefan Behnel
moerchendiser2k3, 18.03.2010 14:58: Funny that you (being the OP) ask *me* what kind of line information *you* want. Stefan Well, I need the line/file information of Python : Then please explain what kind of Python line number you expect to find in C code. Hint: providing details often re

Re: C++ code generation

2010-03-18 Thread Chris Colbert
I think Stefan was telling you, in a nice way, to stop spamming every thread about code generation with a plug for your project. 2010/3/17 CHEN Guang > >> - Original Message - > >> From: "Dan Goodman" > >> > >>> I'm doing some C++ code generation using Python, and would be > interested >

Need to create subprocess...

2010-03-18 Thread drstoka
Hello, I have to run a program as a child process inside my python program and redirect it's output through a pipe to a parent program process. So, I wrote this: pipe = Popen('example_program', shell=True, bufsize=0, stdout=PIPE).stdout and it works great. Now, in parent program I need to wait

Re: Install 2.6.4 as non-admin on Windows

2010-03-18 Thread Mark Carter
On 18 Mar, 15:23, "egl...@gmail.com" wrote: > The only file written to a system folder is python2x.dll (I think it's > not true for python2.6 any longer), so your approach is perfectly > valid if you can put this dll into a folder where it can be found by > the system. Thanks. That sounds easy en

Re: Install 2.6.4 as non-admin on Windows

2010-03-18 Thread egl...@gmail.com
On 18 мар, 16:45, Mark Carter wrote: > How do I install python 2.6.4 on Windows without admin privileges? > > Can I install it on a machine I control, zip up the contents, copy it > across to an admin-restricted machine, and set up a couple of > environemtn variables? Does python install files to

Re: sqlite3, memory db and multithreading

2010-03-18 Thread DreiJane
Hello, i cannot help you directly with sqlite2 in the Standardlib, since i am used to work with Roger Binns's apsw. After a short experiment with pysqlite leading to data loss - caused by one of the unclearer exception messages of sqlite3 and me having a bad day - i at once turned back to apsw. An

Install 2.6.4 as non-admin on Windows

2010-03-18 Thread Mark Carter
How do I install python 2.6.4 on Windows without admin privileges? Can I install it on a machine I control, zip up the contents, copy it across to an admin-restricted machine, and set up a couple of environemtn variables? Does python install files to system directories, making this impossible? --

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-18 Thread DreiJane
Hello, i've used reportlabs over two years now and was content with its quality. These days i have turned to cairo and can only recommend to do so: It is still easier to use (than the well-designed reportlabs tools) and an engine working in a lot of other software too, for example firefox. Reason

Re: C-API PyObject_Call

2010-03-18 Thread moerchendiser2k3
> Funny that you (being the OP) ask *me* what kind of line information *you* > want. > > Stefan Well, I need the line/file information of Python : -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32All On 64-Bit Operating Systems

2010-03-18 Thread Tim Daneliuk
On 3/18/2010 3:54 AM, Tim Golden wrote: > On 17/03/2010 20:43, Tim Daneliuk wrote: >> The intent is just to provide as similar as possible a user experience. >>> From a coding POV, it is surely simpler to just use 'winuser' and >>> 'wingroup', >> but I am sort of philosophically wired to not throw

Re: converting a timezone-less datetime to seconds since the epoch

2010-03-18 Thread Chris Withers
Hey Chris, Chris Rebert wrote: def timestamp(dttm): return time.mktime(dttm.timetuple()) from calendar import timegm def timestamp(dttm): return timegm(dttm.utctimetuple()) #the *utc*timetuple change is just for extra consistency #it shouldn't actually make a difference here Ah, righ

Re: Feeding differeent data types to a class instance?

2010-03-18 Thread Christian
On Mar 14, 2:16 pm, kuru wrote: > Hi > > Thank you so much for all these great suggestions. I will have time > today to try all these and see which one works best for me Answers to your question have spread onto the Python blogosphere as well. http://pythonconquerstheuniverse.wordpress.com/2010/

sqlite3, memory db and multithreading

2010-03-18 Thread królewna
The problem is simple: I have multiple threads within one program. At least 2 threads have to have access to in-memory sqlite database. It is not possible to pass sqlite objects to those threads because an exception is rised: ProgrammingError: SQLite objects created in a thread can only be use

Re: bug in bdist_wininst cross compile?

2010-03-18 Thread Robin Becker
On 17/03/2010 21:37, Gabriel Genellina wrote: En Wed, 17 Mar 2010 11:38:16 -0300, Robin Becker escribió: has anyone had any success with cross compilation and bdist_wininst; I have modified build_ext very slightly to fix a small bug in cross compilation related to library order. Please post

Re: import antigravity

2010-03-18 Thread Steven D'Aprano
On Thu, 18 Mar 2010 09:17:43 +0100, Stefan Behnel wrote: > Lawrence D'Oliveiro, 18.03.2010 08:49: >> In message, Chris >> Rebert wrote: >> >> I see that you published my unobfuscated e-mail address on USENET for >> all to see. I obfuscated it for a reason, to keep the spammers away. >> I'm assumin

Re: import antigravity

2010-03-18 Thread Steve Holden
Jussi Piitulainen wrote: > Alf P. Steinbach writes: > >> The point is, if he's upset about Chris quoting that, then he's >> probably unaware that he's posting it in plaintext himself. > > The complaint was not about quoting but about using in public. Chris > sent his piece to three addresses. Fro

Re: os.walk restart

2010-03-18 Thread Tim Chase
Steve Howell wrote: If that's the case, then you might be able to get away with just leaving some kind of breadcrumbs whenever you've successfully processed a directory or a file, Unless you're indexing a read-only device (whether hardware read-only like a CD, or permission-wise read-only like

Re: Nested Scopes unintended behaviour ?

2010-03-18 Thread Michael Sparks
On Mar 17, 8:29 pm, Terry Reedy wrote: > On 3/17/2010 11:44 AM, Emile van Sebille wrote: > > > On 3/17/2010 8:16 AM Michael Sparks said... > >> Hi, > > >> Is the following behaviour expected ? > > > In short, yes. Assignment within a function forces the variable to > > locals. > > In 3.x, one can

Re: url2lib (windows 7) does not notice when network reconnects (getaddrinfo problem)

2010-03-18 Thread egl...@gmail.com
On 18 мар, 00:47, News123 wrote: > Hi, > > I'd like to write a function, that knows when the 'internet' is reachable. > > My setup is a windows7 host with a wireless USB modem. The modem might > connect / disconnect any time. > > I thought I write a small function just checking whether I can fetch

Re: did anybody play with python and window mobile broadband?

2010-03-18 Thread egl...@gmail.com
On 18 мар, 11:20, News123 wrote: > I'd like to use a mobile broadband device with a windows python app. > Did anybody play already with python and the window mobile broadband > interface? > There was a discussion on this subject in some local forum recently. I assume you're using PythonCE, right?

Re: import antigravity

2010-03-18 Thread Alf P. Steinbach
* Jussi Piitulainen: Alf P. Steinbach writes: The point is, if he's upset about Chris quoting that, then he's probably unaware that he's posting it in plaintext himself. The complaint was not about quoting but about using in public. Chris sent his piece to three addresses. From his headers, r

ARE YOU ARE FAMILIAR WITH ANY COMPUTER LANGUAGE-GET GOOD LUCK

2010-03-18 Thread LALITHA N
http://123maza.com/75/expressions -- http://mail.python.org/mailman/listinfo/python-list

Re: import antigravity

2010-03-18 Thread Jussi Piitulainen
Alf P. Steinbach writes: > The point is, if he's upset about Chris quoting that, then he's > probably unaware that he's posting it in plaintext himself. The complaint was not about quoting but about using in public. Chris sent his piece to three addresses. From his headers, redacted: Newsgrou

Re: import antigravity

2010-03-18 Thread Alf P. Steinbach
* Stefan Behnel: Alf P. Steinbach, 18.03.2010 09:53: Path: feeder.eternal-september.org!eternal-september.org!feeder.erje.net!newsfeed.straub-nv.de!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Lawrence D'Oliveiro Newsgroups: c

Re: did anybody play with python and window mobile broadband?

2010-03-18 Thread Sanjiva P.
On 03/18/2010 10:20 AM, News123 wrote: > I'm looking for examples: > - how to connect/disconnect a mobile broadband device (currently I use > rasdial. not sure it's the best solution) > - to obtain the device's current mode (GPRS / EDGE / . . . ) > - to obtain the current signal level > > Thanks

did anybody play with python and window mobile broadband?

2010-03-18 Thread News123
Hi, I'd like to use a mobile broadband device with a windows python app. Did anybody play already with python and the window mobile broadband interface? I'm looking for examples: - how to connect/disconnect a mobile broadband device (currently I use rasdial. not sure it's the best solution) - t

Re: import antigravity

2010-03-18 Thread Stefan Behnel
Alf P. Steinbach, 18.03.2010 09:53: Path: feeder.eternal-september.org!eternal-september.org!feeder.erje.net!newsfeed.straub-nv.de!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.python Subje

Re: Recall: How to add a library path to pythonpath ?

2010-03-18 Thread Chris Rebert
On Tue, Mar 16, 2010 at 4:56 AM, Barak, Ron wrote: > Barak, Ron would like to recall the message, "How to add a library path to > pythonpath ?". Good luck with that. :) - Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32All On 64-Bit Operating Systems

2010-03-18 Thread Tim Golden
On 17/03/2010 20:43, Tim Daneliuk wrote: The intent is just to provide as similar as possible a user experience. From a coding POV, it is surely simpler to just use 'winuser' and 'wingroup', but I am sort of philosophically wired to not throw information away if it's a available from the OS.

Re: import antigravity

2010-03-18 Thread Alf P. Steinbach
* Lawrence D'Oliveiro: In message , Chris Rebert wrote: I see that you published my unobfuscated e-mail address on USENET for all to see. I obfuscated it for a reason, to keep the spammers away. I'm assuming this was a momentary lapse of judgement, for which I expect an apology. Otherwise, it b

Re: C++ code generation

2010-03-18 Thread CHEN Guang
>> - Original Message - >> From: "Dan Goodman" >> >>> I'm doing some C++ code generation using Python, and would be interested >>> in any comments on the approach I'm taking. >> >> PythoidC ( http://pythoidc.googlecode.com ) is a C code generator (not C++) > > It would be nice if you could

Recall: How to add a library path to pythonpath ?

2010-03-18 Thread Barak, Ron
Barak, Ron would like to recall the message, "How to add a library path to pythonpath ?". -- http://mail.python.org/mailman/listinfo/python-list

Re: import antigravity

2010-03-18 Thread Stefan Behnel
Lawrence D'Oliveiro, 18.03.2010 08:49: In message, Chris Rebert wrote: I see that you published my unobfuscated e-mail address on USENET for all to see. I obfuscated it for a reason, to keep the spammers away. I'm assuming this was a momentary lapse of judgement, for which I expect an apology. O

Re: C-API PyObject_Call

2010-03-18 Thread Stefan Behnel
moerchendiser2k3, 17.03.2010 23:35: 1) put the line number information into the message string when you raise the exception you mean the line and file information of the C code, right? Funny that you (being the OP) ask *me* what kind of line information *you* want. Stefan -- http://mail.p

Re: import antigravity

2010-03-18 Thread Lawrence D'Oliveiro
In message , Chris Rebert wrote: I see that you published my unobfuscated e-mail address on USENET for all to see. I obfuscated it for a reason, to keep the spammers away. I'm assuming this was a momentary lapse of judgement, for which I expect an apology. Otherwise, it becomes grounds for an abu