Re: Python getting stuck
Colin J. Williams wrote: > On 26-Feb-11 18:55 PM, Shanush Premathasarathan wrote: >> When I use cut, copy, paste, and any keyboard shortcuts, Python >> freezes and I am unable to use Python. Please Help as quick as >> possible!!! > What operating system are you using? If it's some kind of Unix, are you using a text console, or X? If X, what window manager? -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: I'm happy with Python 2.5
n00m wrote: > Am I turmoiling your wishful thinking? > You may nourish it till the end of time. Let us cease to nourish those fabled ones who dwell under bridges. -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: python3.2m installed as (additional) binary
andrew cooke wrote: > I just downloaded, built and altinstalled Python3.2 on Linux x64. I noticed > that in /usr/local/bin I have two identical (says diff) binaries called > Python3.2 and Python3.2m. Is this expected? I can find very little > reference to them apart from a short discussion in python-dev where someone > asks if users will be confused by this and Barry Warsaw replies saying that > they won't see them (well, I do!). > > All I did was the usual ./configure; make; sudo make altinstall > > So is this a bug? > > pl6 Python-3.2: ls -l /usr/local/bin/python3.2* > -rwxr-xr-x 2 root root 7368810 2011-02-27 13:03 /usr/local/bin/python3.2 > -rwxr-xr-x 2 root root 7368810 2011-02-27 13:03 /usr/local/bin/python3.2m > -rwxr-xr-x 1 root root1826 2011-02-27 13:03 > /usr/local/bin/python3.2m-config > pl6 Python-3.2: diff /usr/local/bin/python3.2 /usr/local/bin/python3.2m > pl6 Python-3.2: It looks like they're hard links of each other. Try: ls -li /usr/local/bin/python3.2* Are the inode numbers the same? I suspect the "m" name is what gets built and the "no m" is an alias for backwards-compatibility. Not sure why they did the "m", though. -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: python3.2m installed as (additional) binary
Tom Zych wrote: > andrew cooke wrote: >> -rwxr-xr-x 2 root root 7368810 2011-02-27 13:03 /usr/local/bin/python3.2 >> -rwxr-xr-x 2 root root 7368810 2011-02-27 13:03 /usr/local/bin/python3.2m > I suspect the "m" name is what gets built and the "no m" is an alias for > backwards-compatibility. Not sure why they did the "m", though. Ah, this may be it: http://bugs.python.org/issue9807 Search for "build flag". Apparently the "m" indicates that it was compiled with a nonstandard compiler option, or some such; maybe something to do with being on a 64-bit platform. The makefile or configure log may shed some light. -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Lumberjack Song
We all like computers here. No doubt many of us like computer games. And most of us will be at least somewhat familiar with Monty Python. Therefore, I present (drum roll)... http://www.youtube.com/watch?v=Zh-zL-rhUuU (For the Runescape fans out there, this should be quite hilarious. Possibly not as much for those unfamiliar with Runescape...) -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Code Examples
Erik de Castro Lopo wrote: > Why Python? I really can't understand the rush of every man and > his dog to Python. > Its not that I'm a stick in the mud stuck with C and C++, rather > that I used Python for a number of years from 1998 to 2004 and > rejected it in favour of strict statically typed functional > langauges like Ocaml and Haskell. Hmm, if we abused this guy enough for his heresy, do you think he'd say he didn't expect the Spanish Inquisition? Then we could riff on that theme for days :-D -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python 3.2 is excellent, but
jmfauth wrote: > Well, Python (as 3.2) has never reached this level of excellence, but > __pycache__, no, not for me. > > (I feel better now, after I wrote it.) Could you be more specific? :) -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Code Examples
geremy condra wrote: > Ah, so you're looking for an argument. This is abuse, you want room > 12A just down the hall. They have comfy chairs there. No one expects it. -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: I am not able to open IDLE in python on Vista.
Andrea Crotti wrote: > Best solution would be to avoid Windows Vista. s/Vista// There, fixed that for ya. -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: AES Encryption of byte array
On Tue, 01 Mar 2011 14:38 -0500, "Meszaros, Stacy" wrote: > I am very new to python, using it to write a test application. I need > to be able to encrypt part of a byte array (up to 256 bytes where the > first 7 bytes remain plain text) using AES 128 bit CBC encryption. I am > using Python 2.6, can anyone recommend a toolkit or module? I haven't used it, but it looks like this does what you want: http://www.dlitz.net/software/pycrypto/ -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: Checking against NULL will be eliminated?
On Wed, 02 Mar 2011 06:37 -0800, "Carl Banks" wrote: > The larger reason is that boolean evaluation in Python tries to be too > many things: for some types is means "not zero", for some types it > means "empty", and for some types it means "this is a value of this > type as opposed to None". That causes conflicts when more than one of > those tests makes sense for a given type, as it does with Elements. You're right. PEP 4000: Proposing a new, backwards-incompatible version of Python in which boolean evaluation is not so overloaded. Hmm, no, I don't think that will fly. We're stuck with it :( Fortunately there are work-arounds for the cases that matter, as we've seen. Yay Python :) -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: Checking against NULL will be eliminated?
Steven D'Aprano wrote: > Do you realise that "PEP 4000" was Tom Zych being sarcastic? There is no > PEP 4000: Eh, well, maybe 10% sarcastic, 90% facetious. Wasn't trying to give Carl a hard time. -- Tom Zych / freethin...@pobox.com Q: I'm having problems with my Windows software. Will you help me? A: Yes. Go to a DOS prompt and type "format c:". Any problems you are experiencing will cease within a few minutes. -- Hacker Howto -- http://mail.python.org/mailman/listinfo/python-list
Re: Checking against NULL will be eliminated?
Carl Banks wrote: > Perl works deterministically and reliably. In fact, pretty much every > language works deterministically and reliably. Total non-argument. Well, yes. I think the real issue is, how many surprises are waiting to pounce on the unwary developer. C is deterministic and reliable, but full of surprises. Python is generally low in surprises. Using "if " is one place where you do have to think about unintended consequences. -- Tom Zych / freethin...@pobox.com Q: I'm having problems with my Windows software. Will you help me? A: Yes. Go to a DOS prompt and type "format c:". Any problems you are experiencing will cease within a few minutes. -- Hacker Howto -- http://mail.python.org/mailman/listinfo/python-list
Re: Strange occasional marshal error
On Thu, 03 Mar 2011 07:09 -0800, "Graham Stratton" wrote: > Every corruption point occurs exactly three bytes above an extension > point (rounded to the nearest word for the last two). This clearly > isn't a coincidence, but I can't see where there could be a problem. > I'd be grateful for any pointers. The intermittency sounds like a race condition, doesn't it? It might be worthwhile to look into the call that's extending the string and see if it could affect other data. Maybe objects are getting shuffled around? Don't put too much stock in this, I'm just speculating based on a bug I had in a C program years ago. I have no idea how CPython handles these things. -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-list
Re: making a class callable
dude wrote: >>> f = foo("wow") ... >>> However, I always get the "module not callable" error. ... > That was the problem. I was using: > import ohYeah To get that error, I think you must have been importing a module named "foo" as well. Or you would have gotten a NameError instead. -- Tom Zych / freethin...@pobox.com Q: I'm having problems with my Windows software. Will you help me? A: Yes. Go to a DOS prompt and type "format c:". Any problems you are experiencing will cease within a few minutes. -- Hacker Howto -- http://mail.python.org/mailman/listinfo/python-list
Re: question about endswith()
Ethan Furman wrote: > What is extensions? A string or a tuple? I'm guessing a string, > because then you're looking at: > > --> filename.endswith(x) for x in 'hdf5' > > which is the same as > > --> filename.endswith('h') or filename.endswith('d') or > filename.endswith('f') or filename.endswith('5') > > and then both .hdf and .hdf5 files will get matched. Score:5, Insightful. "Oh, I'm sorry, this is Python. Slashdot is room 12A, next door." -- Tom Zych / freethin...@pobox.com Q: I'm having problems with my Windows software. Will you help me? A: Yes. Go to a DOS prompt and type "format c:". Any problems you are experiencing will cease within a few minutes. -- Hacker Howto -- http://mail.python.org/mailman/listinfo/python-list
Re: Generate PDF with Tamil font problem
sathe...@e-ndicus.com wrote: >I am using python's reportlab to print some unicode Tamil characters > 'பே'. I added necessary unicode font to reportlab. But It > prints the output as 'ேப' (in reverse order). This issue > happens for multi-byte characters, whereas for character 'ப' is > printed as it is. > I am struggling to figure out the issue. Any help would see me on track. Something similar came up on stackoverflow recently, though that was with tkinter. Might shed some light. http://stackoverflow.com/questions/5166488/ -- Tom Zych / freethin...@pobox.com "Would you like a lovely fluffy little white rabbit, little girl, or a cutesy wootesly little brown rabbit?" "Actually, I don't think my python would notice." -- http://mail.python.org/mailman/listinfo/python-list
Re: I'm happy with Python 2.5
Steven D'Aprano wrote: > On Thu, 03 Mar 2011 11:43:12 -0700, Ian Kelly wrote: >> If speed is the only thing you care about, then you can forget about >> fretting over whether 2.5 or 3.1 is faster. You're using the wrong >> language to begin with. > Surely that depends on whether you care about execution speed or > development speed. s/care/care more/. People generally care about both to /some/ extent. (Probably being over-pedantic again...) -- Tom Zych / freethin...@pobox.com "Would you like a lovely fluffy little white rabbit, little girl, or a cutesy wootesly little brown rabbit?" "Actually, I don't think my python would notice." -- http://mail.python.org/mailman/listinfo/python-list
Re: encoding hell - any chance of salvation ?
southof40 wrote: > ... > result = array('u') > ... > ... and results in the error"TypeError: array item must be unicode > character" is raised (full stack trace at bottom) . > ... > Can anyone make a suggestion as to the best way to allow the array > object to accept what is in essence a binary file ? Glancing at the docs, it appears you want to use 'c', 'b', or 'B' instead of 'u' when creating array. -- Tom Zych / freethin...@pobox.com "Would you like a lovely fluffy little white rabbit, little girl, or a cutesy wootesly little brown rabbit?" "Actually, I don't think my python would notice." -- http://mail.python.org/mailman/listinfo/python-list