Re: Need some advice

2008-10-23 Thread alex23
On Oct 23, 3:15 pm, Larry Bates [EMAIL PROTECTED] wrote: Bruno is correct, the protocol IS https, you don't type shttp into your browser get secure http connection. https[1] and shttp[2] are two entirely different protocols. [1] http://en.wikipedia.org/wiki/Https [2]

Re: Possible read()/readline() bug?

2008-10-23 Thread Terry Reedy
Steven D'Aprano wrote: On Wed, 22 Oct 2008 16:59:45 -0400, Terry Reedy wrote: Mike Kent wrote: Before I file a bug report against Python 2.5.2, I want to run this by the newsgroup to make sure I'm not [missing something]. Good idea ;-). What you are missing is a rereading of the fine

Re: Passing a memory address (pointer) to an extension?

2008-10-23 Thread Thomas Heller
Philip Semanchuk schrieb: I'm writing a Python extension in C that wraps a function which takes a void * as a parameter. (The function is shmat() which attaches a chunk of shared memory to the process at the address supplied by the caller.) I would like to expose this function to Python,

Music Theory Programming Google Group

2008-10-23 Thread Chuck Cronan
Outstretched (Omar?) Today I answered a query you presented two years ago about programming music at VBAX, Using Arrays and Indexes To Manipulate Variables ( A Music Project ). I don't know if you solved it but I realized that the notes and MIDI codes actually follow a base 12 (duodecimal)

Re: crossplatform standalone python apps

2008-10-23 Thread Gabriel Rossetti
Martin v. Löwis wrote: I like to create a cross-platform standalone python application, like Mac OS *.app dirs. The idea is to distribute a zip file containing everything (the python interpreter and all) so that a user just unzips it and runs it. I don't think this can possibly work. If

Re: 2.6, 3.0, and truly independent intepreters

2008-10-23 Thread Rhamphoryncus
On Oct 22, 10:31 pm, Andy [EMAIL PROTECTED] wrote: You seem confused.  PEP 3121 is for isolated interpreters (ie emulated processes), not threading. Please reread my points--inherently isolated interpreters (ie. the top level object) are indirectly linked to thread independence.  I don't

Re: windows / unix path

2008-10-23 Thread Tim Roberts
greg [EMAIL PROTECTED] wrote: Dennis Lee Bieber wrote: The command line is the only place the slash direction has any effect any way... Avoid os.system(), subprocess with shell = True, and forward is safe in any position. I'm not sure that's quite true. On Windows, it's not the shell that

Re: Commercial Products in Python

2008-10-23 Thread Diez B. Roggisch
azrael schrieb: Why don't you give a try to IronPython. I began playin with it yesterday, and as far as I can see, My worries about selling a python application are gone, so far. Why? It's byte-compiled as the CPython code, and needs an explicit interpreter installed. So where is the

[2.5.1] Converting string to int?

2008-10-23 Thread Gilles Ganault
Hello I'm using the APSW wrapper to SQLite, and I'm stuck at how to pass data from a dictionary to the database which expects an integer: #array filled by reading a two-column text file as input for (isbn,carton) in data.items(): #TypeError: int argument required sql = INSERT

Re: [ANN]pygccxml - 1.0

2008-10-23 Thread Matthieu Brucher
Hi, I'm trying to use your package, but the gccxml installer is not available from your website anymore. Is it possible for you to upload it again ? Thanks, Matthieu 2008/10/20 Roman Yakovenko [EMAIL PROTECTED]: Hello! I'm pleased to announce the 1.0 release of pygccxml. What is pygccxml?

Re: 2.6, 3.0, and truly independent intepreters

2008-10-23 Thread Christian Heimes
Andy wrote: 2) Barriers to free threading. As Jesse describes, this is simply just the GIL being in place, but of course it's there for a reason. It's there because (1) doesn't hold and there was never any specs/ guidance put forward about what should and shouldn't be done in multi- threaded

Re: Possible read()/readline() bug?

2008-10-23 Thread Carl Banks
On Oct 22, 2:54 pm, Mike Kent [EMAIL PROTECTED] wrote: Before I file a bug report against Python 2.5.2, I want to run this by the newsgroup to make sure I'm not being stupid. I have a text file of fixed-length records I want to read in random order.  That file is being changed in real-time by

Find in list of objects

2008-10-23 Thread Andreas Müller
Hi! (Python 2.2.3 if this is relevant :-) I have a list of objects with, lets say, the attributes ID, x and y. Now I want to find the index of list element with ID=10. Of course I can loop through the list manually, but is there a construct like list.find (10, key='ID') ? Thanks for your

Re: [APSW] SELECT COUNT(*) not succesfull?

2008-10-23 Thread Gilles Ganault
On Thu, 23 Oct 2008 00:24:01 -0200, Gabriel Genellina [EMAIL PROTECTED] wrote: In case you didn't notice, B.D. already provided the answer you're after - reread his 3rd paragraph from the end. Yes, but it doesn't work with this wrapper (APSW version 3.5.9-r1): The recommended way is to pass

Re: [ANN]pygccxml - 1.0

2008-10-23 Thread Roman Yakovenko
On Thu, Oct 23, 2008 at 9:20 AM, Matthieu Brucher [EMAIL PROTECTED] wrote: Hi, I'm trying to use your package, but the gccxml installer is not available from your website anymore. Is it possible for you to upload it again ? No :-(. It caused too much damage and didn't work reliably. I

Re: [2.5.1] Converting string to int?

2008-10-23 Thread Gilles Ganault
On Thu, 23 Oct 2008 09:19:07 +0200, Gilles Ganault [EMAIL PROTECTED] wrote: I'm using the APSW wrapper to SQLite, and I'm stuck at how to pass data from a dictionary to the database which expects an integer: Found it: Apparently, this wrapper uses a different placeholder and takes care of

Re: [ANN]pygccxml - 1.0

2008-10-23 Thread Matthieu Brucher
2008/10/23 Roman Yakovenko [EMAIL PROTECTED]: On Thu, Oct 23, 2008 at 9:20 AM, Matthieu Brucher [EMAIL PROTECTED] wrote: Hi, I'm trying to use your package, but the gccxml installer is not available from your website anymore. Is it possible for you to upload it again ? No :-(. It caused

Re: Append a new value to dict

2008-10-23 Thread Frank Niemeyer
[EMAIL PROTECTED] schrieb: Frank Niemeyer: There's simply no way to increment a non-existent value - not without performing some obscure implict behind-the-scenes stuff. Like importing and using a defaultdict(int). There's nothing implicit in explicitly defining some default behaviour.

Re: Dummy explanation to win32com needed

2008-10-23 Thread Tim Golden
korean_dave wrote: Hi. I need a dummy's explanation to utilizing the win32com component to access Microsoft Excel. So far, I have this code. import win32com.client xl = win32com.client.Dispatch(Excel.Application) xl.Visible = 1 workbook = xl.Workbooks.Open(C:\test.xls) Well,

Re: PyGUI as a standard GUI API for Python?

2008-10-23 Thread Kay Schluehr
On 11 Okt., 09:56, lkcl [EMAIL PROTECTED] wrote: The role of Python is somewhat arbitrary. This could change only if Python becomes a client side language executed by AVM,V8etc. pyv8 -http://advogato.org/article/985.html pyjs.py - standalone python-to-javascript compiler,

Re: [APSW] SELECT COUNT(*) not succesfull?

2008-10-23 Thread Tino Wildenhain
Gilles Ganault wrote: Hello I'm trying to use the APSW package to access a SQLite database, but can't find how to check if a row exists. I just to read a tab-separated file, extract a key/value from each line, run SELECT COUNT(*) to check whether this tuple exists in the SQLite database, and if

Re: Need some advice

2008-10-23 Thread Bruno Desthuilliers
Larry Bates a écrit : azrael wrote: On Oct 22, 9:48 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: azrael a écrit : If my memory is me well http transfers data in plaintext. Because of the risk of datacapturing, is there a better soulutioon to suggest to be more secure like shttp I

Re: [APSW] SELECT COUNT(*) not succesfull?

2008-10-23 Thread Bruno Desthuilliers
Gilles Ganault a écrit : On Thu, 23 Oct 2008 00:24:01 -0200, Gabriel Genellina [EMAIL PROTECTED] wrote: In case you didn't notice, B.D. already provided the answer you're after - reread his 3rd paragraph from the end. Yes, but it doesn't work with this wrapper (APSW version 3.5.9-r1): The

Re: socket programming (client-server) error

2008-10-23 Thread Python
On 23 okt 2008, at 05:49, ryan wrote: On Oct 22, 6:18 pm, Python [EMAIL PROTECTED] wrote: On 22 okt 2008, at 13:50, ryan fox wrote: i have implemented a small client server model to do file transfer over a LAN network. It work with some machines on the network and on others it doesnt.

Re: Append a new value to dict

2008-10-23 Thread bearophileHUGS
Marc 'BlackJack' Rintsch: counter['B'] = counter.get('B', 0) + 1 If you benchmark it, you will find that using the get() method it's quite slower. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Ordering python sets

2008-10-23 Thread Duncan Booth
Peter Otten [EMAIL PROTECTED] wrote: I guess I have to move the goal posts to beat you: set([-1,-2]), set([-2,-1]) (set([-2, -1]), set([-1, -2])) For that one the number of slots doesn't matter because hash(-1), hash(-2) (-2, -2) Neat. last = [] for i in range(0,1,5):

Re: Find in list of objects

2008-10-23 Thread bearophileHUGS
Andreas Müller: is there a construct like list.find (10, key='ID') You can create yourself a little convenience function, or you can use something like the following. First some testing code: class C: def __init__(self, id): self.id = id def __repr__(self): return %s %

Re: Find in list of objects

2008-10-23 Thread Gabriel Genellina
En Thu, 23 Oct 2008 05:23:51 -0200, Andreas Müller [EMAIL PROTECTED] escribió: (Python 2.2.3 if this is relevant :-) I have a list of objects with, lets say, the attributes ID, x and y. Now I want to find the index of list element with ID=10. Of course I can loop through the list manually,

substitution __str__ method of an instance

2008-10-23 Thread netimen
I couldn't substitute __str__ method of an instance. Though I managed to substitute ordinary method of an instance: from types import MethodType class Foo(object): pass class Printer(object): def __call__(self, obj_self): return 'printed' f = Foo() f.printer =

Re: substitution __str__ method of an instance

2008-10-23 Thread Christian Heimes
netimen wrote: How can I substitute __str__ method of an instance? It's not possible. For performance and other reasons most __*__ methods are looked up on the type only. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: substitution __str__ method of an instance

2008-10-23 Thread Diez B. Roggisch
netimen wrote: I couldn't substitute __str__ method of an instance. Though I managed to substitute ordinary method of an instance: from types import MethodType class Foo(object): pass class Printer(object): def __call__(self, obj_self): return 'printed' f =

Re: Snapshot+Clipboard

2008-10-23 Thread [EMAIL PROTECTED]
Claudio Grondi wrote: Yves Lange wrote: Hello, i'm searching a method to take a snapshot and save it in a jpg, bmp or gif file. I tried with win32api and win32con but it save the snapshot to the clipboard, so i tried to redirect this in a file but i have some problems while getting

Re: Append a new value to dict

2008-10-23 Thread [EMAIL PROTECTED]
Frank Niemeyer wrote: However incrementing a non-existing key throws an exception. Right. And that's exactly what I would expect, according to the principle of least surprise Python tries to obey. There's simply no way to increment a non-existent value - not without performing some

why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Tzury Bar Yochay
What is the reason math.pow yields OverflowError while python itself can calculate these large numbers. e.g: import math math.pow(100, 154) 1e+308 math.pow(100, 155) Traceback (most recent call last): File stdin, line 1, in module OverflowError: math range error eval(('100*'* 155)[:-1])

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread John Machin
On Oct 23, 8:21 pm, Tzury Bar Yochay [EMAIL PROTECTED] wrote: What is the reason math.pow yields OverflowError while python itself can calculate these large numbers. e.g: import math math.pow(100, 154) 1e+308 math.pow(100, 155) Traceback (most recent call last):   File stdin, line 1,

Re: better scheduler with correct sleep times

2008-10-23 Thread sokol
On Oct 22, 2:28 am, greg [EMAIL PROTECTED] wrote: sokol wrote: Also, the scheduler runs inside a loop. How do you suppose to run other code while the loop is executing? The sleep function could be doing a select with a timeout on some other source of events, such as a socket or a gui

Re: Module for creating a screenshot of a web page given a URL?

2008-10-23 Thread [EMAIL PROTECTED]
John J. Lee wrote: [EMAIL PROTECTED] writes: Untestetd, but I'm pretty sure something like this will do. If you need more control, and on windows, try pywinauto I do need it to run on Windows. I'll check out pywinauto. Thanks. Note he didn't say you *need* pywinauto to run on

How to get the time of message Received of an outlook mail in python..

2008-10-23 Thread [EMAIL PROTECTED]
Hi,, How can we access the time of message received ( UTC time) of an outlook mail in python? As far as I know the time which it displays in the mail is not the exact time... this UTC time will be present in MIME Header of an outlook mail. Any Help is appreciated..and thanks in advance,,

f2py Error - module crashes after several iterations...

2008-10-23 Thread John [H2O]
Hello, I have a module created from a Fortran file to read in unformatted binary fortran output. It works fine for some datasets, but crashes with others. The strange thing is it will loop through several files before it crashes, then suddently giving me this output: *** glibc detected ***

Re: substitution __str__ method of an instance

2008-10-23 Thread Diez B. Roggisch
Christian Heimes wrote: netimen wrote: How can I substitute __str__ method of an instance? It's not possible. For performance and other reasons most __*__ methods are looked up on the type only. Is that documented somewhere? I *know* it is that way, yet I'd like to have place to read up on

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Tzury Bar Yochay
Because math.pow returns a float; 100 ** 155 won't fit in a float. Sure that is the reason. May I rephrase, my question: Why not returning another type as long as we can calculate it? After all, math module is likely to be used on large numbers as well. --

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Christian Heimes
Tzury Bar Yochay wrote: Because math.pow returns a float; 100 ** 155 won't fit in a float. Sure that is the reason. May I rephrase, my question: Why not returning another type as long as we can calculate it? After all, math module is likely to be used on large numbers as well. Because it's

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread John Machin
On Oct 23, 9:24 pm, Tzury Bar Yochay [EMAIL PROTECTED] wrote: Because math.pow returns a float; 100 ** 155 won't fit in a float. Sure that is the reason. May I rephrase, my question: Why not returning another type as long as we can calculate it? After all, math module is likely to be used

Re: How to get the time of message Received of an outlook mail in python..

2008-10-23 Thread Tzury Bar Yochay
On Oct 23, 12:04 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi,,       How can we access the time of message received ( UTC time) of an outlook mail in python? As far as I know the time which it displays in the mail is not the exact time... this UTC time will be present in MIME Header of

Python Imaging Library Question

2008-10-23 Thread Marek Kralewski
Hi, I am writing a script to convert EPS to PNG images. I need to set the resolution (and geometry accordingly), since the rendered images are to small. The resolution and geometry must be given as switches to the gs command. Is there a way to overload the Ghostcript function in the

Re: Python 2.6, multiprocessing module and BSD

2008-10-23 Thread MRAB
On Oct 22, 5:14 pm, Philip Semanchuk [EMAIL PROTECTED] wrote: On Oct 22, 2008, at 11:37 AM, Jesse Noller wrote: On Wed, Oct 22, 2008 at 11:06 AM, Philip Semanchuk [EMAIL PROTECTED] wrote: One oversight I noticed the multiprocessing module docs is that a semaphore's acquire() method

Question about scope

2008-10-23 Thread Pat
I have a Globals class. In it, I have a variable defined something like this: remote_device_enabled = bool In one module, I assign True/False to Globals.remote_device_enabled. Once set, this value never changes. In another module, at the top after the imports statements, I tried this: from

Re: Find in list of objects

2008-10-23 Thread bearophileHUGS
Andreas Müller: is there a construct like list.find (10, key='ID') Given the current Python a syntax like this is more probable: somelist.find(10, key=attrgetter('ID')) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the time of message Received of an outlook mail in python..

2008-10-23 Thread [EMAIL PROTECTED]
On Oct 23, 4:01 pm, Tzury Bar Yochay [EMAIL PROTECTED] wrote: On Oct 23, 12:04 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi,,       How can we access the time of message received ( UTC time) of an outlook mail in python? As far as I know the time which it displays in the mail is

Slow comparison between two lists

2008-10-23 Thread Jani Tiainen
I have rather simple 'Address' object that contains streetname, number, my own status and x,y coordinates for it. I have two lists both containing approximately 3 addresses. I've defined __eq__ method in my class like this: def __eq__(self, other): return self.xcoord ==

Re: Slow comparison between two lists

2008-10-23 Thread Hrvoje Niksic
Jani Tiainen [EMAIL PROTECTED] writes: for addr in list_external: if addr not in list_internal: addr.status = 1 # New address But in my case running that loop takes about 10 minutes. What I am doing wrong? The nested loop takes time proportional to the product of the number of

Re: Slow comparison between two lists

2008-10-23 Thread Peter Otten
Jani Tiainen wrote: I have rather simple 'Address' object that contains streetname, number, my own status and x,y coordinates for it. I have two lists both containing approximately 3 addresses. I've defined __eq__ method in my class like this: def __eq__(self, other):

Re: Slow comparison between two lists

2008-10-23 Thread bearophileHUGS
Hrvoje Niksic: internal = set(list_internal) ... To do that the original poster may have to define a __hash__ and __eq__ methods in his/her class. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Slow comparison between two lists

2008-10-23 Thread Stef Mientki
On Thu, Oct 23, 2008 at 2:03 PM, Jani Tiainen [EMAIL PROTECTED] wrote: I have rather simple 'Address' object that contains streetname, number, my own status and x,y coordinates for it. I have two lists both containing approximately 3 addresses. I've defined __eq__ method in my class like

Re: Slow comparison between two lists

2008-10-23 Thread Bruno Desthuilliers
Jani Tiainen a écrit : I have rather simple 'Address' object that contains streetname, number, my own status and x,y coordinates for it. I have two lists both containing approximately 3 addresses. I've defined __eq__ method in my class like this: def __eq__(self, other): return

Re: Question about scope

2008-10-23 Thread Lave
Newbie too. I think you shoud qualify Global with the module name. On 10/23/08, Pat [EMAIL PROTECTED] wrote: I have a Globals class. In it, I have a variable defined something like this: remote_device_enabled = bool In one module, I assign True/False to Globals.remote_device_enabled. Once

Re: f2py Error - module crashes after several iterations...

2008-10-23 Thread Robert Kern
John [H2O] wrote: Hello, I have a module created from a Fortran file to read in unformatted binary fortran output. It works fine for some datasets, but crashes with others. The strange thing is it will loop through several files before it crashes, then suddently giving me this output: Can you

Re: substitution __str__ method of an instance

2008-10-23 Thread Bruno Desthuilliers
netimen a écrit : I couldn't substitute __str__ method of an instance. Though I managed to substitute ordinary method of an instance: from types import MethodType class Foo(object): pass class Printer(object): def __call__(self, obj_self): return 'printed' f = Foo()

BDSM HARDCORE 1 Tb movi

2008-10-23 Thread fernandena
http://traxanki.byethost15.com/bdsm.htm BDSM http://traxanki.byethost15.com/hardcore.htm HARDCORE http://s0x0.blogspot.com http://groups.google.com/group/porntube-best-movies-collection -- http://mail.python.org/mailman/listinfo/python-list

Re: Slow comparison between two lists

2008-10-23 Thread Jani Tiainen
On 23 loka, 15:24, Peter Otten [EMAIL PROTECTED] wrote: Jani Tiainen wrote: I have rather simple 'Address' object that contains streetname, number, my own status and x,y coordinates for it. I have two lists both containing approximately 3 addresses. I've defined __eq__ method in my

Re: substitution __str__ method of an instance

2008-10-23 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : Christian Heimes wrote: netimen wrote: How can I substitute __str__ method of an instance? It's not possible. For performance and other reasons most __*__ methods are looked up on the type only. Is that documented somewhere? I *know* it is that way, yet I'd like

Re: [APSW] SELECT COUNT(*) not succesfull?

2008-10-23 Thread Gerhard Häring
Dennis Lee Bieber wrote: On Thu, 23 Oct 2008 09:26:54 +0200, Gilles Ganault [EMAIL PROTECTED] declaimed the following in comp.lang.python: Yes, but it doesn't work with this wrapper (APSW version 3.5.9-r1): APSW is not, so far as I recall, a DB-API 2 adapter -- it is a touch more

Re: [APSW] SELECT COUNT(*) not succesfull?

2008-10-23 Thread Gerhard Häring
Gilles Ganault wrote: On Thu, 23 Oct 2008 00:24:01 -0200, Gabriel Genellina [EMAIL PROTECTED] wrote: In case you didn't notice, B.D. already provided the answer you're after - reread his 3rd paragraph from the end. Yes, but it doesn't work with this wrapper (APSW version 3.5.9-r1): The

Re: Slow comparison between two lists

2008-10-23 Thread Hrvoje Niksic
[EMAIL PROTECTED] writes: internal = set(list_internal) ... To do that the original poster may have to define a __hash__ and __eq__ methods in his/her class. You're right. The OP states he implements __eq__, so he also needs a matching __hash__, such as: def __hash__(self, other):

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Marc 'BlackJack' Rintsch
On Thu, 23 Oct 2008 02:21:36 -0700, Tzury Bar Yochay wrote: eval(('100*'* 155)[:-1]) 100 000 000

Re: Possible read()/readline() bug?

2008-10-23 Thread Mike Kent
To followup on this: Terry: Yes, I did in fact miss the 'buffer' parameter to open. Setting the buffer parameter to 0 did in fact fix the test code that I gave above, but oddly, did not fix my actual production code; it continues to get the data as first read, rather than what is currently on the

Re: Slow comparison between two lists

2008-10-23 Thread bearophileHUGS
Hrvoje Niksic: You're right.  The OP states he implements __eq__, so he also needs a matching __hash__, such as:     def __hash__(self, other):         return (hash(self.xcoord) ^ hash(self.ycoord) ^                 hash(self.streetname) ^ hash(self.streetno)) The hash function by Otten is

Logger / I get all messages 2 times

2008-10-23 Thread ASh
Hi, I have this source: import logging import logging.config logging.config.fileConfig(logging.properties) log = logging.getLogger(qname) log.debug(message) --- OUTPUT DEBUG logger_test:8: message DEBUG logger_test:8: message --- FILE CONFIG [formatters] keys: detailed

Re: f2py Error - module crashes after several iterations...

2008-10-23 Thread John [H2O]
I can try, would you mind giving very brief instructions on how to 'run it under gdb'... thanks! I'll post results over at numpy-discussions. Robert Kern-2 wrote: John [H2O] wrote: Hello, I have a module created from a Fortran file to read in unformatted binary fortran output. It works

Re: Logger / I get all messages 2 times

2008-10-23 Thread Diez B. Roggisch
ASh wrote: Hi, I have this source: import logging import logging.config logging.config.fileConfig(logging.properties) log = logging.getLogger(qname) log.debug(message) --- OUTPUT DEBUG logger_test:8: message DEBUG logger_test:8: message --- FILE CONFIG

Re: Passing a memory address (pointer) to an extension?

2008-10-23 Thread Philip Semanchuk
On Oct 22, 2008, at 8:33 PM, Robert Kern wrote: Philip Semanchuk wrote: I'm writing a Python extension in C that wraps a function which takes a void * as a parameter. (The function is shmat() which attaches a chunk of shared memory to the process at the address supplied by the caller.) I

Re: Passing a memory address (pointer) to an extension?

2008-10-23 Thread Philip Semanchuk
On Oct 23, 2008, at 2:13 AM, Thomas Heller wrote: Philip Semanchuk schrieb: I'm writing a Python extension in C that wraps a function which takes a void * as a parameter. (The function is shmat() which attaches a chunk of shared memory to the process at the address supplied by the caller.) I

Re: f2py Error - module crashes after several iterations...

2008-10-23 Thread Robert Kern
John [H2O] wrote: I can try, would you mind giving very brief instructions on how to 'run it under gdb'... thanks! Sure. It goes something like this: $ gdb python GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007) Copyright 2004 Free Software Foundation, Inc. GDB

Re: Function to Add List Elements?

2008-10-23 Thread Boris Borcic
Chris Rebert wrote: On Wed, Oct 22, 2008 at 12:59 PM, Henry Chang [EMAIL PROTECTED] wrote: This seems like a simple problem, but I can't find a simple solution. Suppose I have two lists of integers. List A = [A1, A2, A3] List B = [B1, B2, B3] I just simply want a new list, such as: List C =

Re: Possible read()/readline() bug?

2008-10-23 Thread pruebauno
On Oct 23, 9:48 am, Mike Kent [EMAIL PROTECTED] wrote: To followup on this: Terry: Yes, I did in fact miss the 'buffer' parameter to open. Setting the buffer parameter to 0 did in fact fix the test code that I gave above, but oddly, did not fix my actual production code; it continues to get

Re: Python Imaging Library Question

2008-10-23 Thread Thomas Guettler
Marek Kralewski schrieb: Hi, I am writing a script to convert EPS to PNG images. I need to set the resolution (and geometry accordingly), since the rendered images are to small. The resolution and geometry must be given as switches to the gs command. Is there a way to overload the

Perl/Python regular expressions vs. Boost.regex?

2008-10-23 Thread skip
A colleague wrote a C++ library here at work which uses the Boost.regex library. I quickly discovered an apparent problem with how it searches. Unlike re.match the regex_match function in that library effectively anchors the match at both the start and the end. Can other people confirm this?

Re: f2py Error - module crashes after several iterations...

2008-10-23 Thread John [H2O]
There's a lot of greek for me here ... should I post to numpy-discussions as well??? The backtrace is at the bottom Thanks! GNU gdb Fedora (6.8-21.fc9) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is

logging module

2008-10-23 Thread Werner F. Bruhin
I am starting to use the logging module. Simple log to file and/or console work very nicely. Even managed to get TimedRotatingFileHandler to work. The problem I am trying to solve. 1. I would like to have a log viewer a wxPython based app to be able to look at a log generated by another

Re: Possible read()/readline() bug?

2008-10-23 Thread M.-A. Lemburg
On 2008-10-22 23:00, kdwyer wrote: On 22 Oct, 19:54, Mike Kent [EMAIL PROTECTED] wrote: Before I file a bug report against Python 2.5.2, I want to run this by the newsgroup to make sure I'm not being stupid. I have a text file of fixed-length records I want to read in random order. That

Re: [APSW] SELECT COUNT(*) not succesfull?

2008-10-23 Thread M.-A. Lemburg
On 2008-10-23 09:26, Gilles Ganault wrote: On Thu, 23 Oct 2008 00:24:01 -0200, Gabriel Genellina [EMAIL PROTECTED] wrote: In case you didn't notice, B.D. already provided the answer you're after - reread his 3rd paragraph from the end. Yes, but it doesn't work with this wrapper (APSW

Re: [ANN]pygccxml - 1.0

2008-10-23 Thread M.-A. Lemburg
On 2008-10-23 09:20, Matthieu Brucher wrote: Hi, I'm trying to use your package, but the gccxml installer is not available from your website anymore. Is it possible for you to upload it again ? Works for me:

Re: f2py Error - module crashes after several iterations...

2008-10-23 Thread Robert Kern
John [H2O] wrote: There's a lot of greek for me here ... should I post to numpy-discussions as well??? Yes, please. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an

python extensions: including project local headers

2008-10-23 Thread J Kenneth King
Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector. I'm working on a computer-vision based project that requires interfacing with Python at the higher layers, so I figured the best way to handle this would be in C (since my initial

Re: python extensions: including project local headers

2008-10-23 Thread Philip Semanchuk
On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector. I'm working on a computer-vision based project that requires interfacing with Python at the higher layers, so I figured the

OS 10.5 build 64 bits

2008-10-23 Thread Robin Becker
I'm trying to build Python from the unix sources on an OS 10.5 machine. This is because we're getting strange faults when using the built in python 2.5 together with some precompiled versions of MySQLdb PIL etc etc. The build works if I use python2.6 and with one minor fix I can get all the

Re: python extensions: including project local headers

2008-10-23 Thread Robert Kern
Philip Semanchuk wrote: On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector. I'm working on a computer-vision based project that requires interfacing with Python at the higher

Do a Gnuplot of a file in python

2008-10-23 Thread Santix
I am doing a python program that save the data in a text file in columns and I want to do a gnuplot to plot the results. But I want the program in python to show the result with gnuplot. I have tried this: g.load(power.p) but it gives me this error: Traceback (most recent call last): File

Re: crossplatform standalone python apps

2008-10-23 Thread Martin v. Löwis
yes, I know that :-), I ment everything that can be, my problem is more with PYTHONPATH and stuff like that. Then I don't understand what you meant. What is it (specifically!) that you do, what happens, what do you want to happen instead? Regards, Martin --

Re: python extensions: including project local headers

2008-10-23 Thread J Kenneth King
Robert Kern [EMAIL PROTECTED] writes: Philip Semanchuk wrote: On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector. I'm working on a computer-vision based project that

Re: OS 10.5 build 64 bits

2008-10-23 Thread M.-A. Lemburg
Hi Robin, On 2008-10-23 17:55, Robin Becker wrote: I'm trying to build Python from the unix sources on an OS 10.5 machine. This is because we're getting strange faults when using the built in python 2.5 together with some precompiled versions of MySQLdb PIL etc etc. The build works if I

Re: How to do_size_allocate properly in a gtk.Viewport subclass

2008-10-23 Thread Joel Hedlund
Joel Hedlund wrote: And another relevant question: am I overcomplicating this? Yes. :-) The proper way of doing this is to pack the widget in a container, and then add the container (with viewport) to a scrolledwindow. For example, for a centered widget choose a 1x1 gtk.Table and attach

Re: Question about scope

2008-10-23 Thread Bruno Desthuilliers
Pat a écrit : I have a Globals class. Not sure it's such a great idea, but anyway... What's the use case for this class ? There are perhaps better (or at least more idiomatic) solutions... In it, I have a variable defined something like this: remote_device_enabled = bool Could you show

Re: Perl/Python regular expressions vs. Boost.regex?

2008-10-23 Thread tomohiro kusumi
I was confused when I first used Boost regualr expressions, but I got used to it now. Aside from it, I think Boost regular expression makes you write too much code just to do a simple pattern matching. Tomohiro Kusumi 2008/10/23 [EMAIL PROTECTED] A colleague wrote a C++ library here at work

Re: re.search over a list

2008-10-23 Thread Bruno Desthuilliers
Steve Holden a écrit : Pat wrote: Bruno Desthuilliers wrote: (snip) words = ['foo', 'bar', 'somestring', 'baaz'] re.search(r^somestring$, \n.join(words), re.MULTILINE) (snip) I suspect that any(re.match(pat, word) for word in words) might be a more efficient way to do this.

Re: python extensions: including project local headers

2008-10-23 Thread Robert Kern
J Kenneth King wrote: Robert Kern [EMAIL PROTECTED] writes: Philip Semanchuk wrote: On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector. I'm working on a computer-vision based

Re: logging module

2008-10-23 Thread Matimus
On Oct 23, 7:58 am, Werner F. Bruhin [EMAIL PROTECTED] wrote: I am starting to use the logging module. Simple log to file and/or console work very nicely. Even managed to get TimedRotatingFileHandler to work. The problem I am trying to solve. 1. I would like to have a log viewer a

Python26 compilation problem

2008-10-23 Thread Mathew
I am getting Modules/config.c:39: error: expected declaration specifiers or '...' before numeric constant because of extern void initsocket(2)(void); in config.c What is this? How do I fix it? Mathew -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN]pygccxml - 1.0

2008-10-23 Thread Matthieu Brucher
2008/10/23 M.-A. Lemburg [EMAIL PROTECTED]: On 2008-10-23 09:20, Matthieu Brucher wrote: Hi, I'm trying to use your package, but the gccxml installer is not available from your website anymore. Is it possible for you to upload it again ? Works for me:

http://www.maidi2008.com/views.asp?big_id=131sort_id=389nsort_id=1273hw_id=43533

2008-10-23 Thread www.maidi2008.com
Reply to: [EMAIL PROTECTED] MSN:[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >