Re: using python interpreters per thread in C++ program

2009-09-07 Thread sturlamolden
On 7 Sep, 07:17, grbgooglefan ganeshbo...@gmail.com wrote: Can we not use python interpreters even private to each multiple thread? You can use multiple interpreters, but they share GIL. For example, Python extension modules are DLLs and will be loaded only once for each process - the OS makes

Re: using python interpreters per thread in C++ program

2009-09-07 Thread ganesh
Did you remeber to acquire the GIL? The GIL is global to the process No, I did not use GIL. -- Why do we need to use GIL even though python is private to each thread? -- For using GIL, do we need to initialize GIL at startup and destroy/ finalize it at end? -- With GIL, we are not achieiving

Re: simple string question

2009-09-07 Thread Sean DiZazzo
On Sep 6, 10:29 pm, jwither jwit...@sxder4kmju.com wrote: Given a string (read from a file) which contains raw escape sequences, (specifically, slash n), what is the best way to convert that to a parsed string, where the escape sequence has been replaced (specifically, by a NEWLINE token)?

Re: using python interpreters per thread in C++ program

2009-09-07 Thread ganesh
Did you remeber to acquire the GIL? The GIL is global to the process (hence the name). No, I did not use GIL. -- For using GIL, do we need to initialize GIL at startup and destroy/ finalize it at end? -- Are there any configuration build related flags that I need to use to make this work?

Re: using python interpreters per thread in C++ program

2009-09-07 Thread sturlamolden
On 7 Sep, 07:59, ganesh ganeshbo...@gmail.com wrote: No, I did not use GIL. -- For using GIL, do we need to initialize GIL at startup and destroy/ finalize it at end? -- Are there any configuration build related flags that I need to use to make this work? Please guide. Thanks. I just

Re: simple string question

2009-09-07 Thread 7stud
On Sep 6, 11:29 pm, jwither jwit...@sxder4kmju.com wrote: Given a string (read from a file) which contains raw escape sequences, (specifically, slash n), what is the best way to convert that to a parsed string, where the escape sequence has been replaced (specifically, by a NEWLINE token)?

Re: simple string question

2009-09-07 Thread Chris Rebert
On Sun, Sep 6, 2009 at 10:29 PM, jwitherjwit...@sxder4kmju.com wrote: Given a string (read from a file) which contains raw escape sequences, (specifically, slash n), what is the best way to convert that to a parsed string, where the escape sequence has been replaced (specifically, by a NEWLINE

Re: Something confusing about non-greedy reg exp match

2009-09-07 Thread 7stud
On Sep 6, 8:46 pm, gburde...@gmail.com gburde...@gmail.com wrote: If I do this: import re a=re.search(r'hello.*?money',  'hello how are you hello funny money') I would expect a.group(0) to be hello funny money, since .*? is a non-greedy match. But instead, I get the whole sentence, hello

Re: simple string question

2009-09-07 Thread jwither
Chris Rebert c...@rebertia.com wrote in message news:mailman.1075.1252306208.2854.python-l...@python.org... On Sun, Sep 6, 2009 at 10:29 PM, jwitherjwit...@sxder4kmju.com wrote: Given a string (read from a file) which contains raw escape sequences, (specifically, slash n), what is the best

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Graham Dumpleton
On Sep 7, 3:42 pm, sturlamolden sturlamol...@yahoo.no wrote: On 7 Sep, 07:17, grbgooglefan ganeshbo...@gmail.com wrote: What is best way to embed python in multi-threaded C++ application? Did you remeber to acquire the GIL? The GIL is global to the process (hence the name). void

Re: Evil trend report - cancelled

2009-09-07 Thread Asun Friere
On Sep 7, 1:07 pm, John Nagle na...@animats.com wrote:     Accidentally posted a private e-mail.  Cancelled.  Sorry. You think you can get out of it that easily? You've exposed yourself as an enemy of the Empire now! You'd better look over your shoulder for guys dressed in black cloaks

Re: Evil trend report

2009-09-07 Thread John Yeung
On Sep 6, 4:27 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Why aren't you including Yahoo search in your test? (It has a much bigger market share than MSN, even rebranded as Bing). Microsoft acquired Yahoo! at the end of July. I would think Yahoo! search is powered by

Re: Evil trend report

2009-09-07 Thread Steven D'Aprano
On Sun, 06 Sep 2009 12:35:11 -0700, John Yeung wrote: On Sep 6, 4:27 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Why aren't you including Yahoo search in your test? (It has a much bigger market share than MSN, even rebranded as Bing). Microsoft acquired Yahoo! at the

Re: Evil trend report

2009-09-07 Thread Grant Edwards
On 2009-09-06, John Nagle na...@animats.com wrote: Bing A 32.4% () A 10.8% (non_commercial) Q50 40.0% () Q15 12.0% (no_location) U 54.0% (no_website) U33 26.4% (non_commercial) X 10.8% (negative_info) X17

Re: using python interpreters per thread in C++ program

2009-09-07 Thread ganesh
On Sep 7, 2:04 pm, sturlamolden sturlamol...@yahoo.no wrote: I just showed you how... Modified the thread function to use these APIs, but the call to PyGILState_Ensure() is not returning at all. void *callPyFunction(void * arg) { // Method two to get function eval long thridx=(long)arg;

Re: The future of Python immutability

2009-09-07 Thread Simon Brunning
2009/9/7 Terry Reedy tjre...@udel.edu: Dennis Lee Bieber wrote: I'd say the mutables are in the majority G I think it depends on whether one counts classes or instances. Typical programs have a lot of numbers and strings. Ah, but immutable instances can be, and often are, interned. This

Re: Is #!/usr/bin/env python the better shebang line ?

2009-09-07 Thread ryles
On Sep 6, 10:01 am, Timothy Madden terminato...@gmail.com wrote: Hello Sorry if this has been discussed before, my search did not find it. My questions is if I should use    #!/usr/bin/env python as the shebang line in a portable and open python script and if it does help with portability

Re: Application-global switches?

2009-09-07 Thread Nick Craig-Wood
kj no.em...@please.post wrote: I'm looking for the best-practice way to define application-global read-only switches, settable from the command line. The best example I can think of of such global switch is the built-in variable __debug__. This variable is visible everywhere in a

Re: simple string question

2009-09-07 Thread ryles
There's probably a more general method covering all the escape sequences, but for just \n: your_string = your_string.replace(\\n, \n) py s = hello\\r\\n py s 'hello\\r\\n' py s.decode(string_escape) 'hello\r\n' py -- http://mail.python.org/mailman/listinfo/python-list

Re: using python interpreters per thread in C++ program

2009-09-07 Thread ganesh
On Sep 7, 3:41 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: On Sep 7, 3:42 pm, sturlamolden sturlamol...@yahoo.no wrote: interpreters. The simplified GIL state API you mentioned only works for threads operating in the main (first) interpreter created within the process. I modified

Re: simple string question

2009-09-07 Thread Niklas Norrthon
On 7 Sep, 07:29, jwither jwit...@sxder4kmju.com wrote: Given a string (read from a file) which contains raw escape sequences, (specifically, slash n), what is the best way to convert that to a parsed string, where the escape sequence has been replaced (specifically, by a NEWLINE token)?

Windows binaries of python in debug mode

2009-09-07 Thread Gabriel Rossetti
Hello everyone, I am looking for a version of python 2.5.x compiled for windows in debug mode, but I can't find this, does anyone have a link or have a version that he/she can send me? Thank you, Gabriel -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of Python immutability

2009-09-07 Thread Graham Breed
John Nagle wrote: In the beginning, strings, tuples, and numbers were immutable, and everything else was mutable. That was simple enough. But over time, Python has acquired more immutable types - immutable sets and immutable byte arrays. Each of these is a special case. snip

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Graham Dumpleton
On Sep 7, 6:47 pm, ganesh ganeshbo...@gmail.com wrote: On Sep 7, 3:41 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: On Sep 7, 3:42 pm, sturlamolden sturlamol...@yahoo.no wrote: interpreters. The simplified GIL state API you mentioned only works for threads operating in the main

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Ulrich Eckhardt
ganesh wrote: Did you remeber to acquire the GIL? The GIL is global to the process No, I did not use GIL. -- Why do we need to use GIL even though python is private to each thread? Quoting from above: The GIL is global to the process. So no, it is NOT private to each thread which means

Re: Something confusing about non-greedy reg exp match

2009-09-07 Thread MRAB
George Burdell wrote: On Sep 6, 10:06 pm, Mark Tolonen metolone+gm...@gmail.com wrote: gburde...@gmail.com wrote in message news:f98a6057-c35f-4843-9efb-7f36b05b6...@g19g2000yqo.googlegroups.com... If I do this: import re a=re.search(r'hello.*?money', 'hello how are you hello funny money')

Re: using python interpreters per thread in C++ program

2009-09-07 Thread ganesh
Actually, I modified my program to have a single shared Py-interpreter across all threads to test the usage of GIL. So, I did Py_Initialize in main() function and only called that python function in different threads. But this is not the way I want to use interpreters in my code. I am looking

Re: zip a huge file into multiple small ones

2009-09-07 Thread Chris Withers
krishna chaitanya wrote: I am new to dealing with zip files in python. I have a huge file which i need to zip and send as an attachment through email. My email restrictions are not allowing me to send it in one go. Is there a way to split this file into multiple zip files, so that i can mail

Re: httplib incredibly slow :-(

2009-09-07 Thread Chris Withers
Dieter Maurer wrote: Chris Withers ch...@simplistix.co.uk writes on Thu, 13 Aug 2009 08:20:37 +0100: ... I've already established that the file downloads in seconds with [something else], so I'd like to understand why python isn't doing the same and fix the problem... A profile might help to

Re: zip a huge file into multiple small ones

2009-09-07 Thread Chris Rebert
On Mon, Sep 7, 2009 at 4:57 AM, Chris Withersch...@simplistix.co.uk wrote: krishna chaitanya wrote: I am new to dealing with zip files in python. I have a huge file which i need to zip and send as an attachment through email. My email restrictions are not allowing me to send it in one go.

Re: using python interpreters per thread in C++ program

2009-09-07 Thread sturlamolden
On 7 Sep, 13:53, ganesh ganeshbo...@gmail.com wrote: I need to use these to get the proper concurrency in my multi-threaded application without any synchronization mechanisms. Why will multiple interpreters give you better concurrency? You can have more than one thread in the same interpreter.

Re: beginner's python help

2009-09-07 Thread Esmail
Maggie wrote: code practice: test = open (test.txt, r) readData = test.readlines() #set up a sum sum = 0; Hi Maggie, I see you have already gotten a lot of useful help. One additional suggestion would be to use a different variable name other than 'sum' as sum is a Python built-in function.

Re: using python interpreters per thread in C++ program

2009-09-07 Thread sturlamolden
On 7 Sep, 13:17, Ulrich Eckhardt eckha...@satorlaser.com wrote: Quoting from above: The GIL is global to the process. So no, it is NOT private to each thread which means python isn't either. At least that is my understanding of the issue. Strictly speaking, the GIL is global to the Python

Re: using python interpreters per thread in C++ program

2009-09-07 Thread MRAB
sturlamolden wrote: On 7 Sep, 13:53, ganesh ganeshbo...@gmail.com wrote: I need to use these to get the proper concurrency in my multi-threaded application without any synchronization mechanisms. Why will multiple interpreters give you better concurrency? You can have more than one thread in

Re: using python interpreters per thread in C++ program

2009-09-07 Thread sturlamolden
On 7 Sep, 14:50, MRAB pyt...@mrabarnett.plus.com wrote: CPython's GIL means that multithreading on multiple processors/cores has limitations. Each interpreter has its own GIL, so processor-intensive applications work better using the multiprocessing module than with the threading module. We

Re: Something confusing about non-greedy reg exp match

2009-09-07 Thread Paul McGuire
On Sep 6, 11:23 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: George Burdell gburde...@gmail.com writes: I want to find every occurrence of money, and for each occurrence, I want to scan back to the first occurrence of hello. How can this be done? By recognising the task: not

Re: simple string question

2009-09-07 Thread D'Arcy J.M. Cain
On Mon, 7 Sep 2009 15:29:23 +1000 jwither jwit...@sxder4kmju.com wrote: Given a string (read from a file) which contains raw escape sequences, (specifically, slash n), what is the best way to convert that to a parsed string, where the escape sequence has been replaced (specifically, by a

Smallest float different from 0.0?

2009-09-07 Thread kj
Is there some standardized way (e.g. some official module of such limit constants) to get the smallest positive float that Python will regard as distinct from 0.0? TIA! kj -- http://mail.python.org/mailman/listinfo/python-list

Validation in RPC call?

2009-09-07 Thread Phillip B Oldham
I'm building an RPC service, and I need to validate the input and provide informative error messages to users. What would be the best way to do this? Simple `if` statements each raising a custom exception? `assert` statements inside a try/except block to translate the assertion errors into

Re: Smallest float different from 0.0?

2009-09-07 Thread Paul McGuire
On Sep 7, 9:47 am, kj no.em...@please.post wrote: Is there some standardized way (e.g. some official module of such limit constants) to get the smallest positive float that Python will regard as distinct from 0.0? TIA! kj You could find it for yourself: for i in range(400): ...if

Re: Smallest float different from 0.0?

2009-09-07 Thread Diez B. Roggisch
Paul McGuire wrote: On Sep 7, 9:47 am, kj no.em...@please.post wrote: Is there some standardized way (e.g. some official module of such limit constants) to get the smallest positive float that Python will regard as distinct from 0.0? TIA! kj You could find it for yourself: for i in

Re: Smallest float different from 0.0?

2009-09-07 Thread Mark Dickinson
On Sep 7, 3:47 pm, kj no.em...@please.post wrote: Is there some standardized way (e.g. some official module of such limit constants) to get the smallest positive float that Python will regard as distinct from 0.0? TIA! kj There's sys.float_info.min: import sys sys.float_info

Smallest float different from 0.0?

2009-09-07 Thread Xavier Ho
This topic came up before. =] See below. Not sure how 'standardised' this is, though. Double precision: import struct struct.unpack('d', struct.pack('Q', 1))[0] 4.9406564584124654e-324 Float precision: struct.unpack('f', struct.pack('L', 1))[0] 1.4012984643248171e-45 Cheers, Xavier --

Re: Smallest float different from 0.0?

2009-09-07 Thread kj
In f253109c-1da7-45f6-82e4-77fdeda64...@k39g2000yqe.googlegroups.com Mark Dickinson dicki...@gmail.com writes: On Sep 7, 3:47=A0pm, kj no.em...@please.post wrote: Is there some standardized way (e.g. some official module of such limit constants) to get the smallest positive float that Python

Re: [Guppy-pe-list] An iteration idiom (Was: Re: loading files containing multiple dumps)

2009-09-07 Thread Chris Withers
Sverker Nilsson wrote: I hope the new loadall method as I wrote about before will resolve this. def loadall(self,f): ''' Generates all objects from an open file f or a file named f''' if isinstance(f,basestring): f=open(f) while True: yield self.load(f) It would be

Re: Smallest float different from 0.0?

2009-09-07 Thread kj
In f253109c-1da7-45f6-82e4-77fdeda64...@k39g2000yqe.googlegroups.com Mark Dickinson dicki...@gmail.com writes: The smallest positive subnormal value is usually 2**-1074. If you want something that would still work if Python ever switched to using IEEE 754 binary128 format (or some other IEEE

Flowcharting in Python?

2009-09-07 Thread Justin
Hi guys, Does anyone know of any code or projects around that are written in Python or can be used by Python to write a flowcharting application? I haven't been able to find any, but the closest thing I have come across is FlowchartPython which allows you to code in Python from flowcharts, which

How do I post to the wxPython mailing list?

2009-09-07 Thread mmanns
Hi Since I have been told in this group to post wxPython related topics in the wxPython-users mailing list instead of here, I just tried doing that. However, I always get an error message back when using gmane. Mailing directly, there is no error message but the message does not appear in the

How do I post to the wxPython mailing list?

2009-09-07 Thread mmanns
Hi Since I have been told in this group to post wxPython related topics in the wxPython-users mailing list instead of here, I just tried doing that. However, I always get an error message back when using gmane. Mailing directly, there is no error message but the message does not appear in the

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread Philip Semanchuk
On Sep 7, 2009, at 12:52 PM, mma...@gmx.net wrote: Hi Since I have been told in this group to post wxPython related topics in the wxPython-users mailing list instead of here, I just tried doing that. However, I always get an error message back when using gmane. Mailing directly, there is

Re: beginner's python help

2009-09-07 Thread Niklas Norrthon
On 6 Sep, 09:00, Maggie la.f...@gmail.com wrote: code practice: test = open (test.txt, r) readData = test.readlines() #set up a sum sum = 0; for item in readData:         sum += int(item) print sum test file looks something like this: 34 23 124 432 12 sum(map(int,

Re: Something confusing about non-greedy reg exp match

2009-09-07 Thread Duncan Booth
gburde...@gmail.com gburde...@gmail.com wrote: If I do this: import re a=re.search(r'hello.*?money', 'hello how are you hello funny money') I would expect a.group(0) to be hello funny money, since .*? is a non-greedy match. But instead, I get the whole sentence, hello how are you hello

Re: Smallest float different from 0.0?

2009-09-07 Thread Mark Dickinson
On Sep 7, 5:08 pm, kj no.em...@please.post wrote: Hmmm.  This close-to-the-metal IEEE stuff make a HERE BE DRAGONS! alarms go off in my head...  (What's up with that correction by 1 to sys.float_info.mant_dig?  Or, probably equivalently, why would sys.float_info.min_exp (-1021) be off by 1

Re: Validation in RPC call?

2009-09-07 Thread Terry Reedy
Phillip B Oldham wrote: I'm building an RPC service, and I need to validate the input and provide informative error messages to users. What would be the best way to do this? Simple `if` statements each raising a custom exception? `assert` statements inside a try/except block to translate the

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread Che M
On Sep 7, 12:50 pm, mma...@gmx.net wrote: Hi Since I have been told in this group to post wxPython related topics in the wxPython-users mailing list instead of here, I just tried doing that. However, I always get an error message back when using gmane. Mailing directly, there is no error

Re: The future of Python immutability

2009-09-07 Thread John Nagle
Graham Breed wrote: John Nagle wrote: In the beginning, strings, tuples, and numbers were immutable, and everything else was mutable. That was simple enough. But over time, Python has acquired more immutable types - immutable sets and immutable byte arrays. Each of these is a special

Re: Math Notations, Computer Languages, and the “F orm” in Formalism

2009-09-07 Thread Xah Lee
2009-09-07 On Sep 5, 7:41 am, slawekk skoko...@yahoo.com wrote: Theorem provers such as OCaml (HOL, Coq), Mizar does math formalism as a foundation, also function as a generic computer language, but lacks abilities as a computer algebra system or math notation representation. Isabelle's

Re: HTTPS on Twisted

2009-09-07 Thread koranthala
On Sep 6, 7:53 pm, koranthala koranth...@gmail.com wrote: Hi,    For a financial application,  I am creating a python tool which uses HTTPS to transfer the data from client to server. Now, everything works perfectly, since the SSL support comes free with Twisted.    I have one problem though.

Re: Flowcharting in Python?

2009-09-07 Thread Stef Mientki
Justin wrote: Hi guys, Does anyone know of any code or projects around that are written in Python or can be used by Python to write a flowcharting application? I haven't been able to find any, but the closest thing I have come across is FlowchartPython which allows you to code in Python from

Re: HTTPS on Twisted

2009-09-07 Thread exarkun
On 07:20 pm, koranth...@gmail.com wrote: On Sep 6, 7:53�pm, koranthala koranth...@gmail.com wrote: Hi, � �For a financial application, �I am creating a python tool which uses HTTPS to transfer the data from client to server. Now, everything works perfectly, since the SSL support comes free with

Re: Module for Fisher's exact test?

2009-09-07 Thread Mark Dickinson
On Sep 7, 3:50 am, gb345 gb...@invalid.com wrote: Before I roll my own, is there a good Python module for computing the Fisher's exact test stastics on 2 x 2 contingency tables? Not in the standard library, certainly. Have you tried SciPy and RPy? -- Mark --

Re: The future of Python immutability

2009-09-07 Thread Paul Rubin
John Nagle na...@animats.com writes: Right. Tracking mutablity and ownership all the way down without making the language either restrictive or slow is tough. In multi-thread programs, though, somebody has to be clear on who owns what. I'm trying to figure out a way for the

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread Terry Reedy
mma...@gmx.net wrote: Hi Since I have been told in this group to post wxPython related topics in the wxPython-users mailing list instead of here, I just tried doing that. However, I always get an error message back when using gmane. Which is ??? --

Re: Multiple inheritance - How to call method_x in InheritedBaseB from method_x in InheritedBaseA?

2009-09-07 Thread Carl Banks
On Sep 6, 10:48 pm, The Music Guy music...@alphaios.net wrote: Sorry, that last code had a typo in it: #!/usr/bin/python def main():     foox = FooX()     fooy = FooY()     fooz = FooZ()     foox.method_x(I, AM, X)     print     fooy.method_x(ESTOY, Y, !)     print    

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread mmanns
On Mon, 07 Sep 2009 16:06:11 -0400 Terry Reedy tjre...@udel.edu wrote: mma...@gmx.net wrote: Hi Since I have been told in this group to post wxPython related topics in the wxPython-users mailing list instead of here, I just tried doing that. However, I always get an error message

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread mmanns
On Mon, 7 Sep 2009 13:04:39 -0400 Philip Semanchuk phi...@semanchuk.com wrote: Did you subscribe to the mailing list before sending a message to it? I did not subscribe the gmane account when I tried out posting via gmane. I am pretty sure that I already subscribed to the group in the past.

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread mmanns
On Mon, 7 Sep 2009 22:51:47 +0200 mma...@gmx.net wrote: On Mon, 7 Sep 2009 13:04:39 -0400 Philip Semanchuk phi...@semanchuk.com wrote: Did you subscribe to the mailing list before sending a message to it? I did not subscribe the gmane account when I tried out posting via gmane. I

Noddy with submodules?

2009-09-07 Thread Torsten Mohr
Hi, i want to write a Python module that interfaces a DLL that we use in the office to do some measurement. So i'd like to write a python module in C (which i did before some times). But i'm not sure how i can create a module in a way that i can later do: import measurement import

Re: Flowcharting in Python?

2009-09-07 Thread Grant Edwards
On 2009-09-07, Justin justinsavi...@gmail.com wrote: Does anyone know of any code or projects around that are written in Python or can be used by Python to write a flowcharting application? Have you looked at Skencil (nee Sketch)? It's a vector/object-oriented drawing program written in

Scheduling algorithm: Suggestions?

2009-09-07 Thread Allen Fowler
Hello, I have a batch of rpc style calls that I must make to an external server via HTTP in a multi threaded fashion. (Return vales must be saved.) Problem is, I need to throttle the rate at which I do this. Each HTTP call takes between 0.2 and several seconds to complete. I need to

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread Grant Edwards
On 2009-09-07, mma...@gmx.net mma...@gmx.net wrote: However, I always get an error message back when using gmane. Which is ??? I pasted the e-mail that I received upon posting via the gmane interface below. * You may need to join the group before being allowed to post. That probably

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread PythonAB
On 7 sep 2009, at 22:51, mma...@gmx.net wrote: On Mon, 7 Sep 2009 13:04:39 -0400 Philip Semanchuk phi...@semanchuk.com wrote: Did you subscribe to the mailing list before sending a message to it? I did not subscribe the gmane account when I tried out posting via gmane. I am pretty sure

Windows, CreateThread

2009-09-07 Thread Torsten Mohr
Hi, in a python C module i may need to create a Thread to do some background observations / calculations. Are there any problems with Python doing something like this? Is there some special support on sharing data? I guess i can't call any Python functions from the thread, correct? Thanks

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Benjamin Kaplan
On Mon, Sep 7, 2009 at 6:31 PM, Mark Hammondskippy.hamm...@gmail.com wrote: On 7/09/2009 10:50 PM, MRAB wrote: sturlamolden wrote: On 7 Sep, 13:53, ganesh ganeshbo...@gmail.com wrote: I need to use these to get the proper concurrency in my multi-threaded application without any

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Mark Hammond
On 7/09/2009 10:50 PM, MRAB wrote: sturlamolden wrote: On 7 Sep, 13:53, ganesh ganeshbo...@gmail.com wrote: I need to use these to get the proper concurrency in my multi-threaded application without any synchronization mechanisms. Why will multiple interpreters give you better concurrency?

Re: Windows, CreateThread

2009-09-07 Thread Gary Herron
Torsten Mohr wrote: Hi, in a python C module i may need to create a Thread to do some background observations / calculations. Are there any problems with Python doing something like this? Is there some special support on sharing data? I guess i can't call any Python functions from the

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Grant Edwards
On 2009-09-07, Mark Hammond skippy.hamm...@gmail.com wrote: CPython's GIL means that multithreading on multiple processors/cores has limitations. Each interpreter has its own GIL, so processor-intensive applications work better using the multiprocessing module than with the threading module.

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Mark Hammond
On 8/09/2009 9:16 AM, Grant Edwards wrote: On 2009-09-07, Mark Hammondskippy.hamm...@gmail.com wrote: CPython's GIL means that multithreading on multiple processors/cores has limitations. Each interpreter has its own GIL, so processor-intensive applications work better using the

Re: IDE for python similar to visual basic

2009-09-07 Thread Albert van der Horst
In article pan.2009.08.30.21.12.48.985...@nowhere.com, Nobody nob...@nowhere.com wrote: On Sun, 30 Aug 2009 10:48:24 -0700, r wrote: I think a point and click GUI builder (although some may disagree) is actually detrimental to your programming skills. The ability to visualize the GUI only

Re: What python can NOT do?

2009-09-07 Thread Albert van der Horst
In article 0022052b$0$2930$c3e8...@news.astraweb.com, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Fri, 28 Aug 2009 15:37:46 -0700, qwe rty wrote: i know that an interpreted language like python Languages are neither interpreted nor compiled. *Implementations* are interpreted

Re: how to edit .wsgi file extebtions with IDLE on windows

2009-09-07 Thread gert
On Sep 4, 6:07 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Sat, 29 Aug 2009 20:29:43 -0300, gert gert.cuyk...@gmail.com escribió: On Aug 29, 11:16 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Sat, 29 Aug 2009 17:14:14 -0300, gert gert.cuyk...@gmail.com   escribió:

Re: Windows binaries of python in debug mode

2009-09-07 Thread Gabriel Genellina
En Mon, 07 Sep 2009 06:32:29 -0300, Gabriel Rossetti gabriel.rosse...@arimaz.com escribió: I am looking for a version of python 2.5.x compiled for windows in debug mode, but I can't find this, does anyone have a link or have a version that he/she can send me? Short answer: build it

Re: Flowcharting in Python?

2009-09-07 Thread David Boddie
On Tuesday 08 September 2009 00:09, Grant Edwards wrote: Have you looked at Skencil (nee Sketch)? It's a vector/object-oriented drawing program written in Python: http://www.skencil.org/ It's not really optimized for flowcharts or block diagrams (IIRC, it doens't have any concept of

expy 0.1.3 released!

2009-09-07 Thread Yingjie Lan
Hi, This is to announce the release of expy 0.1.3 Now this release support class members/fields besides instance members/fields of extension types. What is expy? -- expy is an expressway to extend Python! For more details on expy: http://expy.sf.net/ Thanks! Yingjie

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread Neil Hodgson
PythonAB: I dont want to register with a google account, is there any way to use a non-gmail account? A Google account does not mean you have to use gmail. The Google account is used to handle your interaction with Google services and can be used in conjunction with arbitrary email

**** Sweet Teen TITS!! BOOBS VIDEOS HI RES PHOTOS !!!

2009-09-07 Thread Kevin Katovic
Download http://centraltits.blogspot.com/2009/09/where-can-beginner-start-investing-and.html Free videos high resolution photos and much more. You know what to do! Free Downloads! -- http://mail.python.org/mailman/listinfo/python-list

Re: **** Sweet Teen TITS!! BOOBS VIDEOS HI RES PHOTOS !!!

2009-09-07 Thread MrBally
On Sep 7, 8:31 pm, Kevin Katovic kevinkatovic.katovic...@gmail.com wrote: Downloadhttp://centraltits.blogspot.com/2009/09/where-can-beginner-start-inve... Free videos high resolution photos and much more.  You know what to do! Free Downloads! Sold! Thanks everyone. --

Import Problem - Please help

2009-09-07 Thread newb.py
I am trying to learn NLP with Python and am getting the following error when trying to do an import statement: import nltk import re from nltk_lite.utilities import re_show Traceback (most recent call last): File stdin, line 1, in module ImportError: No module named nltk_lite.utilities I

Re: Import Problem - Please help

2009-09-07 Thread newb.py
On Sep 7, 5:40 pm, newb.py seanm...@gmail.com wrote: I am trying to learn NLP with Python and am getting the following error when trying to do an import statement: import nltk import re from nltk_lite.utilities import re_show Traceback (most recent call last):   File stdin, line 1, in

unicode + xml

2009-09-07 Thread Laurent Luce
Hello, I am trying to do the following: - read list of folders in a specific directory: os.listdir() - some folders have Japanese characters - post list of folders as xml to a web server: I used content-type 'text/xml' and I use '?xml version=1.0 encoding=utf-8?' to start the xml data. - on

Re: First release of pyfsevents

2009-09-07 Thread Aahz
In article d103be2b-3f1e-46f3-9a03-46f7125f5...@r5g2000yqi.googlegroups.com, Nicolas Dumazet nicd...@gmail.com wrote: On Sep 3, 10:33=A0pm, a...@pythoncraft.com (Aahz) wrote: I'm curious why you went with FSEvents rather than kqueue. My company discovered that FSEvents is rather

Re: possible attribute-oriented class

2009-09-07 Thread Jan Kaliszewski
08-09-2009 o 02:15:10 Steven D'Aprano st...@pearwood.info wrote: On Mon, 7 Sep 2009 09:37:35 am Jan Kaliszewski wrote: 06-09-2009 o 20:20:21 Ethan Furman et...@stoneleaf.us wrote: ... I love being able to type current_record.full_name == last_record.full_name instead of

Re: IDE for python similar to visual basic

2009-09-07 Thread r
On Sep 7, 6:56 pm, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: In article pan.2009.08.30.21.12.48.985...@nowhere.com, Nobody  nob...@nowhere.com wrote: On Sun, 30 Aug 2009 10:48:24 -0700, r wrote: I think a point and click GUI builder (although some may disagree) is actually

SPAM

2009-09-07 Thread TBK
On Sep 7, 5:37 pm, MrBally americannleag...@hotmail.com wrote: On Sep 7, 8:31 pm, Kevin Katovic kevinkatovic.katovic...@gmail.com wrote: Downloadhttp://centraltits.blogspot.com/2009/09/where-can-beginner-start-inve... Free videos high resolution photos and much more.  You know what to do!

Re: SPAM

2009-09-07 Thread URneedless
In article b073f805-f8ce-49b3-b2d4-3d29bd97a...@j4g2000yqa.googlegroups.com, TBK says... On Sep 7, 5:37=A0pm, MrBally americannleag...@hotmail.com wrote: On Sep 7, 8:31=A0pm, Kevin Katovic kevinkatovic.katovic...@gmail.com wrote:

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Grant Edwards
On 2009-09-07, Mark Hammond skippy.hamm...@gmail.com wrote: Sorry, my mistake, I misread the original - using multiple Python processes does indeed have a GIL per process. I was referring to the 'multiple interpreters in one process' feature of Python which is largely deprecated, but if

Re: Import Problem - Please help

2009-09-07 Thread Ned Deily
In article 8119a298-4660-4680-b460-0924c9baa...@e4g2000prn.googlegroups.com, newb.py seanm...@gmail.com wrote: On Sep 7, 5:40 pm, newb.py seanm...@gmail.com wrote: I am trying to learn NLP with Python and am getting the following error when trying to do an import statement: import nltk

Re: possible attribute-oriented class

2009-09-07 Thread Ken Newton
On Mon, Sep 7, 2009 at 6:02 PM, Jan Kaliszewskiz...@chopin.edu.pl wrote: ... I think it depends how often people need to implement such boiler-plate code for themselves. Now I see that this thread is not very popular, so indeed maybe you are right... Though it'd be nice to have OOTB such a

Re: Query screen resolution?

2009-09-07 Thread Warpcat
If it's a GUI app, you ask the GUI toolkit which you're using. Heh, I suppose you're right :) -- http://mail.python.org/mailman/listinfo/python-list

Re: First release of pyfsevents

2009-09-07 Thread exarkun
On 12:57 am, a...@pythoncraft.com wrote: In article d103be2b-3f1e- 46f3-9a03-46f7125f5...@r5g2000yqi.googlegroups.com, Nicolas Dumazet nicd...@gmail.com wrote: On Sep 3, 10:33=A0pm, a...@pythoncraft.com (Aahz) wrote: I'm curious why you went with FSEvents rather than kqueue. My company

  1   2   >