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

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 classification.

Re: Error .. Please Help

2012-12-13 Thread Chris Angelico
On Thu, Dec 13, 2012 at 8:23 PM, inshu chauhan insidesh...@gmail.com 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

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: 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 pyshell#323, line 1, in module

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 camera in

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

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: 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

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

Re: Error .. Please Help

2012-12-13 Thread Neil Cerutti
On 2012-12-13, inshu chauhan insidesh...@gmail.com 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

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

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

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 undefined

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: 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

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 name

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 daniel.j.la...@googlemail.com: On

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 any use

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 says

Re: Help with unittest2

2012-12-13 Thread Paul Rudin
Thomas Bach thb...@students.uni-mainz.de 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 assertTypeEqual methods have the advantage of

Re: Preventing tread collisions

2012-12-13 Thread Ian Kelly
On Thu, Dec 13, 2012 at 3:26 AM, Alexander Blinne n...@blinne.net 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

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. Images are

Re: Preventing tread collisions

2012-12-13 Thread Dave Angel
On 12/13/2012 11:36 AM, Wanderer wrote: snip 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 Thursday, December 13, 2012 11:54:10 AM UTC-5, Dave Angel wrote: On 12/13/2012 11:36 AM, Wanderer wrote: snip 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

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

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

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

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

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

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: 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 fetchin...@googlemail.com wrote: Hi folks, I swear I used to know this but can't find it anywhere: What's the standard idiom for

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

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 + -- wxBitmapComboBox

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

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

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

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 only interested in the

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

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 only interested

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

Re: OOP noob question: Mixin properties

2012-12-13 Thread Micky Hulse
On Wed, Dec 12, 2012 at 7:49 PM, Micky Hulse mickyhulse.li...@gmail.com 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: https://gist.github.com/4279705 I

Re: unpacking first few items of iterable

2012-12-13 Thread Ian Kelly
On Thu, Dec 13, 2012 at 1:39 PM, Daniel Fetchinson fetchin...@googlemail.com 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

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: Python parser problem

2012-12-13 Thread Chris Angelico
On Fri, Dec 14, 2012 at 6:12 AM, RCU alex.e.s...@gmail.com 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

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

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

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

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: 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.

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? An hinted by

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: Python version and svn

2012-12-13 Thread Ned Deily
In article kadjhi$kq$1...@ger.gmane.org, Terry Reedy tjre...@udel.edu 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

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

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

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

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: 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,css,

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, suresh.pinn...@gmail.com 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

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 didn't

Re: MySQLdb compare lower

2012-12-13 Thread Cameron Simpson
On 13Dec2012 18:39, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: | On Thu, 13 Dec 2012 18:00:48 +1100, Cameron Simpson c...@zip.com.au | declaimed the following in gmane.comp.python.general: | On 12Dec2012 02:03, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: | | According to the old MySQL

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 get my

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

Re: MySQLdb compare lower

2012-12-13 Thread Chris Angelico
On Fri, Dec 14, 2012 at 2:35 PM, Cameron Simpson c...@zip.com.au wrote: On 13Dec2012 18:39, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: | On Thu, 13 Dec 2012 18:00:48 +1100, Cameron Simpson c...@zip.com.au | declaimed the following in gmane.comp.python.general: | On 12Dec2012 02:03, Dennis

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

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 ~]$

Re: Running a python script under Linux

2012-12-13 Thread Cameron Simpson
On 14Dec2012 02:45, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info 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

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: data += more

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: What are the minimum requirements to get a job in?

2012-12-13 Thread rusi
On Dec 14, 8:33 am, Dave Angel d...@davea.name 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

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 rustompm...@gmail.com wrote: On Dec 14, 8:33 am, Dave Angel d...@davea.name 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

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

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, it runs

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: Python parser problem

2012-12-13 Thread Paul Rudin
Chris Angelico ros...@gmail.com writes: On Fri, Dec 14, 2012 at 6:12 AM, RCU alex.e.s...@gmail.com 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

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

2012-12-13 Thread rusi
On Dec 14, 11:56 am, Devin Jeanpierre jeanpierr...@gmail.com wrote: On Fri, Dec 14, 2012 at 1:13 AM, rusi rustompm...@gmail.com wrote: On Dec 14, 8:33 am, Dave Angel d...@davea.name wrote: Do you know any one computer language thoroughly?  Or just a little of many languages? There is a

Re: Python parser problem

2012-12-13 Thread Chris Angelico
On Fri, Dec 14, 2012 at 6:30 PM, Paul Rudin paul.nos...@rudin.co.uk wrote: Chris Angelico ros...@gmail.com writes: On Fri, Dec 14, 2012 at 6:12 AM, RCU alex.e.s...@gmail.com wrote: Dave, Thanks for the reply. The script was originally edited on Windows with proper \r\n endings,

[issue16607] Bad examples in documentation

2012-12-13 Thread Daniel Urban
Daniel Urban added the comment: As John Hampton have explained it, the documentation is actually correct. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16607 ___

[issue16671] logging.handlers.QueueListener sentinel should not be None

2012-12-13 Thread Andras Szalai
Andras Szalai added the comment: What mislead me is: The current code uses `is` and opposed to `==` which I assume is for the very specific reason to match identity and not value. The sentinel starts with a _, which to a casual reader (me) suggests that it's a private implementation detail

[issue16671] logging.handlers.QueueListener sentinel should not be None

2012-12-13 Thread Vinay Sajip
Vinay Sajip added the comment: The sentinel starts with a _, which to a casual reader (me) suggests that it's a private implementation detail that I should not have to touch. (am I right on this?) Python is a language for consenting adults, so nothing is off-limits, except that you need to

[issue16673] Corrections in the library OS (PEP8)

2012-12-13 Thread Raninho Fernandes
New submission from Raninho Fernandes: Community, I realized that there are libraries that do not follow the standard PEP8, in order to start to contribute, I am providing the OS patch. I do not know if has community interest in the corrections (PEP8). thank you -- files:

[issue16673] Corrections in the library OS (PEP8)

2012-12-13 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for your contribution, but we don't usually apply this kind of refactoring unless we are already making changes to the a specific part of the code. The reason is that even if they are trivial changes, there's an (admittedly small) chance of introducing

[issue16607] Bad examples in documentation

2012-12-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16607 ___

[issue5289] ctypes.util.find_library does not work under Solaris

2012-12-13 Thread Aaron Iles
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5289 ___ ___ Python-bugs-list mailing

[issue16673] Corrections in the library OS (PEP8)

2012-12-13 Thread R. David Murray
R. David Murray added the comment: That is indeed our standard policy. And yes, thank you for trying, Raninho. A good way to make an initial contribution is to look for modules that don't yet have full test coverage (there are a lot) and add tests. The devguide

[issue16673] Corrections in the library OS (PEP8)

2012-12-13 Thread Raninho Fernandes
Raninho Fernandes added the comment: I will follow the suggestion of Murray. Thanks Ezio and Murray. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16673 ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16049 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16667] timezone docs need versionadded: 3.2

2012-12-13 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file28301/issue16667.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16667 ___

[issue16667] timezone docs need versionadded: 3.2

2012-12-13 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16667 ___ ___

[issue16667] timezone docs need versionadded: 3.2

2012-12-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: I've reworded patch a bit and made it based on 3.2 for easier merging. -- nosy: +asvetlov Added file: http://bugs.python.org/file28302/issue16667_v2.diff ___ Python tracker rep...@bugs.python.org

[issue4955] xml.sax.expatreader.ExpatParser incorrectly silently skips external character entities in attribute values

2012-12-13 Thread Maximiliano Curia
Changes by Maximiliano Curia m...@debian.org: -- nosy: +m...@debian.org ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4955 ___ ___

[issue4955] xml.sax.expatreader.ExpatParser incorrectly silently skips external character entities in attribute values

2012-12-13 Thread Maximiliano Curia
Maximiliano Curia added the comment: Hi, There are two issues commented in this bug, both are part of libexpat. The one related the code inconsistency is due the design of Xml_Parser. Reading Modules/expat/xmlparse.c:5036 else if (!entity) { /* Cannot report skipped entity

[issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results

2012-12-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce85fe971e0a by Ross Lagerwall in branch '3.3': Issue #16661: Fix the os.getgrouplist() test by not assuming that it http://hg.python.org/cpython/rev/ce85fe971e0a New changeset 05a37954a30c by Ross Lagerwall in branch 'default': Merge with 3.3 for

[issue16667] timezone docs need versionadded: 3.2

2012-12-13 Thread Nurhusien Hasen
Nurhusien Hasen added the comment: On 12/14/12, Berker Peksag rep...@bugs.python.org wrote: Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file28301/issue16667.diff ___ Python tracker

[issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results

2012-12-13 Thread Ross Lagerwall
Ross Lagerwall added the comment: Is that fixed now? I simplified the test to check for a non-empty list being returned. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16661 ___

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-12-13 Thread Éric Araujo
Éric Araujo added the comment: Feel free to commit the patch Andrew. You may want to document the new ABC class before the ABCMeta, as we expect that subclassing will become the preferred way. -- ___ Python tracker rep...@bugs.python.org

[issue16667] timezone docs need versionadded: 3.2

2012-12-13 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg177410 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16667 ___

[issue16667] timezone docs need versionadded: 3.2

2012-12-13 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16667 ___

[issue16667] timezone docs need versionadded: 3.2

2012-12-13 Thread Éric Araujo
Éric Araujo added the comment: Second patch has a stray slash character, and the versionadded directive does not seem to be in the same place as the first patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16667

[issue16670] Point class may be not be a good example for namedtuple

2012-12-13 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo title: [docs] class Point in collections.namedtuples may be not that good example - Point class may be not be a good example for namedtuple versions: +Python 3.4 -Python 2.6, Python 3.1

  1   2   >