Re: Python parser problem

2012-12-13 Thread Chris Angelico
On Fri, Dec 14, 2012 at 6:30 PM, Paul Rudin wrote: > Chris Angelico writes: > >> On Fri, Dec 14, 2012 at 6:12 AM, RCU wrote: >>> Dave, >>> Thanks for the reply. >>> The script was originally edited on Windows with proper \r\n endings, >> >> It's worth noting that many Windows-based edi

Re: What are the minimum requirements to get a job in?

2012-12-13 Thread rusi
On Dec 14, 11:56 am, Devin Jeanpierre wrote: > On Fri, Dec 14, 2012 at 1:13 AM, rusi wrote: > > On Dec 14, 8:33 am, Dave Angel wrote: > >> Do you know any one computer language thoroughly?  Or just a little of > >> many languages? > > > There is a quote by Bruce Lee to the effect: > > I am not a

Re: Python parser problem

2012-12-13 Thread Paul Rudin
Chris Angelico writes: > On Fri, Dec 14, 2012 at 6:12 AM, RCU wrote: >> Dave, >> Thanks for the reply. >> The script was originally edited on Windows with proper \r\n endings, > > It's worth noting that many Windows-based editors and interpreters are > quite happy with \n line endings.

Re: Running a python script under Linux

2012-12-13 Thread Andrew Robinson
On 12/13/2012 06:45 PM, Steven D'Aprano wrote: What am I doing wrong? By the way, I didn't include command line parameters as part of the function definition, so you might want to add them to insure it acts like a generic alias. Also, (alternately), you could define a generic python shell

Re: Running a python script under Linux

2012-12-13 Thread Jussi Piitulainen
Steven D'Aprano writes: > I have a Centos system which uses Python 2.4 as the system Python, so I > set an alias for my personal use: > > [steve@ando ~]$ which python > alias python='python2.7' > /usr/local/bin/python2.7 > > > When I call "python some_script.py" from the command line,

Re: Running a python script under Linux

2012-12-13 Thread Andrew Robinson
On 12/13/2012 06:45 PM, Steven D'Aprano wrote: I understand this is not exactly a Python question, but it may be of interest to other Python programmers, so I'm asking it here instead of a more generic Linux group. I have a Centos system which uses Python 2.4 as the system Python, so I set an al

Re: What are the minimum requirements to get a job in?

2012-12-13 Thread Devin Jeanpierre
On Fri, Dec 14, 2012 at 1:13 AM, rusi wrote: > On Dec 14, 8:33 am, Dave Angel wrote: >> Do you know any one computer language thoroughly? Or just a little of >> many languages? > > There is a quote by Bruce Lee to the effect: > I am not afraid of the man who knows 10,000 kicks > I am afraid of t

Re: What are the minimum requirements to get a job in?

2012-12-13 Thread rusi
On Dec 14, 8:33 am, Dave Angel wrote: > Do you know any one computer language thoroughly?  Or just a little of > many languages? There is a quote by Bruce Lee to the effect: I am not afraid of the man who knows 10,000 kicks I am afraid of the man who has practised 1 kick 10,000 times -- http://m

Re: MySQLdb compare lower

2012-12-13 Thread Frank Millman
On 14/12/2012 06:16, Chris Angelico wrote: Yeah, it's one of the things that tripped me up when I did a MySQL->PostgreSQL conversion earlier this year. The code was assuming case insensitivity, and began failing on PG. Fortunately the simple change of LIKE to ILIKE solved that. I'd MUCH rather

Re: Python parsing Bluetooth RFCOMM for 9 bytes

2012-12-13 Thread Barry Dick
> Is the following more like how you want it? > > > > data = "" > > try: > > while True: > > try: > > more = client_socket.recv(9) > > except bluetooth.BluetoothError, b: > > print "Bluetooth Error: ", b > > else: > >

Re: Running a python script under Linux

2012-12-13 Thread Cameron Simpson
On 14Dec2012 02:45, Steven D'Aprano wrote: | I understand this is not exactly a Python question, but it may be of | interest to other Python programmers, so I'm asking it here instead of a | more generic Linux group. | | I have a Centos system which uses Python 2.4 as the system Python, so I

Running a python script under Linux

2012-12-13 Thread Steven D'Aprano
I understand this is not exactly a Python question, but it may be of interest to other Python programmers, so I'm asking it here instead of a more generic Linux group. I have a Centos system which uses Python 2.4 as the system Python, so I set an alias for my personal use: [steve@ando ~]$ whic

Re: OOP noob question: Mixin properties

2012-12-13 Thread Steven D'Aprano
On Thu, 13 Dec 2012 16:20:51 -0800, Micky Hulse wrote: > Learning things here... > > In my mixin class (a version I wrote for Django) I had this (indentation > removed for better list readability): Indentation is important. Please don't remove it. I've added it back in below: > class JSONRespo

Re: MySQLdb compare lower

2012-12-13 Thread Chris Angelico
On Fri, Dec 14, 2012 at 2:35 PM, Cameron Simpson wrote: > On 13Dec2012 18:39, Dennis Lee Bieber wrote: > | On Thu, 13 Dec 2012 18:00:48 +1100, Cameron Simpson > | declaimed the following in gmane.comp.python.general: > | > On 12Dec2012 02:03, Dennis Lee Bieber wrote: > | > | According to the

What are the minimum requirements to get a job in?

2012-12-13 Thread michaelsafyan
Hi, Suresh. I don't know about the hiring practices at Cisco or Facebook, but at Google, the particular language or technology matters far less in an interview than general coding ability, algorithmic understanding, and system design fundamentals. To be sure, Python is an awesome language to lea

Re: What are the minimum requirements to get a job in?

2012-12-13 Thread Dave Angel
On 12/13/2012 10:33 PM, Dave Angel wrote: > On 12/13/2012 09:49 PM, suresh.pinn...@gmail.com wrote: >> My aim is to get a job into google or cisco or facebok. >> I have basic knowledge in python,c,java and good in javascript,html,css, >> database concepts. >> If i learn django and python. Shall I

Re: MySQLdb compare lower

2012-12-13 Thread Cameron Simpson
On 13Dec2012 18:39, Dennis Lee Bieber wrote: | On Thu, 13 Dec 2012 18:00:48 +1100, Cameron Simpson | declaimed the following in gmane.comp.python.general: | > On 12Dec2012 02:03, Dennis Lee Bieber wrote: | > | According to the old "MySQL Language Reference" | > | """ | > | By default, string

Re: What are the minimum requirements to get a job in?

2012-12-13 Thread Dave Angel
On 12/13/2012 09:49 PM, suresh.pinn...@gmail.com wrote: > My aim is to get a job into google or cisco or facebok. > I have basic knowledge in python,c,java and good in javascript,html,css, > database concepts. > If i learn django and python. Shall I get my dream job? > > Please suggest me You did

Re: What are the minimum requirements to get a job in?

2012-12-13 Thread Greg Donald
On Thu, Dec 13, 2012 at 8:49 PM, wrote: > My aim is to get a job into google or cisco or facebok. I made it to the 4th interview with Google. When they say they want a "developer" they really mean they want a developer/sysadmin/kernel hacker/c/c++ guru. I nailed all the Python questions in int

RE: What are the minimum requirements to get a job in?

2012-12-13 Thread Graham Fielding
> Date: Thu, 13 Dec 2012 18:49:32 -0800 > Subject: What are the minimum requirements to get a job in? > From: suresh.pinn...@gmail.com > To: python-list@python.org > > My aim is to get a job into google or cisco or facebok. > I have basic knowledge in python,c,java and good in javascript,html,

What are the minimum requirements to get a job in?

2012-12-13 Thread suresh . pinnapa
My aim is to get a job into google or cisco or facebok. I have basic knowledge in python,c,java and good in javascript,html,css, database concepts. If i learn django and python. Shall I get my dream job? Please suggest me -- http://mail.python.org/mailman/listinfo/python-list

Re: Python parsing Bluetooth RFCOMM for 9 bytes

2012-12-13 Thread MRAB
On 2012-12-14 00:00, Barry Dick wrote: My data looks like this when it comes from the device (biofeedback device). There are 9 bytes in total, and I need to buffer so much, and then poll it for new/recent packets. The start packet unfortunately starts with 0x00 So far the only thing I've found

Re: Where to contribute Unicode General Category encoding/decoding

2012-12-13 Thread Steven D'Aprano
On Thu, 13 Dec 2012 07:30:57 -0800, Pander Musubi wrote: > I was expecting PyPI. Here is the code, please advise on where to submit > it: > http://pastebin.com/dbzeasyq If anywhere, either a third-party module, or the unicodedata standard library module. Some unanswered questions: - when wo

Python parsing Bluetooth RFCOMM for 9 bytes

2012-12-13 Thread Barry Dick
My data looks like this when it comes from the device (biofeedback device). There are 9 bytes in total, and I need to buffer so much, and then poll it for new/recent packets. The start packet unfortunately starts with 0x00 So far the only thing I've found that looks like what I want to do is thi

Re: Python version and svn

2012-12-13 Thread Ned Deily
In article , Terry Reedy wrote: > On 12/13/2012 4:41 PM, Aung Thet Naing wrote: > > I'm wondering how I can match the svn versions in bug.python.org to > > Python version (2.7.3) etc? When I downloaded Python source from > > http://www.python.org/download/, I cannot really see the svn > > version

testing

2012-12-13 Thread Steven D'Aprano
Testing testing 1 2 3 4. I've sent at two posts that appear to have been eaten by the Great Usenet Monster. Will this fare any better? Time to find out. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: unpacking first few items of iterable

2012-12-13 Thread Peter Otten
Terry Reedy wrote: > On 12/13/2012 3:09 PM, MRAB wrote: >> On 2012-12-13 19:37, Daniel Fetchinson wrote: >>> Hi folks, I swear I used to know this but can't find it anywhere: >>> >>> What's the standard idiom for unpacking the first few items of an >>> iterable whose total length is unknown? > >

Re: Python version and svn

2012-12-13 Thread Terry Reedy
On 12/13/2012 4:41 PM, Aung Thet Naing wrote: I'm wondering how I can match the svn versions in bug.python.org to Python version (2.7.3) etc? When I downloaded Python source from http://www.python.org/download/, I cannot really see the svn version. I do not know what you mean by svn version. In

Python version and svn

2012-12-13 Thread Aung Thet Naing
I'm wondering how I can match the svn versions in bug.python.org to Python version (2.7.3) etc? When I downloaded Python source from http://www.python.org/download/, I cannot really see the svn version. Thanks Aung. -- http://mail.python.org/mailman/listinfo/python-list

Re: Stack_overflow error

2012-12-13 Thread Aung Thet Naing
I'm sorry that I have been away from this issue for a while. Yes, I'm working on windows. I need to review the error again so that I could rephrase my issue clearly. Thanks. Aung. On Tuesday, November 20, 2012 10:40:42 AM UTC-8, Dieter Maurer wrote: > Aung Thet Naing writes: > > > > > I

Re: unpacking first few items of iterable

2012-12-13 Thread Terry Reedy
On 12/13/2012 3:09 PM, MRAB wrote: On 2012-12-13 19:37, Daniel Fetchinson wrote: Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for unpacking the first few items of an iterable whose total length is unknown? An hinted by some of the answers, this i

Re: Preventing tread collisions

2012-12-13 Thread Andrew Robinson
On 12/12/2012 12:29 PM, Dave Angel wrote: On 12/12/2012 03:11 PM, Wanderer wrote: I have a program that has a main GUI and a camera. In the main GUI, you can manipulate the images taken by the camera. You can also use the menu to check the camera's settings. Images are taken by the camera in a s

Re: Python parser problem

2012-12-13 Thread Chris Angelico
On Fri, Dec 14, 2012 at 6:12 AM, RCU wrote: > Dave, > Thanks for the reply. > The script was originally edited on Windows with proper \r\n endings, It's worth noting that many Windows-based editors and interpreters are quite happy with \n line endings. You may be able to save yourself s

Re: Help with unittest2

2012-12-13 Thread Terry Reedy
On 12/13/2012 10:03 AM, Daniel Laird wrote: All, I am new to python and am stuck with python 2.6 (Ubuntu 10.04 and dont want to force switch to 2.7) You can altinstall 2.7 and leave the system 2.6 alone. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: unpacking first few items of iterable

2012-12-13 Thread Ian Kelly
On Thu, Dec 13, 2012 at 1:39 PM, Daniel Fetchinson wrote: >> If you know the sequence has at least n items, you >> can do a, b, c = seq[:3] > > Yeah, that's probably the simplest, without all the fancy stuff :) That only works for sequences, though. Not all iterables are sequences. The islice v

Re: OOP noob question: Mixin properties

2012-12-13 Thread Micky Hulse
On Wed, Dec 12, 2012 at 7:49 PM, Micky Hulse wrote: > I hope you don't mind that this question involves Django... I'm just > looking to improve my core Python skills (so, generic Python examples > would be cool). Just experimenting: I think that will help me ac

Re: unpacking first few items of iterable

2012-12-13 Thread Mitya Sirenef
On 12/13/2012 03:39 PM, Daniel Fetchinson wrote: Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for unpacking the first few items of an iterable whose total length is unknown? Something like a, b, c, _ = myiterable where _ could eat up a variable n

Re: unpacking first few items of iterable

2012-12-13 Thread Daniel Fetchinson
Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for unpacking the first few items of an iterable whose total length is unknown? Something like a, b, c, _ = myiterable where _ could eat up a variable number

Re: unpacking first few items of iterable

2012-12-13 Thread Mitya Sirenef
On 12/13/2012 03:09 PM, Daniel Fetchinson wrote: Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for unpacking the first few items of an iterable whose total length is unknown? Something like a, b, c, _ = myiterable where _ could eat up a variable n

Re: unpacking first few items of iterable

2012-12-13 Thread Daniel Fetchinson
>>Hi folks, I swear I used to know this but can't find it anywhere: >> >>What's the standard idiom for unpacking the first few items of an >>iterable whose total length is unknown? >> >>Something like >> >>a, b, c, _ = myiterable >> >>where _ could eat up a variable number of items, in case I'm onl

Re: unpacking first few items of iterable

2012-12-13 Thread MRAB
On 2012-12-13 19:37, Daniel Fetchinson wrote: Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for unpacking the first few items of an iterable whose total length is unknown? Something like a, b, c, _ = myiterable where _ could eat up a variable numb

python\bluetooth / wsgi / apache 2.2

2012-12-13 Thread Barry Dick
I'm wanting to read from my bluetooth device (it just sends data/header with a checksum at the end, in a continuous mode "a biofeedback device") and I'm getting a weird error in my logs not allowing me to use multiple sockets. I guess with wsgi, I'm creating a link/module between the two apis (a

RE: log4py confusion

2012-12-13 Thread Rob Richardson
I think I have the answer. All I need to do is use the str() function to convert the object stored in logFile from a Unicode string to a normal string: Logger.set_target(str(programSettings.logFile)) RobR -Original Message- From: Python-list [mailto:python-list-bounces+rob.richardson=

wxFormBuilder and wxBitmapCombobox

2012-12-13 Thread Lurken III
I'm stucked in populate a wxBitmapCombobox with wxFormBuilder win7 wxFB 3.3.4-beta unicode in Project settings, path = .<- (dot) I have an "ico_conto1.bmp" tree of the dialog: - Dialog --- wxBoxSizer --wxGridSizer -- 4 wxStaticText + 3 wxTextCtrl + -- wxBitmapComboBo

RE: log4py confusion

2012-12-13 Thread Rob Richardson
Thanks for the suggestion, but I don't think that can be it. At least, it's not it on the line you specified. That form, with the target name given as a hard-coded string, is in use in every Python script our company uses. So, set_target() is expecting a file instead of a file name, there mus

Re: unpacking first few items of iterable

2012-12-13 Thread Demian Brecht
If you're using python3, you can simply do: a, b, c, *rest = myiterable Demian Brecht http://demianbrecht.github.com On 2012-12-13 11:37 AM, "Daniel Fetchinson" wrote: >Hi folks, I swear I used to know this but can't find it anywhere: > >What's the standard idiom for unpacking the first few

unpacking first few items of iterable

2012-12-13 Thread Daniel Fetchinson
Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for unpacking the first few items of an iterable whose total length is unknown? Something like a, b, c, _ = myiterable where _ could eat up a variable number of items, in case I'm only interested in the

Re: log4py confusion

2012-12-13 Thread MRAB
On 2012-12-13 18:58, Rob Richardson wrote: Greetings! I have finally gotten fed up with all of the Python scripts used in my company that have every parameter hard-coded. I am rewriting one of them to read all of its parameters from an XML file. Then, we can change the XML file to control whic

RE: log4py confusion

2012-12-13 Thread Rob Richardson
The last line, programSettings.Log(TempLogger), should have been programSettings.Log(Logger) I get the same error no matter which logger I use, though, which I don't understand. Also, I'm using Python 2.7. Thanks again for your help! RobR From: Python-list [mailto:python-list-bounces+rob.ri

Re: Python parser problem

2012-12-13 Thread RCU
Dave, Thanks for the reply. The script was originally edited on Windows with proper \r\n endings, but the PythonTidy script somehow does the doubling (I guess it assumes UNIX format only), i.e., \r\r\n . So indeed, that's kind of messy (and the Python Lang Reference specifies clearly

log4py confusion

2012-12-13 Thread Rob Richardson
Greetings! I have finally gotten fed up with all of the Python scripts used in my company that have every parameter hard-coded. I am rewriting one of them to read all of its parameters from an XML file. Then, we can change the XML file to control which database it is using, whether its runn

What package to use for certificate manipulation (signing, hashing)

2012-12-13 Thread Nenad Cikic
Hello, I have my pfx file. I need to sign xml with this pfx using private key. I need to extract pem,issuer name,sb,subjectname which all I did with pyopenssl. I need to compute also md5 and sha-1. If I got it right pyopenssl can not sign or compute hash. Shall i use m2crypto or python-crypto or b

Re: Preventing tread collisions

2012-12-13 Thread Wanderer
On Thursday, December 13, 2012 11:54:10 AM UTC-5, Dave Angel wrote: > On 12/13/2012 11:36 AM, Wanderer wrote: > > > > > > > > > Thanks. Why Non-blocking? > > > > You said you didn't want the GUI to lock up. Non-blocking lets you > > choose alternative action when you would otherwise have t

Re: Preventing tread collisions

2012-12-13 Thread Dave Angel
On 12/13/2012 11:36 AM, Wanderer wrote: > > > Thanks. Why Non-blocking? You said you didn't want the GUI to lock up. Non-blocking lets you choose alternative action when you would otherwise have to wait for the resource. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list

Re: Preventing tread collisions

2012-12-13 Thread Wanderer
On Wednesday, December 12, 2012 3:53:28 PM UTC-5, MRAB wrote: > On 2012-12-12 20:11, Wanderer wrote: > > > I have a program that has a main GUI and a camera. In the main GUI, you can > > manipulate the images taken by the camera. You can also use the menu to > > check the camera's settings. Imag

Re: Preventing tread collisions

2012-12-13 Thread Ian Kelly
On Thu, Dec 13, 2012 at 3:26 AM, Alexander Blinne wrote: > I have a general question about this kinds of things. I see that the > above is a common use case for some kind of lock which does this > testing/locking atomically. But the question is: if I know for sure that > there is no other thread t

Re: Help with unittest2

2012-12-13 Thread Paul Rudin
Thomas Bach writes: > BTW, I actually never used 'assertTypeEqual' I rather call assertEqual > and let unittest do the internals. I think assertEqual calls the right > method for you depending on the arguments type. The assertEqual methods have the advantage of checking the type of the argume

Re: Help with unittest2

2012-12-13 Thread Thomas Bach
Hi, On Thu, Dec 13, 2012 at 07:03:27AM -0800, Daniel Laird wrote: > I do am import unittest2 as unittest > The code does not fail but any use of the new functions results in: > NameError: global name 'assertListEqual' is not defined > > What am I doing wrong? Read the error message again: it say

Re: Help with unittest2

2012-12-13 Thread Dave Angel
On 12/13/2012 10:03 AM, Daniel Laird wrote: > All, > > I am new to python and am stuck with python 2.6 (Ubuntu 10.04 and dont want > to force switch to 2.7) > I want to use assertListEqual and other new test functions. > However > I do am import unittest2 as unittest > The code does not fail but a

Re: Help with unittest2

2012-12-13 Thread Boris FELD
How are you importing unittest2, do you have something like this ? try: import unittest2 as unittest except ImportError: import unittest If it's the case, you are maybe using default unittest while you think you are using unittest2. 2012/12/13 Daniel Laird : > On Thursday, December 13, 2012

Re: Find lowest level directory

2012-12-13 Thread Peter Otten
loial wrote: > How can I find the full path of the lowest level directory in a directory > structure? > > If there is more than one directory at the lowest level, the first one > found will be enough. import os def directories(root): for path, folders, files in os.walk(root): for n

Re: Help with unittest2

2012-12-13 Thread Daniel Laird
On Thursday, December 13, 2012 3:09:58 PM UTC, Miki Tebeka wrote: > On Thursday, December 13, 2012 7:03:27 AM UTC-8, Daniel Laird wrote: > > > I do am import unittest2 as unittest > > > NameError: global name 'assertListEqual' is not defined > > According to the docs > (http://docs.python.org/

Re: Where to contribute Unicode General Category encoding/decoding

2012-12-13 Thread Pander Musubi
On Thursday, December 13, 2012 2:22:57 PM UTC+1, Bruno Dupuis wrote: > On Thu, Dec 13, 2012 at 01:51:00AM -0800, Pander Musubi wrote: > > > Hi all, > > > > > > I have created some handy code to encode and decode Unicode General > > Categories. To which Python Package should I contribute this?

Re: Error .. Please Help

2012-12-13 Thread Dave Angel
On 12/13/2012 04:23 AM, inshu chauhan wrote: >> >> if-else doesn't define a loop, but each of the for statements do. >> >> You have defined a classification for 8 of the possible colors, leaving >> millions of them undefined. If the first time through the loop you >> manage to hit one of those und

Re: Help with unittest2

2012-12-13 Thread Miki Tebeka
On Thursday, December 13, 2012 7:03:27 AM UTC-8, Daniel Laird wrote: > I do am import unittest2 as unittest > NameError: global name 'assertListEqual' is not defined According to the docs (http://docs.python.org/2/library/unittest.html#unittest.TestCase.addTypeEqualityFunc) assertListEqual and f

Help with unittest2

2012-12-13 Thread Daniel Laird
All, I am new to python and am stuck with python 2.6 (Ubuntu 10.04 and dont want to force switch to 2.7) I want to use assertListEqual and other new test functions. However I do am import unittest2 as unittest The code does not fail but any use of the new functions results in: NameError: global n

Re: Error .. Please Help

2012-12-13 Thread Neil Cerutti
On 2012-12-13, inshu chauhan wrote: > For this I put an else clause at end but is there a better way > to avoid this kind of situation ?? An if-elif-else structure is usually broken if you leave out the else part. When I don't expect it to ever actually happen when the program is working correctl

Re: Where to contribute Unicode General Category encoding/decoding

2012-12-13 Thread Bruno Dupuis
On Thu, Dec 13, 2012 at 01:51:00AM -0800, Pander Musubi wrote: > Hi all, > > I have created some handy code to encode and decode Unicode General > Categories. To which Python Package should I contribute this? > Hi, As said in a recent thread (a graph data structure IIRC), talking about new fea

Re: Find lowest level directory

2012-12-13 Thread Mark Lawrence
On 13/12/2012 12:48, loial wrote: How can I find the full path of the lowest level directory in a directory structure? If there is more than one directory at the lowest level, the first one found will be enough. Any help appreciated Take a look at the os.path functions. Note that os.path.

Find lowest level directory

2012-12-13 Thread loial
How can I find the full path of the lowest level directory in a directory structure? If there is more than one directory at the lowest level, the first one found will be enough. Any help appreciated -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with calling function from dll

2012-12-13 Thread deepblu
sb = ctypes.create_string_buffer(20) i = ctypes.byref(ctypes.c_int(20)) w = b.GetComputerNameA(sb,i) w -> 1 sb.value -> nazwa komputera :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Preventing tread collisions

2012-12-13 Thread Alexander Blinne
Am 12.12.2012 21:29, schrieb Dave Angel: > On 12/12/2012 03:11 PM, Wanderer wrote: >> I have a program that has a main GUI and a camera. In the main GUI, you can >> manipulate the images taken by the camera. You can also use the menu to >> check the camera's settings. Images are taken by the came

Re: Problem with calling function from dll

2012-12-13 Thread Duncan Booth
deep...@poczta.fm wrote: > I have problem with using function from dll. > > import ctypes > > b = ctypes.windll.LoadLibrary("kernel32") > > a = "" > > b.GetComputerNameA(a,20) > > > But I got exception: > > Traceback (most recent call last): > File "", line 1, in > b.GetComputerNameA

Where to contribute Unicode General Category encoding/decoding

2012-12-13 Thread Pander Musubi
Hi all, I have created some handy code to encode and decode Unicode General Categories. To which Python Package should I contribute this? Regards, Pander -- http://mail.python.org/mailman/listinfo/python-list

Re: Error .. Please Help

2012-12-13 Thread Chris Angelico
On Thu, Dec 13, 2012 at 8:23 PM, inshu chauhan wrote: >> Are you really getting floating point values, or are they always going >> to be equal to an integer? Those if/elif statements might be a problem >> if you ever need to compare to a value like (128.4, 255.0, 255.0). > > > I dont have values

Re: Error .. Please Help

2012-12-13 Thread inshu chauhan
> > if-else doesn't define a loop, but each of the for statements do. > > You have defined a classification for 8 of the possible colors, leaving > millions of them undefined. If the first time through the loop you > manage to hit one of those undefined ones, you'll have no value for > classificat

Re: Problem with calling function from dll

2012-12-13 Thread Ulrich Eckhardt
Am 13.12.2012 08:40, schrieb deep...@poczta.fm: I have problem with using function from dll. import ctypes b = ctypes.windll.LoadLibrary("kernel32") a = "" b.GetComputerNameA(a,20) GetComputerNameA takes a pointer to a writable char string. You give it a pointer to an immutable string. You