ANN: eGenix mxODBC 3.2.1 - Python ODBC Database Interface

2012-09-25 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Python ODBC Database Interface Version 3.2.1 mxODBC is our commercially supported Python extension providing

Re: For Counter Variable

2012-09-25 Thread Thomas Rachel
Am 25.09.2012 01:39 schrieb Dwight Hutto: It's not the simpler solution I'm referring to, it's the fact that if you're learning, then you should be able to design the built-in, not just use it. In some simpler cases you are right here. But the fact that you are able to design it doesn't

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

2012-09-25 Thread Kushal Das
On Tue, Sep 25, 2012 at 11:22 AM, Dwight Hutto dwightdhu...@gmail.com wrote: It's a little guy talk, and most seem to be guys. A little, hey buddy, this seems like like bullshit, seems ok around here, and it's a first amendment. First amendment does not apply to all the international people

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

2012-09-25 Thread Ned Deily
In article CA+vVgJWZ6m5gadJAXg8O8-vwdXt7e-zYxwb8r4U=LDnS=nw...@mail.gmail.com, Dwight Hutto dwightdhu...@gmail.com wrote: It's a little guy talk, and most seem to be guys. A little, hey buddy, this seems like like bullshit, seems ok around here, and it's a first amendment. It's not OK around

Re: python file API

2012-09-25 Thread Ulrich Eckhardt
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 done with an optional second parameter to seek() method. Negative indices. ;) Uli -- http://mail.python.org/mailman/listinfo/python-list

Re: python file API

2012-09-25 Thread Mark Lawrence
On 25/09/2012 03:32, Mark Adam wrote: On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: There are many situations where a little bit of attribute access magic is a good thing. However, operations that involve the underlying OS and that are prone to raising

Re: python file API

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 07:25:48 +0200, Thomas Rachel wrote: Am 25.09.2012 04:28 schrieb Steven D'Aprano: By the way, the implementation of this is probably trivial in Python 2.x. Untested: class MyFile(file): @property def pos(self): return self.tell() @pos.setter

Re: For Counter Variable

2012-09-25 Thread Dwight Hutto
By now I think we're in the DNFTT zone. -- Taking a bite yourself there buddy. Hop under the bridge, and comment...it make you a troll, and you're trying to feed yourself with pile on comment from the rest of the under bridge dwellers. -- Best Regards, David Hutto CEO:

ANN: eGenix mxODBC 3.2.1 - Python ODBC Database Interface

2012-09-25 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Python ODBC Database Interface Version 3.2.1 mxODBC is our commercially supported Python extension providing

Re: which a is used?

2012-09-25 Thread Mark Lawrence
On 25/09/2012 06:07, Thomas Rachel wrote: Am 25.09.2012 04:37 schrieb Dwight Hutto: 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. OH. stirrin up shit and can't

Re: For Counter Variable

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 07:53:55 +0200, Thomas Rachel wrote: When learning Python, it often happend me to re-inven the wheel. But as soon as I saw the presence of something I re-wrote, I skipped my re-written version and used the built-in. And me. Not just Python either. The very first piece of

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

2012-09-25 Thread Steven D'Aprano
On Tue, 25 Sep 2012 00:43:18 -0400, Dwight Hutto wrote: It sounds pretentious, but over the past several days, I've been slammed on every post almost. That's a gross exaggeration. Over the last few days you have gotten slammed because you mildly broke etiquette and then, instead of

Re: For Counter Variable

2012-09-25 Thread Chris Angelico
On Tue, Sep 25, 2012 at 11:32 AM, Dwight Hutto dwightdhu...@gmail.com wrote: By now I think we're in the DNFTT zone. -- Taking a bite yourself there buddy. Hop under the bridge, and comment...it make you a troll, and you're trying to feed yourself with pile on comment from the rest of the

Re: For Counter Variable

2012-09-25 Thread Mark Lawrence
On 25/09/2012 08:46, Steven D'Aprano wrote: On Tue, 25 Sep 2012 07:53:55 +0200, Thomas Rachel wrote: When learning Python, it often happend me to re-inven the wheel. But as soon as I saw the presence of something I re-wrote, I skipped my re-written version and used the built-in. And me. Not

Re: Seome kind of unblocking input

2012-09-25 Thread janis . judvaitis
Thanks for reply's. I'll be looking into threading, it seems like right way to go. btw. Why Python developers don't make a wrapper for input() with callback function using threads, so people can easily use nonblocking input? -- http://mail.python.org/mailman/listinfo/python-list

Article on the future of Python

2012-09-25 Thread Mark Lawrence
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. -- http://mail.python.org/mailman/listinfo/python-list

Re: why do this program not fullscreen?

2012-09-25 Thread Vlastimil Brom
2012/9/25 Levi Nie levinie...@gmail.com: the code: import wx app=wx.App() win=wx.Frame(None) win.ShowFullScreen() app.MainLoop() -- http://mail.python.org/mailman/listinfo/python-list Hi, win.ShowFullScreen(True) should work, the boolean parameter appears to be required. hth, vbr --

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

2012-09-25 Thread Gelonida N
On 09/25/2012 01:38 AM, alex23 wrote: On Sep 25, 6:04 am, Gelonida N gelon...@gmail.com wrote: This all does not sound very comforting. Why is there no fix on the official site? Has a bug been logged about the issue? The Plone community keeps a fairly up-to-date fork called Pillow, we've had

random access to video file

2012-09-25 Thread JRV
Hello, Is there a method for randomly accessing a video file in Python / OpenCV ? A kind of fseek which would allow to go directly to frame n ... Cordially, JRV -- http://mail.python.org/mailman/listinfo/python-list

Re: keeping information about players around

2012-09-25 Thread Jean-Michel Pichavant
- Original Message - PHPMyAdmin? Might I ask why? This is a mud, so it's all command based, so that's not even a question, but I'm kind of curious how PHPMyAdmin factors in there. It's a database creation tool from all I've ever seen of it, to define tables. Also, using it requires

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

2012-09-25 Thread Jean-Michel Pichavant
- Original Message - On 9/24/2012 10:43 PM, 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 conversation, that seemed short and chatty. I

Re: For Counter Variable

2012-09-25 Thread wxjmfauth
I wrote my first program on a PDP-8. I discovered Python at release 1.5.? Now years later... I find Python more and more unusable. As an exemple related to this topic, which summarizes a little bit the situation. I just opened my interactive interpreter and produced this: for i in

Re: python file API

2012-09-25 Thread Ian Kelly
On Mon, Sep 24, 2012 at 11:32 PM, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa...@spamschutz.glglgl.de wrote: Am 25.09.2012 00:37 schrieb Ian Kelly: Since ints are immutable, the language specifies that it should be the equivalent of file.pos = file.pos - 100, so it should set the

Re: which a is used?

2012-09-25 Thread Alain Ketterlin
Jayden jayden.s...@gmail.com writes: # Begin a = 1 def f(): print a def g(): a = 20 f() g() #End I think the results should be 20, but it is 1. Would you please tell me why? When python looks at g(), it sees that a variable a is assigned to, and decides it is a local

Re: For Counter Variable

2012-09-25 Thread Mark Lawrence
On 25/09/2012 10:32, wxjmfa...@gmail.com wrote: I wrote my first program on a PDP-8. I discovered Python at release 1.5.? Now years later... I find Python more and more unusable. Dementia is a growing problem for us older people :) As an exemple related to this topic, which summarizes a

Re: For Counter Variable

2012-09-25 Thread Chris Rebert
On Tue, Sep 25, 2012 at 2:46 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 25/09/2012 10:32, wxjmfa...@gmail.com wrote: I wrote my first program on a PDP-8. I discovered Python at release 1.5.? Now years later... I find Python more and more unusable. snip I'm toying more and more with

Re: python file API

2012-09-25 Thread Oscar Benjamin
On Sep 25, 2012 9:28 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 25 Sep 2012 08:22:05 +0200, Ulrich Eckhardt ulrich.eckha...@dominolaser.com declaimed the following in gmane.comp.python.general: Am 24.09.2012 23:49, schrieb Dave Angel: And what approach would you use for

Re: PHP vs. Python

2012-09-25 Thread andrea crotti
2012/9/25 tejas.tank@gmail.com: 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

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

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: python file API

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 08:27, Mark Lawrence breamore...@yahoo.co.uk wrote: On 25/09/2012 03:32, Mark Adam wrote: On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: try: f.pos = 256 except IOError: print('Unseekable file') Something along these

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: 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 junksh...@gmail.com 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

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 breamore...@yahoo.co.uk wrote: On 25/09/2012 03:32, Mark Adam wrote: On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: try: f.pos = 256 except IOError:

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

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

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 of

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:

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? snip 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 because

Re: python file API

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 11:51, Mark Lawrence breamore...@yahoo.co.uk wrote: On 25/09/2012 11:38, Oscar Benjamin wrote: On 25 September 2012 08:27, Mark Lawrence breamore...@yahoo.co.uk wrote: On 25/09/2012 03:32, Mark Adam wrote: On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin

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

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)

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

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 00:58, Junkshops junksh...@gmail.com 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?

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 regulars

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? ;-)

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.

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 gelon...@gmail.com 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

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 python.l...@tim.thechases.com 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: which a is used?

2012-09-25 Thread alex23
On Sep 25, 3:30 pm, Dwight Hutto dwightdhu...@gmail.com 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

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 rwrsan...@gmail.com 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

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 python.l...@tim.thechases.com 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

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 dwightdhu...@gmail.com 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 --

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:

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

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 unbound method A.i #End I think A.i should be the

Re: Article on the future of Python

2012-09-25 Thread Roy Smith
In article k3sbdr$jce$1...@dont-email.me, Kevin Walzer k...@codebykevin.com 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

Re: data attributes override method attributes?

2012-09-25 Thread alex23
On Sep 25, 11:41 pm, Jayden jayden.s...@gmail.com 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

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 this

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 rwrsan...@gmail.com wrote: I'm using python3.2.1 on Enterprise Linux Server release 5.3 (Carthage). I'm starting my apps calling python3 file.py params I have a script that runs on system startup executing my python scripts. What happens if you

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

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 breamore...@yahoo.co.uk 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

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

Re: python file API

2012-09-25 Thread Grant Edwards
On 2012-09-25, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 25 Sep 2012 08:22:05 +0200, Ulrich Eckhardt ulrich.eckha...@dominolaser.com 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

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 and

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 attributes with the

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

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(): print 'i' A.i

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: For Counter Variable

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 12:19 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info 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

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

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

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

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 12:44 AM, Jayden jayden.s...@gmail.com 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

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 the method

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 module

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 attributes

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

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 say the only

Re: python file API

2012-09-25 Thread Chris Angelico
On Wed, Sep 26, 2012 at 2:07 AM, Dennis Lee Bieber wlfr...@ix.netcom.com 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

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

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

Re: Article on the future of Python

2012-09-25 Thread Paul Rubin
Kevin Walzer k...@codebykevin.com 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

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

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: 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 %(levelname)s:

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(type 'dict', {'Measurement': {'8991c2dc67a49b909918477ee4efd767': micropheno.exchangeformat.Exceptions.FileContext object at

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(__name__) lvl =

Re: Memory usage per top 10x usage per heapy

2012-09-25 Thread Oscar Benjamin
On 25 September 2012 19:08, Junkshops junksh...@gmail.com 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(type 'dict', {'Measurement':

Re: Article on the future of Python

2012-09-25 Thread Grant Edwards
On 2012-09-25, Martin P. Hellwig martin.hell...@gmail.com 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

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

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

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

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

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

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

Re: data attributes override method attributes?

2012-09-25 Thread Ian Kelly
On Tue, Sep 25, 2012 at 1:58 PM, Terry Reedy tjre...@udel.edu 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

  1   2   3   >