Re: When is overriding __getattr__ is useful?

2013-01-07 Thread Albert Hopkins
On Mon, Jan 7, 2013, at 10:54 AM, Rodrick Brown wrote: Can someone provide an example why one would want to override __getattr__ and __getattribute__ in a class? They're good for cases when you want to provide an attribute-like quality but you don't know the attribute in advance. For

Re: sockobj.connect Errno 13 Permission denied

2013-01-26 Thread Albert Hopkins
On Sat, Jan 26, 2013, at 08:52 AM, Joel Goldstick wrote: On Sat, Jan 26, 2013 at 8:47 AM, Joel Goldstick joel.goldst...@gmail.comwrote: On Sat, Jan 26, 2013 at 6:19 AM, nobody jupiter@gmail.com wrote: Hi, I have a client program Client.py which has a statement of

Re: error in except

2013-02-04 Thread Albert Hopkins
On Mon, Feb 4, 2013, at 04:49 PM, Rodrick Brown wrote: For the life of me I cant figure out why this exception is being thrown. How could I use pdb to debug this? $ python udp_local2.py server File udp_local2.py, line 36 except: ^ SyntaxError: invalid syntax

Re: Best Practice Question

2013-02-05 Thread Albert Hopkins
[...] By the way, did someone ever notice that r'\' fails ? I'm sure there's a reason for that... (python 2.5) Anyone knows ? r'\' SyntaxError: EOL while scanning single-quoted string Even in a raw string, string quotes can be escaped with a backslash, but the backslash remains in the

Re: Is Python programming language?

2013-02-08 Thread Albert Hopkins
On Fri, Feb 8, 2013, at 08:03 AM, gmspro wrote: Hello all, One said, Python is not programming language, rather scripting language, is that true? According to Wikipedia[1] a scripting languages are a subset of programming languages so it goes that any scripting language is, be

Re: how to call shell?

2013-02-12 Thread Albert Hopkins
On Tue, Feb 12, 2013, at 12:12 AM, contro opinion wrote: import os os.system(i=3) 0 os.system(echo $i) 0 why i can't get the value of i ? Whenever you call os.system, a new shell is created and the command is run, system() then waits for the command to complete. You don't see i

Re: AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'

2013-02-14 Thread Albert Hopkins
On Thu, Feb 14, 2013, at 04:39 PM, Dave Angel wrote: [... snip] For those of us using text-based email, the program in this message is totally unreadable. This is a text mailing-list, so please put your email program in text mode, or you'll lose much of your audience. For those of us not

Re: Is Python venerable?

2013-02-20 Thread Albert Hopkins
On Tue, Feb 19, 2013, at 11:10 PM, Gene Heskett wrote: [...] And even us old (78) farts are calling things Kewl now. 78??? Is that the year you were born or the years since you were born? -a -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Newbie

2013-02-24 Thread Albert Hopkins
Most of what gets hung in art galleries these days is far less visually pleasing than well-written code. +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is Ruby on Rails more popular than Django?

2013-03-06 Thread Albert Hopkins
On Wed, Mar 6, 2013, at 02:16 PM, Tim Johnson wrote: I had problems getting django to work on my hostmonster account which is shared hosting and supports fast_cgi but not wsgi. I put that effort on hold for now, as it was just RD for me, but I would welcome you to take a look at

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2008-12-09 Thread Albert Hopkins
New submission from Albert Hopkins [EMAIL PROTECTED]: Say I have module foo.py: def a(x): def b(): x del x If I run foo.py under Python 2.4.4 I get: File foo.py, line 4 del x SyntaxError: can not delete

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2008-12-09 Thread Albert Hopkins
Albert Hopkins [EMAIL PROTECTED] added the comment: Thanks for looking into this. Ok... I applied your patch (actually it does not apply against Python 3.0 so I had to change it manually). Now I'm not sure if this is still an error in the compiler or if it's truly a problem on my end

[issue5380] pty.read raises IOError when slave pty device is closed

2010-03-02 Thread Albert Hopkins
Changes by Albert Hopkins mar...@python.net: -- nosy: +marduk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5380 ___ ___ Python-bugs-list mailing

[issue4608] urllib.request.urlopen does not return an iterable object

2011-04-20 Thread Albert Hopkins
Albert Hopkins mar...@python.net added the comment: This issue appears to persist when the protocol used is FTP: root@tp-db $ cat test.py from urllib.request import urlopen for line in urlopen('ftp://gentoo.osuosl.org/pub/gentoo/releases/'): print(line) break root@tp-db

[issue4608] urllib.request.urlopen does not return an iterable object

2011-04-20 Thread Albert Hopkins
Albert Hopkins mar...@python.net added the comment: Oops, previous example was a directory, but it's the same if the url points to a ftp file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4608

[issue4613] Can't figure out where SyntaxError: can not delete variable 'x' referenced in nested scope us coming from in python shows no traceback

2014-06-26 Thread Albert Hopkins
Albert Hopkins added the comment: You can close this one out. I don't even remember the use case anymore. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4613

<    1   2   3