Re: Article on the future of Python

2012-09-25 Thread wxjmfauth
Le mercredi 26 septembre 2012 01:34:01 UTC+2, 8 Dihedral a écrit : > Grant Edwards於 2012年9月26日星期三UTC+8上午2時25分31秒寫道: > > > On 2012-09-25, Martin P. Hellwig wrote: > > > > > > > On Tuesday, 25 September 2012 09:14:27 UTC+1, Mark Lawrence wrote: > > > > > > >> Hi all, > > > > > > >> >

Re: google api and oauth2

2012-09-25 Thread Demian Brecht
> > > If you are writing a desktop application, read this: > https://developers.google.com/accounts/docs/OAuth2#clientside You mean https://developers.google.com/accounts/docs/OAuth2#installed? Your link discusses client side browser implementations. I'd be curious to know the shortcomings of sa

Re: Article on the future of Python

2012-09-25 Thread Paul Rubin
Chris Angelico writes: > That is true, but the concept is still around - that you can write > your code in some other language and compile to js. http://www.haskell.org/haskellwiki/The_JavaScript_Problem -- http://mail.python.org/mailman/listinfo/python-list

Re: Article on the future of Python

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 3:16 PM, Steven D'Aprano wrote: > On Wed, 26 Sep 2012 14:10:28 +1000, Chris Angelico wrote: > >> The flip side to node.js is pyjs. > > After the ham-fisted, nasty way pyjamas project was hijacked this year, > I'm not entirely sure I'd want to touch it with a fifty-foot pole

Re: google api and oauth2

2012-09-25 Thread Kushal Kumaran
(making no attempt to fix messed up quoting, please take a look at your mail client configuration) On Wed, Sep 26, 2012 at 1:52 AM, Littlefield, Tyler wrote: > On 9/25/2012 2:05 PM, Demian Brecht wrote: > > This is a shameless plug, but if you want a much easier to understand method > of accessin

Re: Article on the future of Python

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 10:54 AM, Steven D'Aprano wrote: > SQL? ... it's time to sell your shares in Oracle. Ehh, I wouldn't be investing in Oracle, but that's more because I think free RDBMSes like PostgreSQL outshine it. And this is even more true of MS SQL Server - this last week I've been res

Re: Who's laughing at my responses, and who's not?

2012-09-25 Thread Ben Finney
Dwight Hutto writes: > It's a little guy talk, and most seem to be guys. Potty mouth is not “guy talk”, and sexism is not welcome here. -- \ “The opposite of a correct statement is a false statement. But | `\ the opposite of a profound truth may well be another profound | _o__)

Re: Stop feeding the trolls (Was: which a is used?)

2012-09-25 Thread David Robinow
On Tue, Sep 25, 2012 at 9:53 AM, D'Arcy Cain wrote: > ... > Now if only people would stop feeding the troll, those of us who have > already *plonked* him can stop seeing his ramblings in the responses. I'm hating myself for jumping in to this nonsense, but ... +1 -- http://mail.python.org/mailma

Re: Article on the future of Python

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 18:25:30 +, Grant Edwards wrote: > On 2012-09-25, Martin P. Hellwig wrote: >> On Tuesday, 25 September 2012 09:14:27 UTC+1, Mark Lawrence wrote: >>> Hi all, >>> >>> I though this might be of interest. >>> http://www.ironfroggy.com/software/i-am-worried-about-the-future-o

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Oscar Benjamin
On 26 September 2012 00:35, Tim Chase wrote: > On 09/25/12 17:55, Oscar Benjamin wrote: > > On 25 September 2012 23:10, Tim Chase > wrote: > >> If tuples provide a savings but you find them opaque, you might also > >> consider named-tuples for clarity. > > > > Do they have the same memory usage?

Re: Article on the future of Python

2012-09-25 Thread 88888 Dihedral
Grant Edwards於 2012年9月26日星期三UTC+8上午2時25分31秒寫道: > On 2012-09-25, Martin P. Hellwig wrote: > > > On Tuesday, 25 September 2012 09:14:27 UTC+1, Mark Lawrence wrote: > > >> Hi all, > > >> > > >> I though this might be of interest. > > >> http://www.ironfroggy.com/software/i-am-worried-about-the

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Tim Chase
On 09/25/12 17:55, Oscar Benjamin wrote: > On 25 September 2012 23:10, Tim Chase wrote: >> If tuples provide a savings but you find them opaque, you might also >> consider named-tuples for clarity. > > Do they have the same memory usage? > > Since tuples don't have a per-instance __dict__, I'd e

Re: Need to archive a MySQL database using a python script

2012-09-25 Thread Oscar Benjamin
On 26 September 2012 00:17, wrote: > Python Users Group, > > I need to archive a MySQL database using a python script. > I found a good example at: https://gist.github.com/3175221 > > The following line executes however, the archive file is empty. > > os.popen("mysqldump -u %s -p%s -h %s -e --opt

Need to archive a MySQL database using a python script

2012-09-25 Thread bruceg113355
Python Users Group, I need to archive a MySQL database using a python script. I found a good example at: https://gist.github.com/3175221 The following line executes however, the archive file is empty. os.popen("mysqldump -u %s -p%s -h %s -e --opt -c %s | gzip -c > %s.gz" % (user,p

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 23:10, Tim Chase wrote: > On 09/25/12 16:17, Oscar Benjamin wrote: > > I don't know whether it would be better or worse but it might be > > worth seeing what happens if you replace the FileContext objects > > with tuples. > > If tuples provide a savings but you find them opaq

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 23:09, Ian Kelly wrote: > On Tue, Sep 25, 2012 at 12:17 PM, Oscar Benjamin > wrote: > > Also I think lambda functions might be able to keep the frame alive. Are > > they by any chance being created in a function that is called in a loop? > > I'm pretty sure they don't. Clos

Re: How to limit CPU usage in Python

2012-09-25 Thread 88888 Dihedral
DPalao於 2012年9月25日星期二UTC+8下午11時13分54秒寫道: > On Jueves septiembre 20 2012 11:12:44 Rolando Cañer Roblejo escribió: > > > Hi all, > > > > > > Is it possible for me to put a limit in the amount of processor usage (% > > > CPU) that my current python script is using? Is there any module useful > >

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Ian Kelly
On Tue, Sep 25, 2012 at 12:17 PM, Oscar Benjamin wrote: > Also I think lambda functions might be able to keep the frame alive. Are > they by any chance being created in a function that is called in a loop? I'm pretty sure they don't. Closures don't keep a reference to the calling frame, only to

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Tim Chase
On 09/25/12 16:17, Oscar Benjamin wrote: > I don't know whether it would be better or worse but it might be > worth seeing what happens if you replace the FileContext objects > with tuples. If tuples provide a savings but you find them opaque, you might also consider named-tuples for clarity. -tk

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Junkshops
On 9/25/2012 2:17 PM, Oscar Benjamin wrote: I don't know whether it would be better or worse but it might be worth seeing what happens if you replace the FileContext objects with tuples. I originally used a string, and it was slightly better since you don't have the object overhead, but I wanted

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 21:26, Junkshops wrote: > On 9/25/2012 11:17 AM, Oscar Benjamin wrote: > > On 25 September 2012 19:08, Junkshops wrote: > >> >> In [38]: mpef._ustore._store >> Out[38]: defaultdict(, {'Measurement': >> {'8991c2dc67a49b909918477ee4efd767': >> , >> '7b38b429230f00fe4731e60419

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Junkshops
On 9/25/2012 11:50 AM, Dave Angel wrote: I suspect that heapy has some limitation in its reporting, and that's what the discrepancy. That would be my first suspicion as well - except that heapy's results agree so well with what I expect, and I can't think of any reason I'd be using 10x more m

Re: data attributes override method attributes?

2012-09-25 Thread Terry Reedy
On 9/25/2012 4:07 PM, Ian Kelly wrote: On Tue, Sep 25, 2012 at 1:58 PM, Terry Reedy wrote: On 9/25/2012 11:03 AM, Chris Angelico wrote: Instance attributes override (shadow) class attributes. except for (some? all?) special methods Those names are shadowed too. If you call foo.__len__()

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Junkshops
On 9/25/2012 11:17 AM, Oscar Benjamin wrote: On 25 September 2012 19:08, Junkshops > wrote: In [38]: mpef._ustore._store Out[38]: defaultdict(, {'Measurement': {'8991c2dc67a49b909918477ee4efd767': , '7b38b429230f00fe4731e60419e92346': , 'b53531471

Re: google api and oauth2

2012-09-25 Thread Littlefield, Tyler
On 9/25/2012 2:05 PM, Demian Brecht wrote: This is a shameless plug, but if you want a much easier to understand method of accessing protected resources via OAuth2, I have a 55 LOC client implementation with docs and examples here:https://github.com/demianbrecht/sanction (Google is one of the

Re: data attributes override method attributes?

2012-09-25 Thread Terry Reedy
On 9/25/2012 10:54 AM, Peter Otten wrote: alex23 wrote: On Sep 26, 12:08 am, Peter Otten <__pete...@web.de> wrote: Jayden wrote: In the Python Tutorial, Section 9.4, it is said that "Data attributes override method attributes with the same name." The tutorial is wrong here. That should b

Re: data attributes override method attributes?

2012-09-25 Thread Ian Kelly
On Tue, Sep 25, 2012 at 1:58 PM, Terry Reedy wrote: > On 9/25/2012 11:03 AM, Chris Angelico wrote: >> Instance attributes override (shadow) class attributes. > > > except for (some? all?) special methods Those names are shadowed too. If you call foo.__len__() and the name is bound on the instanc

Re: data attributes override method attributes?

2012-09-25 Thread Thomas Rachel
Am 25.09.2012 16:08 schrieb Peter Otten: Jayden wrote: In the Python Tutorial, Section 9.4, it is said that "Data attributes override method attributes with the same name." The tutorial is wrong here. That should be "Instance attributes override class attributes with the same name." I jum

Re: google api and oauth2

2012-09-25 Thread Demian Brecht
This is a shameless plug, but if you want a much easier to understand method of accessing protected resources via OAuth2, I have a 55 LOC client implementation with docs and examples here: https://github.com/demianbrecht/sanction (Google is one of the tested providers with an access example). Are

Re: data attributes override method attributes?

2012-09-25 Thread Terry Reedy
On 9/25/2012 11:03 AM, Chris Angelico wrote: On Wed, Sep 26, 2012 at 12:54 AM, Peter Otten <__pete...@web.de> wrote: To me "Data attributes override method attributes with the same name" implies that data attributes take precedence over method attributes, not that they replace them only when t

Re: python file API

2012-09-25 Thread Thomas Rachel
Am 25.09.2012 09:28 schrieb Steven D'Aprano: The whole concept is incomplete at one place: self.seek(10, 2) seeks beyond EOF, potentially creating a sparse file. This is a thing you cannot achieve. On the contrary, since the pos attribute is just a wrapper around seek, you can seek beyond EOF

google api and oauth2

2012-09-25 Thread Littlefield, Tyler
Hello all: I've been trying to figure out the oauth2client part of google's api, and I am really confused. It shows a flow, and even with the client flow, you need a redirect uri. This isn't important because I just want to get both an access and refresh token. Has anyone had any experience wi

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Dave Angel
On 09/25/2012 01:39 PM, Junkshops wrote: Procedural point: I know you're trying to conform to the standard that this mailing list uses, but you're off a little, and it's distracting. It's also probably more work for you, and certainly for us. You need an attribution in front of the quoted portio

Re: new-style class or old-style class?

2012-09-25 Thread Mark Lawrence
On 25/09/2012 17:20, Steven D'Aprano wrote: On Tue, 25 Sep 2012 07:44:04 -0700, Jayden wrote: In learning Python, I found there are two types of classes? Which one are widely used in new Python code? New-style classes. Is the new-style much better than old-style? Yes. Always use new-styl

Re: Article on the future of Python

2012-09-25 Thread Grant Edwards
On 2012-09-25, Martin P. Hellwig wrote: > On Tuesday, 25 September 2012 09:14:27 UTC+1, Mark Lawrence wrote: >> Hi all, >> >> I though this might be of interest. >> http://www.ironfroggy.com/software/i-am-worried-about-the-future-of-python > I glanced over the article but it seems to me another

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 19:08, Junkshops wrote: > > Can you give an example of how these data structures look after reading > only the first 5 lines? > > Sure, here you go: > > In [38]: mpef._ustore._store > Out[38]: defaultdict(, {'Measurement': > {'8991c2dc67a49b909918477ee4efd767': > , > '7b38b4

Re: How to export a logging level?

2012-09-25 Thread Vincent Vande Vyvre
Le 25/09/12 19:47, Jean-Michel Pichavant a écrit : > - Original Message - >> In my application I import a module and I want to set the same >> logging >> level >> as the main app to this module. >> >> I've tried this code >> >> main.py >> >> import logging >> logger = logging.getLogger(__na

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Junkshops
Can you give an example of how these data structures look after reading only the first 5 lines? Sure, here you go: In [38]: mpef._ustore._store Out[38]: defaultdict(, {'Measurement': {'8991c2dc67a49b909918477ee4efd767': , '7b38b429230f00fe4731e60419e92346': , 'b53531471b261c44d52f651add64

Re: How to export a logging level?

2012-09-25 Thread Jean-Michel Pichavant
- Original Message - > In my application I import a module and I want to set the same > logging > level > as the main app to this module. > > I've tried this code > > main.py > > import logging > logger = logging.getLogger(__name__) > lvl = logging.DEBUG > LOG_FORMAT = "%(asctime)-6s %(l

Re: How to export a logging level?

2012-09-25 Thread Vincent Vande Vyvre
Le 25/09/12 19:01, Peter Otten a écrit : > Vincent Vande Vyvre wrote: > >> In my application I import a module and I want to set the same logging >> level as the main app to this module. > Isn't that the default? If you set the logging level with basicConfig() that > level should be applied to all

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Junkshops
I'm a bit surprised you aren't beyond the 2gb limit, just with the structures you describe for the file. You do realize that each object has quite a few bytes of overhead, so it's not surprising to use several times the size of a file, to store the file in an organized way. I did some back of the

Re: Article on the future of Python

2012-09-25 Thread Paul Rubin
Kevin Walzer writes: > language, but it's another thing entirely to call Python the One > Language to Rule Them All. (That's C, because all other languages are > implemented in it. :-) ) I got into a discussion about that in another newsgroup and noticed that C seems to have been a 20th-century l

Re: How to export a logging level?

2012-09-25 Thread Peter Otten
Vincent Vande Vyvre wrote: > In my application I import a module and I want to set the same logging > level as the main app to this module. Isn't that the default? If you set the logging level with basicConfig() that level should be applied to all messages. -- http://mail.python.org/mailman/

Re: new-style class or old-style class?

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 07:44:04 -0700, Jayden wrote: > In learning Python, I found there are two types of classes? Which one > are widely used in new Python code? New-style classes. > Is the new-style much better than old-style? Yes. Always use new-style classes, unless you have some specific re

How to export a logging level?

2012-09-25 Thread Vincent Vande Vyvre
In my application I import a module and I want to set the same logging level as the main app to this module. I've tried this code main.py import logging logger = logging.getLogger(__name__) lvl = logging.DEBUG LOG_FORMAT = "%(asctime)-6s %(levelname)s: %(name)s - %(message)s" logging.basicConfig

Re: python file API

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 2:07 AM, Dennis Lee Bieber wrote: > f.pos += delta > > would be a "seek.set" and with a naive driver might trigger a rewind to > the start of the tape followed by a seek to the absolute position, > whereas the seek from current location would only move the tape by t

Re: Article on the future of Python

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 09:26:19 -0400, Kevin Walzer wrote: > On 9/25/12 4:15 AM, Mark Lawrence wrote: >> Hi all, >> >> I though this might be of interest. >> >> http://www.ironfroggy.com/software/i-am-worried-about-the-future-of- >> python >> >> > Interesting article, but the comments of those who sa

Re: gracious responses

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 12:54:05 +0100, Mark Lawrence wrote: > Well thank goodness for that. Of course the person to whom you've > alluded has been defended over on the tutor mailing list, seriously, and > as I've said elsewhere after referring to my family as pigs!!! Since pigs are at least as inte

Re: data attributes override method attributes?

2012-09-25 Thread Ulrich Eckhardt
Am 25.09.2012 16:11, schrieb alex23: On Sep 26, 12:08 am, Peter Otten <__pete...@web.de> wrote: Jayden wrote: In the Python Tutorial, Section 9.4, it is said that "Data attributes override method attributes with the same name." The tutorial is wrong here. That should be "Instance attribut

Re: How to limit CPU usage in Python

2012-09-25 Thread DPalao
On Jueves septiembre 20 2012 11:12:44 Rolando Cañer Roblejo escribió: > Hi all, > > Is it possible for me to put a limit in the amount of processor usage (% > CPU) that my current python script is using? Is there any module useful > for this task? I saw Resource module but I think it is not the mo

Re: data attributes override method attributes?

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 12:54 AM, Peter Otten <__pete...@web.de> wrote: > To me > > "Data attributes override method attributes with the same name" > > implies that data attributes take precedence over method attributes, not > that they replace them only when there is an assignment of data after th

Re: new-style class or old-style class?

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 12:44 AM, Jayden wrote: > In learning Python, I found there are two types of classes? Which one are > widely used in new Python code? Is the new-style much better than old-style? > Thanks!! Definitely go with new-style. In Python 3, old-style classes aren't supported, an

Re: new-style class or old-style class?

2012-09-25 Thread Littlefield, Tyler
On 9/25/2012 8:44 AM, Jayden wrote: In learning Python, I found there are two types of classes? Which one are widely used in new Python code? Is the new-style much better than old-style? Thanks!! Perhaps this is useful: http://docs.python.org/reference/datamodel.html It's 3.3 I think. -- Ta

Re: data attributes override method attributes?

2012-09-25 Thread Peter Otten
alex23 wrote: > On Sep 26, 12:08 am, Peter Otten <__pete...@web.de> wrote: >> Jayden wrote: >> > In the Python Tutorial, Section 9.4, it is said that >> >> > "Data attributes override method attributes with the same name." >> >> The tutorial is wrong here. That should be >> >> "Instance attributes

new-style class or old-style class?

2012-09-25 Thread Jayden
In learning Python, I found there are two types of classes? Which one are widely used in new Python code? Is the new-style much better than old-style? Thanks!! -- http://mail.python.org/mailman/listinfo/python-list

Re: For Counter Variable

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 12:19 AM, Steven D'Aprano wrote: > On Tue, 25 Sep 2012 11:16:40 +0100, Mark Lawrence wrote: > >> On 25/09/2012 10:53, Chris Rebert wrote: >> >> [snip] >> >>> Well, the PSU might, except they emphatically do not exist... >> >> I know that they exist > > You are delusional. T

Re: Who's laughing at my responses, and who's not?

2012-09-25 Thread Ramchandra Apte
On Tuesday, 25 September 2012 10:40:02 UTC+5:30, Terry Reedy wrote: > On 9/25/2012 12:43 AM, Dwight Hutto wrote: > > > It sounds pretentious, but over the past several days, I've been > > > slammed on every post almost. All because of an argument over me not > > > posting a little context in a

Re: data attributes override method attributes?

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 06:41:43 -0700, Jayden wrote: > Dear All, > > In the Python Tutorial, Section 9.4, it is said that > > "Data attributes override method attributes with the same name." > > But in my testing as follows: > > #Begin > class A: > i = 10 > def i(): > pr

Re: For Counter Variable

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 11:16:40 +0100, Mark Lawrence wrote: > On 25/09/2012 10:53, Chris Rebert wrote: > > [snip] > >> Well, the PSU might, except they emphatically do not exist... > > I know that they exist You are delusional. The PSU certainly do not exist and it is a myth that they -- ht

Re: data attributes override method attributes?

2012-09-25 Thread alex23
On Sep 26, 12:08 am, Peter Otten <__pete...@web.de> wrote: > Jayden wrote: > > In the Python Tutorial, Section 9.4, it is said that > > > "Data attributes override method attributes with the same name." > > The tutorial is wrong here. That should be > > "Instance attributes override class attribute

Re: data attributes override method attributes?

2012-09-25 Thread Peter Otten
Jayden wrote: > In the Python Tutorial, Section 9.4, it is said that > > "Data attributes override method attributes with the same name." The tutorial is wrong here. That should be "Instance attributes override class attributes with the same name." As methods are usually defined in the class a

Re: python file API

2012-09-25 Thread Grant Edwards
On 2012-09-25, Dennis Lee Bieber wrote: > On Tue, 25 Sep 2012 08:22:05 +0200, Ulrich Eckhardt > declaimed the following in > gmane.comp.python.general: > >> Am 24.09.2012 23:49, schrieb Dave Angel: >> > And what approach would you use for positioning relative to >> > end-of-file? That's currently

Re: Python 3 crashes with 'Py_Initialize: can't initialize sys standard streams' + 'EOFError: EOF read where not expected'

2012-09-25 Thread Robison Santos
This problem does not happen very often, but when it happen is only on system startup, and I couldn't reproduce by starting by hand. My startup script tries to initiate a lot of services in sequence (ruby, java, C and python), but does not do anything with stdio streams, at least not directly. At

Stop feeding the trolls (Was: which a is used?)

2012-09-25 Thread D'Arcy Cain
On Tue, 25 Sep 2012 08:44:18 +0100 Mark Lawrence wrote: > On 25/09/2012 06:07, Thomas Rachel wrote: > > Am 25.09.2012 04:37 schrieb Dwight Hutto: [...usual nonsense] > someone had the audacity to protect his stance. I am sure that people > have seen enough of his behaviour in the last few hours

Re: Python 3 crashes with 'Py_Initialize: can't initialize sys standard streams' + 'EOFError: EOF read where not expected'

2012-09-25 Thread Robison Santos
I'm using python3.2.1 on Enterprise Linux Server release 5.3 (Carthage). I'm starting my apps calling python3 file.py I have a script that runs on system startup executing my python scripts. Any other info you need? Thanks so far, Robison On Tue, Sep 25, 2012 at 9:49 AM, Oscar Benjamin wrot

Re: Python 3 crashes with 'Py_Initialize: can't initialize sys standard streams' + 'EOFError: EOF read where not expected'

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 14:56, Robison Santos wrote: > I'm using python3.2.1 > on Enterprise Linux Server release 5.3 (Carthage). > > I'm starting my apps calling python3 file.py > > I have a script that runs on system startup executing my python scripts. > What happens if you just run the script

Re: Article on the future of Python

2012-09-25 Thread Martin P. Hellwig
On Tuesday, 25 September 2012 09:14:27 UTC+1, Mark Lawrence wrote: > Hi all, > > I though this might be of interest. > http://www.ironfroggy.com/software/i-am-worried-about-the-future-of-python > -- > > Cheers. > Mark Lawrence. I glanced over the article but it seems to me another 'I am afraid

Re: data attributes override method attributes?

2012-09-25 Thread alex23
On Sep 25, 11:41 pm, Jayden wrote: > Dear All, > > In the Python Tutorial, Section 9.4, it is said that > > "Data attributes override method attributes with the same name." > > But in my testing as follows: > > #Begin > class A: >         i = 10 >         def i(): >                 print 'i' > > A

data attributes override method attributes?

2012-09-25 Thread Jayden
Dear All, In the Python Tutorial, Section 9.4, it is said that "Data attributes override method attributes with the same name." But in my testing as follows: #Begin class A: i = 10 def i(): print 'i' A.i #End I think A.i should be the number 10 but it is th

Re: Article on the future of Python

2012-09-25 Thread Roy Smith
In article , Kevin Walzer wrote: > the comments of those who say "the only > language I need to know is Python" strike me as a bit limited. I have been convinced that "X is the only language I need to know", for many different values of X over the years. -- http://mail.python.org/mailman/lis

Re: Article on the future of Python

2012-09-25 Thread Kevin Walzer
On 9/25/12 4:15 AM, Mark Lawrence wrote: Hi all, I though this might be of interest. http://www.ironfroggy.com/software/i-am-worried-about-the-future-of-python Interesting article, but the comments of those who say "the only language I need to know is Python" strike me as a bit limited. If

RE: Fastest web framework

2012-09-25 Thread Andriy Kornatskyy
Tarek, With all respect, running benchmark on something that has sleeps, etc is pretty far from real world use case. So I went a little bit different way. Here is a live demo (a semi real world web application) that comes with wheezy.web framework as a template: http://wheezy.pythonanywhere.c

Re: which a is used?

2012-09-25 Thread Colin J. Williams
On 24/09/2012 10:14 PM, alex23 wrote: On Sep 25, 11:13 am, Dwight Hutto wrote: bitch I honestly could not care less what you think about me, but don't use that term. This isn't a boys' club and we don't need your hurt ego driving people away from here. +1 -- http://mail.python.org/mailman/l

Re: gracious responses

2012-09-25 Thread Mark Lawrence
On 25/09/2012 13:44, alex23 wrote: On Sep 25, 9:39 pm, Tim Chase wrote: Mostly instigated by one person with a particularly quick trigger, vitriolic tongue, and a disregard for pythonic code. I'm sorry. I'll get me coat. Oi, back of the queue if you don't mind :) -- Cheers. Mark Lawrence

Re: Python 3 crashes with 'Py_Initialize: can't initialize sys standard streams' + 'EOFError: EOF read where not expected'

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 12:32, Robison Santos wrote: > Hello guys, > > I'm having a very serious problem with my python3 environment and I'm > completely lost about the problem. > In my server I run two python apps (custom apps) during system start time, > and sometime when the apps are starting a c

Re: which a is used?

2012-09-25 Thread alex23
On Sep 25, 3:30 pm, Dwight Hutto wrote: > You'd have to read the other posts. And remember that some of these > names are A.K.A.'s, they ask respond, and befriend another name > through another proxy. You've actively accused me of this several times. If you have evidence that there's sockpuppetin

Re: gracious responses (was: Memory usage per top 10x usage per heapy)

2012-09-25 Thread alex23
On Sep 25, 9:39 pm, Tim Chase wrote: > Mostly instigated by one person with a > particularly quick trigger, vitriolic tongue, and a disregard for > pythonic code. I'm sorry. I'll get me coat. -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-09-25 Thread alex23
On Sep 25, 6:25 pm, Gelonida N wrote: > So it seems to be safe to use either Christoph' binary PIL distribution > or to use Pillow. > > The fact, that pillow is accessable via PyPi / easy_install / PIP pushes > me slightly towards pillow. > I assume it's best to uninstall PIL before installing p

RE: Fastest template engine

2012-09-25 Thread Andriy Kornatskyy
The post has been updated due to comment from Makoto Kuwata (author of tenjin) related to use of optimized version of HTML escape in tenjin templates. I believe Mako and Jinja2 both are using MarkupSafe which serves exactly for that purpose there. The test assert the output is unicode. http:/

Re: gracious responses

2012-09-25 Thread Mark Lawrence
On 25/09/2012 12:40, Tim Chase wrote: On 09/25/12 06:10, Mark Lawrence wrote: On 25/09/2012 11:51, Tim Chase wrote: If only other unnamed persons on the list were so gracious rather than turning the flame-dial to 11. Oh heck what have I said this time? You'd *like* to take credit? ;-) Na

Re: gracious responses (was: Memory usage per top 10x usage per heapy)

2012-09-25 Thread Tim Chase
On 09/25/12 06:10, Mark Lawrence wrote: > On 25/09/2012 11:51, Tim Chase wrote: >> If only other unnamed persons on the list were so gracious rather >> than turning the flame-dial to 11. >> > > Oh heck what have I said this time? You'd *like* to take credit? ;-) Nah, not you or any of the regul

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 00:58, Junkshops wrote: > Hi Tim, thanks for the response. > > > - check how you're reading the data: are you iterating over >>the lines a row at a time, or are you using >>.read()/.readlines() to pull in the whole file and then >>operate on that? >> > I'm using

Re: python file API

2012-09-25 Thread Thomas Rachel
Am 25.09.2012 10:13 schrieb Dennis Lee Bieber: Or some bit setting registers, like on ATxmega: OUT = 0x10 sets bit 7 and clears all others, OUTSET = 0x10 only sets bit 7, OUTTGL = 0x10 toggles it and OUTCLR = 0x10 clears it. Umpfzg. s/bit 7/bit 4/. I don't think I'd want to work with

Python 3 crashes with 'Py_Initialize: can't initialize sys standard streams' + 'EOFError: EOF read where not expected'

2012-09-25 Thread Robison Santos
Hello guys, I'm having a very serious problem with my python3 environment and I'm completely lost about the problem. In my server I run two python apps (custom apps) during system start time, and sometime when the apps are starting a corefile is generated for one one them (not always the same) and

Re: For Counter Variable

2012-09-25 Thread Mark Lawrence
On 25/09/2012 11:57, Tim Chase wrote: [snip] Coming from C where just about *nothing* is in the stdlib and Java & PHP where only some core functionalities are in the stdlib, to Python where just the list of modules in the stdlib is humongous, I have to make http://docs.python.org/library/ my f

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Mark Lawrence
On 25/09/2012 11:51, Tim Chase wrote: [snip] If only other unnamed persons on the list were so gracious rather than turning the flame-dial to 11. Oh heck what have I said this time? -tkc -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: python file API

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 11:51, Mark Lawrence wrote: > On 25/09/2012 11:38, Oscar Benjamin wrote: > >> On 25 September 2012 08:27, Mark Lawrence >> wrote: >> >> On 25/09/2012 03:32, Mark Adam wrote: >>> >>> On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin wrote: try: > f.

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Dave Angel
On 09/25/2012 12:21 AM, Junkshops wrote: >> Just curious; which is it, two million lines, or half a million bytes? > > Sorry, that should've been a 500Mb, 2M line file. > >> which machine is 2gb, the Windows machine, or the VM? > VM. Winders is 4gb. > >> ...but I would point out that just beca

RE: Fastest web framework

2012-09-25 Thread Andriy Kornatskyy
Alec While performing benchmark for web2py I noticed a memory leak. It constantly grows and never release it... Thanks. Andriy Kornatskyy > Date: Mon, 24 Sep 2012 17:36:25 +1000 > Subject: Re: Fastest web framework > From: alec.tayl...@gmail.com > To: andri

Re: For Counter Variable

2012-09-25 Thread Tim Chase
On 09/25/12 00:53, Thomas Rachel wrote: > Am 25.09.2012 01:39 schrieb Dwight Hutto: >> You don't always know all the built-ins, so the builtin is >> simpler, but knowing how to code it yourself is the priority of >> learning to code in a higher level language, which should be >> simpler to the user

RE: Fastest web framework

2012-09-25 Thread Andriy Kornatskyy
The post has been updated with two more frameworks (per community request): tornado and web2py. Comments or suggestions are welcome. Thanks. Andriy Kornatskyy > From: andriy.kornats...@live.com > To: python-list@python.org > Subject: Fastest web frame

Re: Article on the future of Python

2012-09-25 Thread Michael Harleman
That's a very interesting article.  It is encouraging to me, from reading many of the comments made, that I have chosen a good language to spend time learning despite the misgivings offered by the author.  I think Python does have a future in mobile markets as it is being used by some today ac

Re: python file API

2012-09-25 Thread Mark Lawrence
On 25/09/2012 11:38, Oscar Benjamin wrote: On 25 September 2012 08:27, Mark Lawrence wrote: On 25/09/2012 03:32, Mark Adam wrote: On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin wrote: try: f.pos = 256 except IOError: print('Unseekable file') Something along these lines ht

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Tim Chase
On 09/24/12 23:41, Dennis Lee Bieber wrote: > On Mon, 24 Sep 2012 14:59:47 -0700 (PDT), MrsEntity > declaimed the following in > gmane.comp.python.general: > >> Hi all, >> >> I'm working on some code that parses a 500kb, 2M line file line by line and >> saves, per line, some derived strings > >

Re: PHP vs. Python

2012-09-25 Thread Mark Lawrence
On 25/09/2012 11:22, Tejas wrote: How to configure python in apache2 ? So my html embedded code will works. Please follow the instructions that you'll find by searching the web. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: python file API

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 08:27, Mark Lawrence wrote: > On 25/09/2012 03:32, Mark Adam wrote: > >> On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin >> wrote: >> >>> try: >>> f.pos = 256 >>> except IOError: >>> print('Unseekable file') >> >> > Something along these lines http://docs.python.or

Re: PHP vs. Python

2012-09-25 Thread Tejas
How to configure python in apache2 ? So my html embedded code will works. -- http://mail.python.org/mailman/listinfo/python-list

Re: For Counter Variable

2012-09-25 Thread Mark Lawrence
On 25/09/2012 10:53, Chris Rebert wrote: [snip] Well, the PSU might, except they emphatically do not exist... I know that they exist but if I admit to it I'd have to shoot myself. If I can get the bra off of the debutante that is. Cheers, Chris -- PEP-401 compliant -- Cheers. Mark L

Re: PHP vs. Python

2012-09-25 Thread andrea crotti
2012/9/25 : > On Thursday, 23 December 2004 03:33:36 UTC+5:30, (unknown) wrote: >> Anyone know which is faster? I'm a PHP programmer but considering >> getting into Python ... did searches on Google but didn't turn much up >> on this. >> >> Thanks! >> Stephen > > > Here some helpful gudance. > >

Re: python file API

2012-09-25 Thread Oscar Benjamin
On Sep 25, 2012 9:28 AM, "Dennis Lee Bieber" wrote: > > On Tue, 25 Sep 2012 08:22:05 +0200, Ulrich Eckhardt > declaimed the following in > gmane.comp.python.general: > > > Am 24.09.2012 23:49, schrieb Dave Angel: > > > And what approach would you use for positioning relative to > > > end-of-file?

  1   2   >