PyOhio 2013 Call For Proposals Deadline Almost Here (June 1)!

2013-05-27 Thread brian . costlow
PyOhio 2013, the annual Python programming conference for Ohio and the surrounding region, will take place Saturday, July 27th, and Sunday, July 28th, 2013 at the Ohio Union, The Ohio State University in Columbus, Ohio. You can read more about the conference at http://pyohio.org. If you have

PyModel 1.0: model-based testing in Python

2013-05-27 Thread jon . p . jacky
PyModel v 1.0 is released. PyModel is a model-based testing framework for Python. In model-based testing, you code a model that can generate as many test cases as needed; the model also checks the test outcomes. In the samples included with PyModel, there are models and test scripts for

Re: Ldap module and base64 oncoding

2013-05-27 Thread dieter
Joseph L. Casale jcas...@activenetwerx.com writes: ... After parsing the data for a user I am simply taking a value from the ldif file and writing it back out to another which fails, the value parsed is: officestreetaddress:: T3R0by1NZcOfbWVyLVN0cmHDn2UgMQ== File

Re: Solving the problem of mutual recursion

2013-05-27 Thread Ian Kelly
On Sun, May 26, 2013 at 10:36 PM, Peter Brooks peter.h.m.bro...@gmail.com wrote: This makes complete sense - any atomic action should be atomic, so two threads can't be doing it at the same time. They can be doing anything else though. If two threads create a new object at the same time, for

Re: Python error codes and messages location

2013-05-27 Thread Cameron Simpson
On 27May2013 04:49, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: | From: steve+comp.lang.pyt...@pearwood.info | On Mon, 27 May 2013 02:13:54 +0300, Carlos Nepomuceno wrote: | Where can I find all error codes and messages that Python throws (actual | codes and messages from exceptions

Re: Short-circuit Logic

2013-05-27 Thread Cameron Simpson
On 27May2013 06:59, Vito De Tullio vito.detul...@gmail.com wrote: | Cameron Simpson wrote: |if s is not None and len(s) 0: | ... do something with the non-empty string `s` ... | | In this example, None is a sentinel value for no valid string and | calling len(s) would raise an

Re: Solving the problem of mutual recursion

2013-05-27 Thread Ian Kelly
On Sun, May 26, 2013 at 4:16 PM, Chris Angelico ros...@gmail.com wrote: On Mon, May 27, 2013 at 5:35 AM, Ian Kelly ian.g.ke...@gmail.com wrote: I'm pretty sure that CPython uses the GIL regardless of platform. And yes you can have multiple OS-level threads, but because of the GIL only one

Re: how to compare two json file line by line using python?

2013-05-27 Thread Avnesh Shakya
Thanks a lot, I got it. On Mon, May 27, 2013 at 11:03 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 26 May 2013 21:32:40 -0700, Avnesh Shakya wrote: But I want to compare line by line and value by value. but i found that json data is unordered data, so how can i

Re: Solving the problem of mutual recursion

2013-05-27 Thread Ian Kelly
On Mon, May 27, 2013 at 12:19 AM, Ian Kelly ian.g.ke...@gmail.com wrote: 7) Since the program being tested does basically nothing except start and exit threads, the extra 40% probably represents the overhead of all that starting and stopping, which would be done outside the GIL. To test this,

Re: help?? on functions

2013-05-27 Thread lokeshkoppaka
On Monday, May 27, 2013 11:18:34 AM UTC+5:30, Steven D'Aprano wrote: On Sun, 26 May 2013 21:48:34 -0700, lokeshkoppaka wrote: def shuffle(input, i, j): pass input = input[i:j+1] +input[0:i] + input[j+1:] pass does nothing. Take it out. def

Re: Solving the problem of mutual recursion

2013-05-27 Thread Chris Angelico
On Mon, May 27, 2013 at 4:07 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sun, May 26, 2013 at 10:36 PM, Peter Brooks peter.h.m.bro...@gmail.com wrote: This makes complete sense - any atomic action should be atomic, so two threads can't be doing it at the same time. They can be doing anything

Re: Python error codes and messages location

2013-05-27 Thread Chris Angelico
On Mon, May 27, 2013 at 4:11 PM, Cameron Simpson c...@zip.com.au wrote: On 27May2013 04:49, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: | That's bad! I'd like to check all the IOError codes that may be | raised by a function/method but the information isn't there. No, you really

Re: Ldap module and base64 oncoding

2013-05-27 Thread Michael Ströder
Joseph L. Casale wrote: After parsing the data for a user I am simply taking a value from the ldif file and writing it back out to another which fails, the value parsed is: officestreetaddress:: T3R0by1NZcOfbWVyLVN0cmHDn2UgMQ== File C:\Python27\lib\site-packages\ldif.py, line 202, in

Re: help?? on functions

2013-05-27 Thread John Ladasky
Steven gave you a lot of good advice. Let me add just one remark. Python already has a builtin function called input. If you define a variable with the same name as a builtin and then you try to use that builtin, you will be in for a (usually unpleasant) surprise. --

Re: Piping processes works with 'shell = True' but not otherwise.

2013-05-27 Thread Chris Angelico
On Mon, May 27, 2013 at 9:58 AM, Luca Cerone luca.cer...@gmail.com wrote: Could you provide the *actual* commands you're using, rather than the generic program1 and program2 placeholders? It's *very* common for people to get the tokenization of a command line wrong (see the Note box in

Re: This mail never gets delivered. Any ideas why?

2013-05-27 Thread Νίκος Γκρ33κ
Please, do you see an error in this? As i said the 2nd solution doesnt provide an error but also doesn't get the mail send too. -- http://mail.python.org/mailman/listinfo/python-list

Problems with python and pyQT

2013-05-27 Thread silusilusilu
Hi, i'm new with python: so excuse me for my questions i have this code: def updateLog(self, text): self.ui.logTextEdit.moveCursor(QTextCursor.End) self.ui.logTextEdit.insertHtml(font color=\Black\+text) self.ui.logTextEdit.moveCursor(QTextCursor.End) logTextEdit

How to create new python file with increament number, if doesn't exist?

2013-05-27 Thread Avnesh Shakya
hi, I want to create a new python file like 'data0.0.5', but if it is already exist then it should create 'data0.0.6', if it's also exist then next like 'data0.0.7'. I have done, but with range, please give me suggestion so that I can do it with specifying range. I was trying this way and

Re: How to create new python file with increament number, if doesn't exist?

2013-05-27 Thread Denis McMahon
On Mon, 27 May 2013 02:27:59 -0700, Avnesh Shakya wrote: I want to create a new python file like 'data0.0.5', but if it is already exist then it should create 'data0.0.6', if it's also exist then next like 'data0.0.7'. I have done, but with range, please give me suggestion so that I can do it

Re: how to compare two json file line by line using python?

2013-05-27 Thread Denis McMahon
On Sun, 26 May 2013 21:32:40 -0700, Avnesh Shakya wrote: how to compare two json file line by line using python? Actually I am doing it in this way.. Oh what a lot of homework you have today. Did you ever stop to think what the easiest way to compare two json datasets is? -- Denis

Re: How to create new python file with increament number, if doesn't exist?

2013-05-27 Thread Avnesh Shakya
Thanks On Mon, May 27, 2013 at 4:19 PM, Denis McMahon denismfmcma...@gmail.comwrote: On Mon, 27 May 2013 02:27:59 -0700, Avnesh Shakya wrote: I want to create a new python file like 'data0.0.5', but if it is already exist then it should create 'data0.0.6', if it's also exist then next

Re: How to create new python file with increament number, if doesn't exist?

2013-05-27 Thread Jens Thoms Toerring
Avnesh Shakya avnesh.n...@gmail.com wrote: I want to create a new python file like 'data0.0.5', but if it is already exist then it should create 'data0.0.6', if it's also exist then next like 'data0.0.7'. I have done, but with range, please give me suggestion so that I can do it with

Re: Piping processes works with 'shell = True' but not otherwise.

2013-05-27 Thread Luca Cerone
Will it violate privacy / NDA to post the command line? Even if we can't actually replicate your system, we may be able to see something from the commands given. Unfortunately yes.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python error codes and messages location

2013-05-27 Thread Mark Lawrence
On 27/05/2013 07:11, Cameron Simpson wrote: BTW, I recommend importing errno and using symbolic names. It makes things much more readable, and accomodates the situation where the symbols map to different numbers on different platforms. And have a catch-all. For example: Cheers, This

Re: This mail never gets delivered. Any ideas why?

2013-05-27 Thread Mark Lawrence
On 27/05/2013 10:15, Νίκος Γκρ33κ wrote: Please, do you see an error in this? As i said the 2nd solution doesnt provide an error but also doesn't get the mail send too. At least you're improving. Yesterday you were chasing after two hours, it's now up to four hours 15 minutes. Keep

Scary Pranks

2013-05-27 Thread MoneyMaker
http://horrorhorrorhorror.webs.com/scary-pranks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python error codes and messages location

2013-05-27 Thread Fábio Santos
On 27 May 2013 12:41, Mark Lawrence breamore...@yahoo.co.uk wrote: This should make life easier for us http://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy Speaking of PEPs and exceptions. When do we get localized exceptions? --

Re: Problems with python and pyQT

2013-05-27 Thread Chris “Kwpolska” Warrick
On Mon, May 27, 2013 at 11:26 AM, silusilus...@gmail.com wrote: Hi, i'm new with python: so excuse me for my questions i have this code: def updateLog(self, text): self.ui.logTextEdit.moveCursor(QTextCursor.End) self.ui.logTextEdit.insertHtml(font

Re: Python error codes and messages location

2013-05-27 Thread Steven D'Aprano
On Mon, 27 May 2013 13:46:50 +0100, Fábio Santos wrote: Speaking of PEPs and exceptions. When do we get localized exceptions? We're waiting for you to volunteer. When can you start? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Python error codes and messages location

2013-05-27 Thread Fábio Santos
On Mon, May 27, 2013 at 2:11 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 27 May 2013 13:46:50 +0100, Fábio Santos wrote: Speaking of PEPs and exceptions. When do we get localized exceptions? We're waiting for you to volunteer. When can you start? I'd love to work

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-27 Thread Νίκος Γκρ33κ
I cant solve this plz help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-27 Thread Michael Torrie
On 05/26/2013 11:06 PM, Νίκος Γκρ33κ wrote: But iu have it set up for 'utf-8' as seen in this statement. con = pymysql.connect( db = 'metrites', host = 'localhost', user = 'me', passwd = 'somepass', charset='utf-8', init_command='SET NAMES UTF8' ) That might not help... see below. Yoiu

How to get an integer from a sequence of bytes

2013-05-27 Thread Mok-Kong Shen
From an int one can use to_bytes to get its individual bytes, but how can one reconstruct the int from the sequence of bytes? Thanks in advance. M. K. Shen -- http://mail.python.org/mailman/listinfo/python-list

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-27 Thread Mark Lawrence
On 27/05/2013 15:16, Νίκος Γκρ33κ wrote: I cant solve this plz help! Sure, all you need do is get your cheque book out. Also have you ever heard the expression patience is a virtue? -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark

Re: How to get an integer from a sequence of bytes

2013-05-27 Thread Steven D'Aprano
On Mon, 27 May 2013 16:45:05 +0200, Mok-Kong Shen wrote: From an int one can use to_bytes to get its individual bytes, but how can one reconstruct the int from the sequence of bytes? Here's one way: py n = 11999102937234 py m = 0 py for b in n.to_bytes(6, 'big'): ... m = 256*m + b ... py

Re: Future standard GUI library

2013-05-27 Thread Wolfgang Keller
Your back end exposes services and business logic, and your front end can be in HTMLv5 and Javascript, or QtQuick, PyGTK, or Visual Studio. If you do need a native interface, it's a heck of a lot easier to rewrite just the frontend then the entire stack. Any decent database CRUD framework

Re: How to get an integer from a sequence of bytes

2013-05-27 Thread Ned Batchelder
On 5/27/2013 10:45 AM, Mok-Kong Shen wrote: From an int one can use to_bytes to get its individual bytes, but how can one reconstruct the int from the sequence of bytes? The next thing in the docs after int.to_bytes is int.from_bytes:

Re: Future standard GUI library

2013-05-27 Thread Wolfgang Keller
HTTP handles that just fine, with your choice of XML, And XML is definitely not suitable as a marshalling format for a RPC protocol. XML-over-HTTP is a true cerebral flatulance of some hopelessly clueless moron. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-27 Thread Νίκος Γκρ33κ
Τη Δευτέρα, 27 Μαΐου 2013 5:45:25 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε: Sure, all you need do is get your cheque book out. Also have you ever heard the expression patience is a virtue? Well, if i'am gonna pay someone and i will at some point because i want my script to be also

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-27 Thread Chris Angelico
On Tue, May 28, 2013 at 1:37 AM, Νίκος Γκρ33κ nikos.gr...@gmail.com wrote: Τη Δευτέρα, 27 Μαΐου 2013 5:45:25 μ.μ. UTC+3, ο χρήστης Mark Lawrence έγραψε: Sure, all you need do is get your cheque book out. Also have you ever heard the expression patience is a virtue? Well, if i'am gonna pay

RE: Python error codes and messages location

2013-05-27 Thread Carlos Nepomuceno
Thanks so much guys! I'm not planning to prepare for every possible situation, but I certainly am responsible to handle most common errors. So it's really important to know what a function/method returns when called. Exception handling may take lots of code, but I'm used to it. It's much

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-27 Thread Νίκος Γκρ33κ
Τη Δευτέρα, 27 Μαΐου 2013 6:52:32 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: So you want to pay someone who won't ask for money? It may be sordid, but you're going to have to discuss money at some point if you're serious about paying someone. Oh, and you may want to hire a typist, too. At

Re: Future standard GUI library

2013-05-27 Thread Michael Torrie
On 05/27/2013 09:31 AM, Wolfgang Keller wrote: HTTP handles that just fine, with your choice of XML, And XML is definitely not suitable as a marshalling format for a RPC protocol. XML-over-HTTP is a true cerebral flatulance of some hopelessly clueless moron. Hmm. Well I think there are

Re: Future standard GUI library

2013-05-27 Thread Michael Torrie
On 05/27/2013 09:22 AM, Wolfgang Keller wrote: suppose I now want the app natively on my phone (because that's all the rage). It's an iPhone. Oh. Apple doesn't support Python. Okay, rewrite the works, including business logic, in Objective C. Now I want it on my android phone. Those are

Re: Python error codes and messages location

2013-05-27 Thread Mark Lawrence
On 27/05/2013 17:54, Carlos Nepomuceno wrote: I think PEP 3151 is a step ahead! That's almost exactly what I was looking for. Why did it take so long to have that implemented? Lack of volunteers. -- If you're using GoogleCrap™ please read this

Re: Python error codes and messages location

2013-05-27 Thread Terry Jan Reedy
On 5/27/2013 12:54 PM, Carlos Nepomuceno wrote: I think PEP 3151 is a step ahead! That's almost exactly what I was looking for. Why did it take so long to have that implemented? Since this PEP involved changing existing features, rather than adding

Re: Python error codes and messages location

2013-05-27 Thread Vito De Tullio
Fábio Santos wrote: This should make life easier for us http://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy Speaking of PEPs and exceptions. When do we get localized exceptions? What do you mean by localized exceptions? Please, tell me it's *NOT*

Re: Python error codes and messages location

2013-05-27 Thread Fábio Santos
On 27 May 2013 19:23, Vito De Tullio vito.detul...@gmail.com wrote: Fábio Santos wrote: This should make life easier for us http://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy Speaking of PEPs and exceptions. When do we get localized

Re: serialize a class to XML and back

2013-05-27 Thread Irmen de Jong
On 27-5-2013 2:39, Roy Smith wrote: In article 51a28f42$0$15870$e4fe5...@news.xs4all.nl, Irmen de Jong irmen.nos...@xs4all.nl wrote: On 26-5-2013 22:48, Roy Smith wrote: The advantage of pickle over json is that pickle can serialize many types of objects that json can't. The other side

SQLObject 1.3.3 and 1.4.1

2013-05-27 Thread Oleg Broytman
Hello! I'm pleased to announce bugfix releases 1.3.3 and 1.4.1. What's new in SQLObject === * Fixed bugs in pickling and unpickling (remove/restore a weak proxy to self, fixed cache handling). * Added an example of using SQLObject with web.py to the links page.

Re: 64-bit Python for Solaris

2013-05-27 Thread Matchek
Crickets 2013/5/21 Maciej (Matchek) Bliziński mac...@opencsw.org: the ${prefix}/lib/pythonX.Y/_sysconfigdata.py file contains system-specific information ...and is installed in an architecture-independent directory by the Python installer. This looks broken to me. --

Re: Short-circuit Logic

2013-05-27 Thread Ahmed Abdulshafy
On Sunday, May 26, 2013 1:11:56 PM UTC+2, Ahmed Abdulshafy wrote: Hi, I'm having a hard time wrapping my head around short-circuit logic that's used by Python, coming from a C/C++ background; so I don't understand why the following condition is written this way! if not

Re: Short-circuit Logic

2013-05-27 Thread Ahmed Abdulshafy
On Sunday, May 26, 2013 2:13:47 PM UTC+2, Steven D'Aprano wrote: On Sun, 26 May 2013 04:11:56 -0700, Ahmed Abdulshafy wrote: Hi, I'm having a hard time wrapping my head around short-circuit logic that's used by Python, coming from a C/C++ background; so I don't understand why

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-27 Thread Νίκος Γκρ33κ
I have checked the database through phpMyAdmin and it is indeed UTF-8. I have no idea why python 3.3.1 chooses to work with latin-iso only -- http://mail.python.org/mailman/listinfo/python-list

Re: Short-circuit Logic

2013-05-27 Thread Nobody
On Sun, 26 May 2013 04:11:56 -0700, Ahmed Abdulshafy wrote: I'm having a hard time wrapping my head around short-circuit logic that's used by Python, coming from a C/C++ background; so I don't understand why the following condition is written this way! if not allow_zero and abs(x)

Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Bryan Britten
Hey, everyone! I'm very new to Python and have only been using it for a couple of days, but have some experience in programming (albeit mostly statistical programming in SAS or R) so I'm hoping someone can answer this question in a technical way, but without using an abundant amount of

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Roy Smith
In article 10be5c62-4c58-4b4f-b00a-82d85ee4e...@googlegroups.com, Bryan Britten britten.br...@gmail.com wrote: If I use the following code: code import urllib urlStr = https://stream.twitter.com/1/statuses/sample.json; fileHandle = urllib.urlopen(urlStr) twtrText =

Minor consistency question in io.IOBase

2013-05-27 Thread dwight . guth
Hi, so, I don't necessarily know if this is the right place to ask this question since it's kindof a rather technical one which gets into details of the python interpreter itself, but I thought I'd start here and if nobody knew the answer, they could let me know if it makes sense to ask on

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Bryan Britten
Try to not sigh audibly as I ask what I'm sure are two asinine questions. 1) How is this approach different from twtrDict = [json.loads(line) for line in urllib.urlopen(urlStr)]? 2) How do I tell how many JSON objects are on each line? -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Denis McMahon
On Mon, 27 May 2013 14:29:38 -0700, Bryan Britten wrote: Try to not sigh audibly as I ask what I'm sure are two asinine questions. 1) How is this approach different from twtrDict = [json.loads(line) for line in urllib.urlopen(urlStr)]? 2) How do I tell how many JSON objects are on each

Re: Encodign issue in Python 3.3.1 (once again)

2013-05-27 Thread Chris Angelico
On Tue, May 28, 2013 at 2:56 AM, Νίκος Γκρ33κ nikos.gr...@gmail.com wrote: Τη Δευτέρα, 27 Μαΐου 2013 6:52:32 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: Oh, and you may want to hire a typist, too. At the moment, your posts make you appear not to care about the job. I always make typos when

Re: Future standard GUI library

2013-05-27 Thread Chris Angelico
On Tue, May 28, 2013 at 3:13 AM, Michael Torrie torr...@gmail.com wrote: On 05/27/2013 09:31 AM, Wolfgang Keller wrote: HTTP handles that just fine, with your choice of XML, And XML is definitely not suitable as a marshalling format for a RPC protocol. XML-over-HTTP is a true cerebral

Re: Future standard GUI library

2013-05-27 Thread Roy Smith
In article mailman.2265.1369693294.3114.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: I'll use XML when I have to, but if I'm inventing my own protocol, nope. There are just too many quirks with it. How do you represent an empty string named Foo? Foo/Foo or equivalently

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Fábio Santos
On 27 May 2013 22:36, Bryan Britten britten.br...@gmail.com wrote: Try to not sigh audibly as I ask what I'm sure are two asinine questions. 1) How is this approach different from twtrDict = [json.loads(line) for line in urllib.urlopen(urlStr)]? The suggested approach made use of generators.

Re: Python error codes and messages location

2013-05-27 Thread Fábio Santos
On 27 May 2013 19:36, Fábio Santos fabiosantos...@gmail.com wrote: On 27 May 2013 19:23, Vito De Tullio vito.detul...@gmail.com wrote: Fábio Santos wrote: This should make life easier for us

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Dave Angel
On 05/27/2013 04:47 PM, Bryan Britten wrote: Hey, everyone! I'm very new to Python and have only been using it for a couple of days, but have some experience in programming (albeit mostly statistical programming in SAS or R) so I'm hoping someone can answer this question in a technical way,

Re: Short-circuit Logic

2013-05-27 Thread Nobody
On Mon, 27 May 2013 13:11:28 -0700, Ahmed Abdulshafy wrote: On Sunday, May 26, 2013 2:13:47 PM UTC+2, Steven D'Aprano wrote: What the above actually tests for is whether x is so small that (1.0+x) cannot be distinguished from 1.0, which is not the same thing. It is also quite arbitrary. Why

RE: Ldap module and base64 oncoding

2013-05-27 Thread Joseph L. Casale
Note that all modules in python-ldap up to 2.4.10 including module 'ldif' expect raw byte strings to be passed as arguments. It seems to me you're passing a Unicode object in the entry dictionary which will fail in case an attribute value contains NON-ASCII chars. Yup, I was. python-ldap

Re: How to get an integer from a sequence of bytes

2013-05-27 Thread Steven D'Aprano
On Mon, 27 May 2013 11:30:18 -0400, Ned Batchelder wrote: On 5/27/2013 10:45 AM, Mok-Kong Shen wrote: From an int one can use to_bytes to get its individual bytes, but how can one reconstruct the int from the sequence of bytes? The next thing in the docs after int.to_bytes is

RE: How to get an integer from a sequence of bytes

2013-05-27 Thread Carlos Nepomuceno
From: steve+comp.lang.pyt...@pearwood.info Subject: Re: How to get an integer from a sequence of bytes Date: Mon, 27 May 2013 15:00:39 + To: python-list@python.org On Mon, 27 May 2013 16:45:05 +0200, Mok-Kong Shen wrote: From an int one can use

Re: How to get an integer from a sequence of bytes

2013-05-27 Thread Dave Angel
On 05/27/2013 08:31 PM, Steven D'Aprano wrote: On Mon, 27 May 2013 11:30:18 -0400, Ned Batchelder wrote: On 5/27/2013 10:45 AM, Mok-Kong Shen wrote: From an int one can use to_bytes to get its individual bytes, but how can one reconstruct the int from the sequence of bytes? The next thing

Re: Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-27 Thread logan . c . graham
On Saturday, May 25, 2013 6:33:25 PM UTC-7, John Ladasky wrote: On Friday, May 24, 2013 4:36:35 PM UTC-7, Carlos Nepomuceno wrote: #to create the tables list tables=[[re.findall('TD(.*?)/TD',r,re.S) for r in re.findall('TR(.*?)/TR',t,re.S)] for t in

RE: Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-27 Thread Carlos Nepomuceno
Date: Mon, 27 May 2013 17:58:00 -0700 Subject: Re: Total Beginner - Extracting Data from a Database Online (Screenshot) From: logan.c.gra...@gmail.com To: python-list@python.org [...] Oh goodness, yes, I have no clue. For example: # to retrieve

How to: Setuptools

2013-05-27 Thread ray
I would like to use easy_install, but can't figure out how to install it. I have 64-bit Python 2.7.5 on Windows 7. Following the instructions on https://pypi.python.org/pypi/setuptools, it says: Download ez_setup.py and run it; it will download the appropriate .egg file and install it for

Re: Future standard GUI library

2013-05-27 Thread Denis McMahon
On Tue, 28 May 2013 08:21:25 +1000, Chris Angelico wrote: I'll use XML when I have to, but if I'm inventing my own protocol, nope. There are just too many quirks with it. How do you represent an empty string named Foo? Foo/Foo or equivalently Foo/ How do you represent an empty list

RE: How to: Setuptools

2013-05-27 Thread Carlos Nepomuceno
curl -O http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py Date: Mon, 27 May 2013 18:32:43 -0700 Subject: How to: Setuptools From: r...@aarden.us To: python-list@python.org I would like to use easy_install, but can't figure out how to

RE: Minor consistency question in io.IOBase

2013-05-27 Thread Carlos Nepomuceno
Date: Mon, 27 May 2013 14:22:17 -0700 Subject: Minor consistency question in io.IOBase From: dwight.g...@gmail.com To: python-list@python.org Hi, so, I don't necessarily know if this is the right place to ask this question since it's kindof a rather

Re: How to: Setuptools

2013-05-27 Thread rusi
On May 28, 6:45 am, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: curl -Ohttp://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py Curl comes built into windows?? Does not seem so...

RE: How to: Setuptools

2013-05-27 Thread Carlos Nepomuceno
Date: Mon, 27 May 2013 19:57:47 -0700 Subject: Re: How to: Setuptools From: rustompm...@gmail.com To: python-list@python.org On May 28, 6:45 am, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: curl

Re: Reading *.json from URL - json.loads() versus urllib.urlopen.readlines()

2013-05-27 Thread Bryan Britten
On Monday, May 27, 2013 7:58:05 PM UTC-4, Dave Angel wrote: On 05/27/2013 04:47 PM, Bryan Britten wrote: Hey, everyone! I'm very new to Python and have only been using it for a couple of days, but have some experience in programming (albeit mostly statistical programming in SAS

Re: How to: Setuptools

2013-05-27 Thread rusi
On May 28, 8:06 am, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Date: Mon, 27 May 2013 19:57:47 -0700 Subject: Re: How to: Setuptools From: rustompm...@gmail.com To: python-l...@python.org On May 28, 6:45 am, Carlos Nepomuceno

Re: I want to know how to implement concurrent threads in Python

2013-05-27 Thread Daniel Gagliardi
fuck! fuck! i'm gonna be fired if i didnt get this shit! i told my boss id do it. fuck! im gonna pipe some crakc. fuck... 2013/5/26 Mark Lawrence breamore...@yahoo.co.uk On 26/05/2013 20:10, Daniel Gagliardi wrote: I want to know how to implement concurrent threads in Python google, bing,

RE: How to: Setuptools

2013-05-27 Thread Carlos Nepomuceno
Date: Mon, 27 May 2013 20:54:53 -0700 Subject: Re: How to: Setuptools From: rustompm...@gmail.com [...] Oooff! Talk of using sledgehammers to crack nuts... All that is needed is to visit http://peak.telecommunity.com/dist/ez_setup.py with the

Re: Python error codes and messages location

2013-05-27 Thread Vito De Tullio
Fábio Santos wrote: Speaking of PEPs and exceptions. When do we get localized exceptions? What do you mean by localized exceptions? Please, tell me it's *NOT* a proposal to send the exception message in the locale language! It is. I think I read it mentioned in python-dev or this

Re: How to: Setuptools

2013-05-27 Thread rusi
On May 28, 9:09 am, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Date: Mon, 27 May 2013 20:54:53 -0700 Subject: Re: How to: Setuptools From: rustompm...@gmail.com [...] Oooff! Talk of using sledgehammers to crack nuts... All that is

[issue18050] embedded interpreter or virtualenv fails with ImportError: cannot import name MAXREPEAT

2013-05-27 Thread Ned Deily
Ned Deily added the comment: After spending some time investigating this issue, I believe that potential upgrade compatibility issues have been introduced by the changes for Issue13169. How critical they are and, in particular, whether they violate our implicit promises of maintenance

[issue18032] set methods should specify whether they consume iterators lazily

2013-05-27 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18032 ___

[issue18032] set methods should specify whether they consume iterators lazily

2013-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: We don't normally document implementation details or the presences or absence of internal optimizations. This gives us freedom to change the implementation and it allows freedom for other implementations (such as Jython, IronPython, and PyPy) to make

[issue1747670] Limiting data copy in xmlrpclib

2013-05-27 Thread Gael Le Mignot
Gael Le Mignot added the comment: It's not something that can be easily benched because it depends a lot of the use case. If some conditions are present (big amount of data sent to XML-RPC, the XML-RPC server taking a long time to answer, end either Python giving back the memory to the OS or

[issue18047] Descriptors get invoked in old-style objects and classes

2013-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: IMO nothing should change here (either the docs or the implementation). The OP has observed an implementation detail of old-style classes (which were reimplemented in Python 2.2 using descriptor logic instead of their former hard-wired behaviors).

[issue1747670] Limiting data copy in xmlrpclib

2013-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it would be nice if you provided an example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1747670 ___

[issue18069] Subprocess picks the wrong executable on Windows

2013-05-27 Thread berdario
berdario added the comment: I found out what's the problem, from the CreateProcess docs: http://msdn.microsoft.com/en-us/library/ms682425.aspx If the file name does not contain a directory path, the system searches for the executable file in the following sequence: The directory from which

[issue672115] Assignment to __bases__ of direct object subclasses

2013-05-27 Thread Łukasz Langa
Changes by Łukasz Langa luk...@langa.pl: -- versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue672115 ___

[issue672115] Assignment to __bases__ of direct object subclasses

2013-05-27 Thread Łukasz Langa
Changes by Łukasz Langa luk...@langa.pl: -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue672115 ___ ___ Python-bugs-list

[issue18050] embedded interpreter or virtualenv fails with ImportError: cannot import name MAXREPEAT

2013-05-27 Thread Julian Berman
Changes by Julian Berman julian+python@grayvines.com: -- nosy: +Julian ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18050 ___ ___

[issue18050] embedded interpreter or virtualenv fails with ImportError: cannot import name MAXREPEAT

2013-05-27 Thread Samuel John
Samuel John added the comment: Ned, incredibly helpful description. Thanks for investigating! I have nothing to add to that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18050 ___

[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2013-05-27 Thread Ed Maste
Changes by Ed Maste carpedd...@gmail.com: -- nosy: +Ed.Maste ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15745 ___ ___ Python-bugs-list mailing

[issue18070] change importlib.util.module_for_loader to unconditionally set attributes

2013-05-27 Thread Brett Cannon
New submission from Brett Cannon: importlib.util.module_for_loader (as well as set_package and set_loader) only set those attributes either when they are not already set or when the module is new. I realized this is a problem as it means a reload won't work the way one might expect. I want

[issue18071] _osx_support compiler_fixup

2013-05-27 Thread Samuel John
New submission from Samuel John: In the `_osx_support.py` module, there seems to be a bug in the method `compiler_fixup` which occurs if * the `customize_compiler` method from `distutils/sysconfig` has been called and after that * `_compile` from `distutils/unixcompiler.py` is called. The

[issue18071] _osx_support compiler_fixup

2013-05-27 Thread Samuel John
Samuel John added the comment: The symptom for the end-user looks kind of weird: running build_ext building 'Cython.Plex.Scanners' extension / A p p l i c a t i o n s / X c o d e . a p p / C o n t e n t s / D e v e l o p e r / T o o l c h a i n s / X c o d e D e f a u l t . x c t o o l c h

  1   2   >