Checking for binary data in a string

2009-06-19 Thread Mitko Haralanov
I have a question about finding out whether a string contains binary data? In my application, I am reading from a file which could contain binary data. After I have read the data, I transfer it using xmlrpclib. However, xmlrpclib has trouble unpacking XML which contains binary data and my applica

Re: Convert hash to struct

2009-06-19 Thread Lie Ryan
Amita Ekbote wrote: > Hello, > > I am retrieving values from a database in the form of a dictionary so > I can access the values as d['column'] and I was wondering if there is > a way to convert the hash to a struct like format so i can just say > d.column. Makes it easier to read and understand.

Re: Convert hash to struct

2009-06-19 Thread Amita Ekbote
I wanted to make a more generic way of doing this so that even if the columns are modified or new ones are added it should be simple. Anyway I will reconsider this sort of am implementation. Just out of curiosity is there any other way of achieving this? Thanks Amita On Fri, Jun 19, 2009 at 1:52

Re: Rich comparison methods don't work in sets?

2009-06-19 Thread Aaron Brady
On Jun 19, 12:42 pm, Chris Rebert wrote: > On Fri, Jun 19, 2009 at 12:02 PM, Gustavo Narea wrote: > > Hello, everyone. > > > I've noticed that if I have a class with so-called "rich comparison" > > methods > > (__eq__, __ne__, etc.), when its instances are included in a set, > > set.__contains__/_

Re: Checking for binary data in a string

2009-06-19 Thread Grant Edwards
On 2009-06-19, Mitko Haralanov wrote: > I have a question about finding out whether a string contains > binary data? All strings contain binary data. Unless you've invented ternary logic and built a computer with it. ;) > If I read in a string containing some binary data from the file, the > t

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jure Erznožnik
Thanks guys, for all the replies. They were some very interesting reading / watching. Seems to me, the Unladen-Swallow might in time produce code which will have this problem lessened a bit. Their roadmap suggests at least modifying the GIL principles if not fully removing it. On top of this, they

Re: Checking for binary data in a string

2009-06-19 Thread Dave Angel
Mitko Haralanov wrote: I have a question about finding out whether a string contains binary data? In my application, I am reading from a file which could contain binary data. After I have read the data, I transfer it using xmlrpclib. However, xmlrpclib has trouble unpacking XML which contains b

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread OdarR
On 19 juin, 21:05, Christian Heimes wrote: > I've seen a single Python process using the full capacity of up to 8 > CPUs. The application is making heavy use of lxml for large XSL > transformations, a database adapter and my own image processing library > based upon FreeImage. interesting... > O

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jure Erznožnik
Sorry, just a few more thoughts: Does anybody know why GIL can't be made more atomic? I mean, use different locks for different parts of code? This way there would be way less blocking and the plugin interface could remain the same (the interpreter would know what lock it used for the plugin, so t

Re: Convert hash to struct

2009-06-19 Thread Dave Angel
Amita Ekbote wrote: I wanted to make a more generic way of doing this so that even if the columns are modified or new ones are added it should be simple. Anyway I will reconsider this sort of am implementation. Just out of curiosity is there any other way of achieving this? Thanks Amita On Fri,

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread OdarR
On 19 juin, 21:41, Carl Banks wrote: > He's saying that if your code involves extensions written in C that > release the GIL, the C thread can run on a different core than the > Python-thread at the same time.  The GIL is only required for Python > code, and C code that uses the Python API.  C cod

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jesse Noller
On Fri, Jun 19, 2009 at 12:50 PM, OdarR wrote: > On 19 juin, 16:16, Martin von Loewis > If you know that your (C) code is thread safe on its own, you can >> release the GIL around long-running algorithms, thus using as many >> CPUs as you have available, in a single process. > > what do you mean ?

Re: Convert hash to struct

2009-06-19 Thread Jason
Here's my general-purpose solution for doing this: class Dict2Class(object): """ Update like a dictionary, but expose the keys as class properties. Sweet! You can instantiate and update this practically any way you choose, and the values are available as class properties. >>> c

File Syncing

2009-06-19 Thread dads
I've created a small application that when you click one of the buttons it randomly picks a paragraphs from a list that it generates from a text file and then copies them to the clipboard. It also has make new/edit/delete/print/ etc functionality. It's for work so I get some brownie points and eve

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jure Erznožnik
On Jun 19, 11:45 pm, OdarR wrote: > On 19 juin, 21:05, Christian Heimes wrote: > > > I've seen a single Python process using the full capacity of up to 8 > > CPUs. The application is making heavy use of lxml for large XSL > > transformations, a database adapter and my own image processing library

Re: Please advise me for a right solution

2009-06-19 Thread Aahz
In article <15b1e25c-2bb4-425e-974f-be3d686b5...@p21g2000prn.googlegroups.com>, VP wrote: > >I need to create a web based inventory tool with specific requirements >such as: > >* More then one group is going to use it. >* Authentication and authorization system based on user and group >privileges

Re: Exceptions and Object Destruction (was: Problem with apsw and garbage collection)

2009-06-19 Thread Aahz
In article , Steven D'Aprano wrote: > >Additionally, while I'm a fan of the simplicity of CPython's ref counter, >one serious side effect of it is that it requires the GIL, which >essentially means CPython is crippled on multi-core CPUs compared to non- >ref counting implementations. Your bare

Looking for top web engineers

2009-06-19 Thread Marta Daglow
Hi, One of my clients is looking for three top web developers (engineers) to build a new video platform from scratch. Wouldn't it be nice to build this system without having to work with legacy code or systems? They are part of a major organization and have deep funding. We're looking for so

os.read in non blocking mode of os.open : resource busy error

2009-06-19 Thread kshama nagaraj
Dear all, I am using os.open to open a tun/tap device and then read data from it. I also need to do some other tasks apart from reading from this device. So i wish to have the read non blocking. I am opening the device in non-block mode using os.O_NONBLOCK . But, if i do this, i get an error when

IDLE comments

2009-06-19 Thread Jason Gervich
Why does IDLE use two hash marks for comments (##)? Most other editors (Geany, SPE) use a single hash mark (#) to designate comments. How does one change IDLE to use just a single (#) hash mark for comments? Thanks, Jason Gervich Santa Cruz, CA -- http://mail.python.org/mailman/listinfo/python-

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jure Erznožnik
On Jun 19, 11:59 pm, Jesse Noller wrote: > On Fri, Jun 19, 2009 at 12:50 PM, OdarR wrote: > > On 19 juin, 16:16, Martin von Loewis >> If you know that your (C) code is thread safe on its own, you can > >> release the GIL around long-running algorithms, thus using as many > >> CPUs as you have ava

Re: Input problem

2009-06-19 Thread Prasoon
What is the difference between z=int(raw_input()) and z=eval(raw_input())(I thought them to be the same in case of integers) I mean when an integer is entered in that case are they same and when an integer in not entered,in that case how are they different? -- http://mail.python.org/mai

Re: Funny xmlrpc / linux problem

2009-06-19 Thread Richard Brodie
"Hans Müller" wrote in message news:4a37b18d$0$3283$8e6e7...@newsreader.ewetel.de... > Small addition: > > While tracing the network data I found the server to be the problem, > the answer to a request is beeing delayed by about 180ms - no idea why. Nagle's algorithm: you've unintentionally pro

Python WSDL Support

2009-06-19 Thread Chris
Is there any modern support for WSDL? The only projects I could find are ZSI and SOAPpy, and both have been dead for several years. -- http://mail.python.org/mailman/listinfo/python-list

UDP queue size

2009-06-19 Thread ���m�ۤv...@����
I got a problem about UDP. How do I get the UDP buffer size? When the server had some delay in handling incoming UDP, it will lost some package. I wonder it's because the system buffer size, is there any ways to find the exactly size of the buffer? ex: client.py import socket

Re: Measuring Fractal Dimension ?

2009-06-19 Thread Mark Dickinson
On Jun 17, 12:52 pm, Mark Dickinson wrote: > g_n(t) = nt if 0 <= t <= 1/n else 1 Whoops. Wrong definition. That should be: g_n(t) = nt if 0 <= t <= 1/n else n(2/n-t) if 1/n <= t <= 2/n else 0 Then my claim that g_n(t) -> 0 for all t might actually make sense... -- http://mail.python

Re: Measuring Fractal Dimension ?

2009-06-19 Thread pdpi
On Jun 17, 1:26 pm, Jaime Fernandez del Rio wrote: > P.S. The snowflake curve, on the other hand, is uniformly continuous, right? The definition of uniform continuity is that, for any epsilon > 0, there is a delta > 0 such that, for any x and y, if x-y < delta, f(x)-f (y) < epsilon. Given that K

Re: Measuring Fractal Dimension ?

2009-06-19 Thread Paul Rubin
Mark Dickinson writes: > It looks as though you're treating (a portion of?) the Koch curve as > the graph of a function f from R -> R and claiming that f is > uniformly continuous. But the Koch curve isn't such a graph (it > fails the 'vertical line test', I think you treat it as a function f: R

Re: Exotic Logics

2009-06-19 Thread Aaron Brady
On Jun 17, 10:32 am, Aaron Brady wrote: > On Jun 17, 10:23 am, Mensanator wrote: snip > > > I think high and low /voltages/, though continuous and approximate, > > > might satisfy this. > > > > There are no such things as electrons, > > > I've got a Tesla coil if you'd like to meet some electrons

Re: SHM and Touchpad

2009-06-19 Thread Lie Ryan
Sparky wrote: > > Thank you for your quick response, I will take a look at the link you > provided. Depending on what you're trying to do, you may be able to use `synclient` with subprocess. -- http://mail.python.org/mailman/listinfo/python-list

Re: etree, lxml unexpected behaviour

2009-06-19 Thread Emanuele D'Arrigo
Thank you for the clarification Stefan, I understand. -- http://mail.python.org/mailman/listinfo/python-list

Re: Regarding Python is scripting language or not

2009-06-19 Thread Alan G Isaac
On 6/17/2009 8:38 AM Jean-Michel Pichavant apparently wrote: > I'm pretty sure you'll be able to find OOP scripting > language. http://www.amazon.com/Scripting-Objects-Comparative-Presentation-Object-Oriented/dp/047039725X/ref=sr_1_1?ie=UTF8&s=books&qid=1245276357&sr=1-1> fwiw, Alan Isaac -- h

Re: Good books in computer science?

2009-06-19 Thread Bearophile
Nathan Stoddard: > The best way to become a good programmer is to program. Write a lot of > code; work on some large projects. This will improve your skill more than > anything else. It's also important to learn new languages regularly. I > recommend to learn C, Python, and Lisp first. To become v

Re: RE: Good books in computer science?

2009-06-19 Thread Bob Martin
in 117815 20090617 221804 Phil Runciman wrote: >Because it reminds me of when things went badly wrong. IBM360, Von Neumann = >architecture, no hardware stacks ... > >IMHO Burroughs and ICL had better approaches to OS design back then but had= >less resources to develop their ideas.=20 > >However,

Re: Good books in computer science?

2009-06-19 Thread Asun Friere
On Jun 15, 1:00 am, rustom wrote: > > For every one Horowitz there are a thousand wannbes thumping on the > piano trying to become Horowitz. > The traction that practice gives is maximal only in the beginning. Funny but I was watching an interview/conversation between and older composer and a you

Re: String to unicode - duplicating by function the effect of u prefix

2009-06-19 Thread CiTro
Thank you, Peter. That solved my problem. -- http://mail.python.org/mailman/listinfo/python-list

Re: String to unicode - duplicating by function the effect of u prefix

2009-06-19 Thread Vincent
On Jun 18, 3:23 pm, CiTro wrote: > Thank you, Peter. That solved my problem. the another way is, codecs.raw_unicode_escape_decode(stringOne) == stringTwo -- http://mail.python.org/mailman/listinfo/python-list

Once again, comparison wxpython with PyQt

2009-06-19 Thread Hans Müller
Here we have to select between wxPython and PyQt for a medium size project. In this project several hundred dialogs are to be created. This work will be done by a program generator which has to re-written. The question now is which framework should we use. As far as I could found is PyQt with th

Re: Once again, comparison wxpython with PyQt

2009-06-19 Thread Diez B. Roggisch
Hans Müller wrote: > Here we have to select between wxPython and PyQt for a medium size > project. In this project several hundred dialogs are to be created. This > work will be done by a program generator which has to re-written. > > The question now is which framework should we use. > As far as

Re: Once again, comparison wxpython with PyQt

2009-06-19 Thread pdpi
On Jun 18, 3:49 pm, "Diez B. Roggisch" wrote: > Hans Müller wrote: > > Here we have to select between wxPython and PyQt for a medium size > > project. In this project several hundred dialogs are to be created. This > > work will be done by a program generator which has to re-written. > > > The que

Re: Once again, comparison wxpython with PyQt

2009-06-19 Thread Hilmar Bunjes
Diez B. Roggisch schrieb: Here we have to select between wxPython and PyQt for a medium size project. In this project several hundred dialogs are to be created. This work will be done by a program generator which has to re-written. The question now is which framework should we use. As far as I

Re: Measuring Fractal Dimension ?

2009-06-19 Thread David C . Ullrich
On Wed, 17 Jun 2009 05:46:22 -0700 (PDT), Mark Dickinson wrote: >On Jun 17, 1:26 pm, Jaime Fernandez del Rio >wrote: >> On Wed, Jun 17, 2009 at 1:52 PM, Mark Dickinson wrote: >> > Maybe James is thinking of the standard theorem >> > that says that if a sequence of continuous functions >> > on an

Re: generator expression works in shell, NameError in script

2009-06-19 Thread ryles
> Does the generator expression have its own little namespace or so ? Yes, generators create a new scope: http://docs.python.org/reference/expressions.html#grammar-token-generator_expression -- http://mail.python.org/mailman/listinfo/python-list

How to check if file is open on Windows XP?

2009-06-19 Thread Dudeja, Rajat
Hi, I'm looking for a fascility that can check if the file is open on Windows XP and if the file is open (say a notepad file is open), I want to close that file (i.e the notepad application) I found that there are no such methods available in OS modules. Is using Win32 API is the only solutio

lib to do advanced geometry calculation?

2009-06-19 Thread oyster
My problem is some complex, because some condition is not supplied as a given value please have a look at http://www.lusiya.com/bbs/attachment/thumb/Mon_0906/80_3201_d2fa7bd75d28675.jpg because I have to do futher calculation based on previous steps as http://www.lusiya.com/bbs/attachment/thumb/Mon

Re: Once again, comparison wxpython with PyQt

2009-06-19 Thread Hans Müller
Thanks for all your informative replies. If I understand you right, for a commercial, closed source program I only need a commercial PyQt license for ~ 500€ ? As far as I know I also need a Qt Licenses which is ~3500€ per OS. What is right ? Thanks a lot, Hans -- http://mail.python.org/mail

Re: persistent composites

2009-06-19 Thread Aaron Brady
On Jun 19, 7:45 am, a...@pythoncraft.com (Aahz) wrote: > In article > , > Aaron Brady   wrote: > > > > >You are not being any help, Rhodri, in your question.   > > Maybe not, but honestly, you're getting pretty close to going back in my > killfile.  Although you're no longer trolling this group, I

Re: Once again, comparison wxpython with PyQt

2009-06-19 Thread Hilmar Bunjes
Hans Müller schrieb: Thanks for all your informative replies. If I understand you right, for a commercial, closed source program I only need a commercial PyQt license for ~ 500€ ? As far as I know I also need a Qt Licenses which is ~3500€ per OS. What is right ? Qt is under the LGPL licens

Re: pyserial question

2009-06-19 Thread Grant Edwards
On 2009-06-19, Dennis Lee Bieber wrote: > On Thu, 18 Jun 2009 14:24:42 +0300, Piter_ declaimed >> I cant find out how to set "Handshaking RST on TX" in pyserial. > > Never encountered "RST" mode... "RTS" mode is common. > >>From the source -- a port can be initialized with: [nothing relev

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Paul Boddie
On 19 Jun, 21:41, Carl Banks wrote: > > (Note: I'm not talking about releasing the GIL for I/O operations, > it's not the same thing.  I'm talking about the ability to run > computations on multiple cores at the same time, not to block in 50 > threads at the same time.  Multiple cores aren't going

Re: Checking for binary data in a string

2009-06-19 Thread Lie Ryan
Grant Edwards wrote: > On 2009-06-19, Mitko Haralanov wrote: > >> I have a question about finding out whether a string contains >> binary data? > > All strings contain binary data. Not quite, (python 2.x's) strings are binary data. It just happens that it behaves like text when you appropria

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jesse Noller
On Fri, Jun 19, 2009 at 6:10 PM, Jure Erznožnik wrote: > On Jun 19, 11:59 pm, Jesse Noller wrote: >> On Fri, Jun 19, 2009 at 12:50 PM, OdarR wrote: >> > On 19 juin, 16:16, Martin von Loewis > >> If you know that your (C) code is thread safe on its own, you can >> >> release the GIL around long-run

Re: sqlite3, OperationalError: no such column, shouldn't that ne a ProgrammingError?

2009-06-19 Thread Gerhard Häring
John Machin wrote: > Hi Gerhard, > [...] > In http://www.sqlite.org/c3ref/prepare.html it says """When an error > occurs, sqlite3_step() will return one of the detailed error codes or > extended error codes. The legacy behavior was that sqlite3_step() > would only return a generic SQLITE_ERROR resu

Play MP3s from Windows

2009-06-19 Thread Arlie
Hi, Newbie here. I copied and pasted the code below. But when I ran it I got this error: D:\>python mp3.py Duree du fichier : 298919 millisecondes Traceback (most recent call last): File "mp3.py", line 37, in time.sleep(int(buf)/1000) ValueError: invalid literal for int() with base 10: '

Re: Play MP3s from Windows

2009-06-19 Thread Arlie
On Jun 20, 7:16 am, Arlie wrote: > Hi, > > Newbie here. I copied and pasted the code below. But when I ran it I > got this error: > > D:\>python mp3.py > Duree du fichier :  298919  millisecondes > Traceback (most recent call last): >   File "mp3.py", line 37, in >     time.sleep(int(buf)/1000) >

Re: Play MP3s from Windows

2009-06-19 Thread Tim Harig
On 2009-06-19, Arlie wrote: > Hi, > > Newbie here. I copied and pasted the code below. But when I ran it I > got this error: > > D:\>python mp3.py > Duree du fichier : 298919 millisecondes > Traceback (most recent call last): > File "mp3.py", line 37, in > time.sleep(int(buf)/1000) > Valu

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Aahz
In article , =?windows-1252?Q?Jure_Erzno=9Enik?= wrote: > >I do aggree though that threading is important. Regardless of any >studies showing that threads suck, they are here and they offer >relatively simple concurrency. IMHO they should never have been >crippled like this. Even though GIL solve

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Aahz
In article <157e0345-74e0-4144-a2e6-2b4cc854c...@z7g2000vbh.googlegroups.com>, Carl Banks wrote: > >I wish Pythonistas would be more willing to acknowledge the (few) >drawbacks of the language (or implementation, in this case) instead of >all this rationalization. Please provide more evidence

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Aahz
In article , =?windows-1252?Q?Jure_Erzno=9Enik?= wrote: >On Jun 19, 11:59=A0pm, Jesse Noller wrote: >> >> Sorry, you're incorrect. I/O Bound threads do in fact, take advantage >> of multiple cores. > >Incorrect. They take advantage of OS threading support where another >thread can run while one

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Christian Heimes
OdarR schrieb: > On 19 juin, 21:41, Carl Banks wrote: >> He's saying that if your code involves extensions written in C that >> release the GIL, the C thread can run on a different core than the >> Python-thread at the same time. The GIL is only required for Python >> code, and C code that uses t

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jure Erznožnik
On Jun 20, 1:36 am, a...@pythoncraft.com (Aahz) wrote: > > You should put up or shut up -- I've certainly seen multi-core speedup > with threaded software, so show us your benchmarks! > -- Sorry, no intent to offend anyone here. Flame wars are not my thing. I have shown my benchmarks. See first p

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Christian Heimes
Aahz wrote: > In article <157e0345-74e0-4144-a2e6-2b4cc854c...@z7g2000vbh.googlegroups.com>, > Carl Banks wrote: >> I wish Pythonistas would be more willing to acknowledge the (few) >> drawbacks of the language (or implementation, in this case) instead of >> all this rationalization. > > Pleas

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Ross Ridge
Jesse Noller wrote: > Sorry, you're incorrect. I/O Bound threads do in fact, take advantage > of multiple cores. wrote: >Incorrect. They take advantage of OS threading support where another >thread can run while one is blocked for I/O. That is not equal to >running on multiple cores (though it

Re: Checking for binary data in a string

2009-06-19 Thread Emile van Sebille
On 6/19/2009 1:18 PM Mitko Haralanov said... I have a question about finding out whether a string contains binary data? The only other check that I can think of is to check every character in the read-in string against string.printable but that will take a long time. Well, probably not rea

Re: Play MP3s from Windows

2009-06-19 Thread Tim Harig
On 2009-06-19, Arlie wrote: > print 'Duree du fichier : ',buf,' millisecondes' You can obviously make sure that 'buf' can be accessed as a string. > time.sleep(int(buf)/1000) The error seems to be having issues converting buf to an int. Could you possibly convert it to a string before converti

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Lie Ryan
Jure Erznožnik wrote: > On Jun 20, 1:36 am, a...@pythoncraft.com (Aahz) wrote: >> You should put up or shut up -- I've certainly seen multi-core speedup >> with threaded software, so show us your benchmarks! >> -- > > Sorry, no intent to offend anyone here. Flame wars are not my thing. > > I have

Re: Play MP3s from Windows

2009-06-19 Thread MRAB
Arlie wrote: Hi, Newbie here. I copied and pasted the code below. But when I ran it I got this error: D:\>python mp3.py Duree du fichier : 298919 millisecondes Traceback (most recent call last): File "mp3.py", line 37, in time.sleep(int(buf)/1000) ValueError: invalid literal for int()

What is the best method to match a pattern in set of lines

2009-06-19 Thread Terminator
Hello, My requierment is to get the "Stick Tag" value from the below o/p and based on tag take different actions. What is the best way to implement it. I am new to Python, so appreciate any input. Command o/p: === File: Packet.tcl

Re: Play MP3s from Windows

2009-06-19 Thread Arlie
On Jun 20, 8:07 am, Tim Harig wrote: > On 2009-06-19, Arlie wrote: > > > print 'Duree du fichier : ',buf,' millisecondes' > > You can obviously make sure that 'buf' can be accessed as a string. > > > time.sleep(int(buf)/1000) > > The error seems to be having issues converting buf to an int.  Coul

Re: Play MP3s from Windows

2009-06-19 Thread Arlie
On Jun 20, 8:48 am, MRAB wrote: > Arlie wrote: > > Hi, > > > Newbie here. I copied and pasted the code below. But when I ran it I > > got this error: > > > D:\>python mp3.py > > Duree du fichier :  298919  millisecondes > > Traceback (most recent call last): > >   File "mp3.py", line 37, in > >  

Re: Blogger Widget web app

2009-06-19 Thread Gabriel Genellina
En Thu, 11 Jun 2009 16:44:03 -0300, steven.oldner escribió: Please give me directions on where to start researching for answers. I probably can do the javascript, but I don't know where to start on the Python. 1. Wife has a blogger blog and wants a widget to embed in the posts. 2. Widget wil

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jean-Paul Calderone
On Sat, 20 Jun 2009 00:07:27 GMT, Lie Ryan wrote: [snip] Perhaps we should have more built-in/stdlib operations that can release GIL safely to release GIL by default? And perhaps some builtin/stdlib should receive an optional argument that instruct them to release GIL and by passing this argume

Re: Error in reg dll

2009-06-19 Thread Gabriel Genellina
En Tue, 16 Jun 2009 02:09:57 -0300, Girish escribió: I am not able to register DLL generated from py2exe When I try to register the dll using the commant: regsve32 dspace.dll, I am getting error saying :"DLLRegisterServer in dspace.dll failed. Return code was: 0xc005" I don't think the pr

Re: Getting a processes' name?

2009-06-19 Thread Gabriel Genellina
En Tue, 16 Jun 2009 11:42:08 -0300, Daniel Merboth (RIT Student) escribió: My college uses a program called AccessGrid for video conferencing, and it runs through pythonw.exe. It comes with a python script to kill all processes and exit the program. The problem is, the script kills every

Re: IDLE comments

2009-06-19 Thread Chris Rebert
On Wed, Jun 17, 2009 at 11:23 PM, Jason Gervich wrote: > Why does IDLE use two hash marks for comments (##)? Most other editors > (Geany, SPE) use a single hash mark (#) to designate comments. I would guess to distinguish its (usually block) comments from manually-added (usually explanatory) comme

Re: generator expression works in shell, NameError in script

2009-06-19 Thread greg
ryles wrote: However, in 3.0 list comprehensions are actually treated as list(). That's not quite true -- it would be rather inefficient if it was. The code generated for the LC is much the same as it was in 2.x. But the whole LC is put into a nested function so that the loop variables are loca

Re: KeyboardInterrupt eats my error and then won't be caught

2009-06-19 Thread greg
Philip Semanchuk wrote: try: sem.acquire() # User hits Ctrl + C while this is waiting except: print "* I caught it!" Instead a KeyboardInterrupt error is propagated up to the interpreter and the process is killed as if the try/except wasn't there at all. Not sure exactly wh

Re: Is this pylint error message valid or silly?

2009-06-19 Thread Aahz
In article <87eitg267e@benfinney.id.au>, Ben Finney wrote: >Matthew Wilson writes: >> >> from datetime import datetime >> def f(c="today"): >> if c == "today": >> c = datetime.today() >> return c.date() > >* You're re-binding the parameter name ‘

Missing c.l.py posts (was Re: A question on scope...)

2009-06-19 Thread Aahz
In article <4a3b5dc3$0$2985$426a7...@news.free.fr>, Bruno Desthuilliers wrote: > >NB : answering the OP (original post didn't show up on c.l.py ???) Correct. There's a problem with the mail->news gateway, I think that MIME messages are failing. I "fixed" the problem for c.l.py.announce by maki

calculating a self.value, self.randomnum = normalvariate(x, y)

2009-06-19 Thread Vincent Davis
I currently have something like this. class applicant(): def __int__(self, x, y): self.randomnum = normalvariate(x, y) then other stuff x, y are only used to calculate self.randomnum and this seems to work. But I want self.randomnum to be 0 <= randomnum <= 100. The only way I can th

Re: IDLE comments

2009-06-19 Thread Jason Gervich
Thanks, Chris. The best (and only) explanation I've heard so far. AS for as editing the source code, that's beyond my gnubyness. I thought there might be an easily accessible configuration file, but for the time I'll use it as is. I do wonder why in all these forum discussions about which Python

<    1   2