Re: Switch statement (was: Lambda going out of fashion)

2005-01-03 Thread TZOTZIOY
On Thu, 23 Dec 2004 19:57:27 GMT, rumours say that rzed <[EMAIL PROTECTED]> might have written: [Why did PEP 275 stall?] >It seems to me that it was regarded as misguidod. QOTPE +1 (PE=Python Era) Oncoming Python book: "Hitchhiker's Guido to the Python Language" -- T

Re: BASIC vs Python

2005-01-03 Thread TZOTZIOY
d got drafted, who himself had it borrowed from the company of a friend of his so that he would develop code that could be used by the company, and in general all my troubles seem to come from exposure to Unix in my puberty, but that's another story :) -- TZOTZIOY, I speak England very

Re: input record sepArator (equivalent of "$|" of perl)

2005-01-03 Thread TZOTZIOY
ron" [1]. Now, if only you people wrote the plural of "parenthesis" as "parentheseis" and not "parentheses", that would ease a lot my Greek English... :) [1] through the French "mètre" of course; great job, those revolutionaries did with the metric s

Re: newbie q

2005-01-14 Thread TZOTZIOY
ates) a huge sequence. > > for i in (x[0] for x in something): and for some functional fun: from itertools import imap from operator import itemgetter for i in imap(itemgetter(0), something): -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receivi

Re: Advice to a Junior in High School? [OT]

2005-01-18 Thread TZOTZIOY
as well, or will a mastery of the language be sufficient? I think having a katana next to your keyboard will suffice to give the *impression* you have mastered enough of the japanese culture, Peter :) -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving

Re: tkinter socket client ?

2005-01-21 Thread TZOTZIOY
use: yourTextWidget.insert(Tkinter.END, data) # to insert the data yourRootWindow.update_idletasks() # to update the GUI -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, a

Re: how to write a tutorial

2005-01-25 Thread TZOTZIOY
ythouse" and "Python 10" were over. I'm glad that finally others, too, really grok the "joy of Python programming". PS I just *love* the Classes chapter centerfold. All-time classic. -- TZOTZIOY, I speak England very best. "Be strict when sending and tol

Re: string.atoi and string.atol broken?

2005-01-26 Thread TZOTZIOY
lso noted sometime in a humourous article AFAIR.) In current Greek hexadecimal is "ÎÎÏÎ" ("dekaexadikon"). -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: string.atoi and string.atol broken?

2005-01-26 Thread TZOTZIOY
x27; s.itoa(13,4) should result in '31' s.itoa(12,4) should result in '30' s.itoa(8,4) should result in '20' s.atoi('4', 3) should fail s.atoi('13', 4) should result in 7 s.atoi('12', 4) should result in 6 s.atoi('8', 4) shou

Re: string.atoi and string.atol broken?

2005-01-26 Thread TZOTZIOY
On Wed, 26 Jan 2005 13:23:42 +0100, rumours say that "Fredrik Lundh" <[EMAIL PROTECTED]> might have written: >Christos TZOTZIOY Georgiou wrote: > >>>the function's named "atoi", not "atoitoa". >> >> [Fredrik] [0] >cool. can

Re: string.atoi and string.atol broken? [OT]

2005-01-26 Thread TZOTZIOY
... :) Just in case it didn't show up correctly in your ng/mail client, it does on groups.google.com (the post was in UTF-8, dammit! --excuse my romance language) message link (long URL): http://groups-beta.google.com/group/comp.lang.python/msg/b20fc159a4f0e14a> -- TZOTZIOY, I speak

Re: string.atoi and string.atol broken?

2005-01-26 Thread TZOTZIOY
t this > >http://mail.python.org/pipermail/python-list/2005-February/030720.html > >is a bit scary. I wonder from where I was posting that? And this post is what I was referring to with "again". -- TZOTZIOY, I speak England very best. "Be strict when sending and tol

Re: Dynamic class methods misunderstanding

2005-01-31 Thread TZOTZIOY
.__get__(7) Traceback (most recent call last): File "", line 1, in -toplevel- f= divmod.__get__(7) AttributeError: 'builtin_function_or_method' object has no attribute '__get__' I didn't run an extensive test, but it's possible that all builtin functions

Re: streaming a file object through re.finditer

2005-02-03 Thread TZOTZIOY
;\n'.join(map(str, range(2 |testfile.close() | |# now iterate over four line groups | |for bunch_o_lines in line_groups( open(testname1), line_count=4): |print repr(bunch_o_lines), |print | |for bunch_o_lines in line_groups( open(testname2), line_count=4): |

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-04 Thread TZOTZIOY
m moving to previous lines and pressing Enter, do you know about Alt-P and Alt-N? -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: List mapping question

2005-02-04 Thread TZOTZIOY
value 1. PS this might confuse you, but in python, all function calls are by value, and all values passed are references to objects. http://groups-beta.google.com/groups?q=group%3Acomp.lang.python+value+reference -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant

Re: making symlinks with distutils

2005-02-04 Thread TZOTZIOY
make a symbolic link, you probably want to use os.symlink() and not os.link(), but that seems to be the least of your troubles. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talkin

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-04 Thread TZOTZIOY
at oh-so-friendly search dog on day 2 of acquainting myself with Windows XP last September, so I can't readily say where is the setting if your dog is enabled, but if your dog is dead too, it's under Advanced Options: Search system folders. -- TZOTZIOY, I speak England very best. &qu

Re: [OT] PEP 8j, pythonista naming style

2005-02-04 Thread TZOTZIOY
o change his name to a more pythonic one, but now I see he misinterpreted the advice. Am I assimilated or what? -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actuall

Re: Possibly OT: Controlling winamp with Python

2005-02-04 Thread TZOTZIOY
winamp through COM (if you can't find it, let me know by email, I'll send it to you). Much less hassle than my initial attempts to control it with SendMessage and PostMessage etc. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (fro

Re: advice needed for simple python web app

2005-02-04 Thread TZOTZIOY
all over the place until that >happened. Those were pure perl scripts. This will be a Perl python script, so no problem. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talk

Re: returning True, False or None

2005-02-05 Thread TZOTZIOY
> * Otherwise, the function should return False. [Stevbe] >If you wanted to get clever you could write something like > >for i in True, False: > if i in lst: > return i >return False [!Steve] You mistyped None as False in the last line. Your typos are getting worse ever

Re: getting list of all available modules

2005-06-21 Thread TZOTZIOY
ive prompt: >>> type(help) -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic Lists, or...?

2005-06-22 Thread TZOTZIOY
Dict() >exec data in {}, d >print d.items() For kids trying this at home, note that it only works if the descriptor is a valid Python identifier. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: getting an object name

2005-06-22 Thread TZOTZIOY
o find out what it's called is to ask >all your neighbours (namespaces) if it's their cat (object) ... and >don't be surprised if you'll find that it's known by many names, or no >name at all!" Whom should we bug to add it? -- TZOTZIOY, I speak England ver

Re: Thanks for PIL (and other stuff)

2005-06-24 Thread TZOTZIOY
On 23 Jun 2005 19:12:03 -0700, rumours say that "jean-marc" <[EMAIL PROTECTED]> might have written: >So I wish it and its author(s) a good day, week, month, year and more! >Really! That is, "So long and thanks for all the PIL." -- TZOTZIOY, I speak England very b

Re: Plain text email?

2005-06-27 Thread TZOTZIOY
MAIL PROTECTED]']) and I had no problem. What happens for you (substitute other server and email addresses, obviously :) ? -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Plain text email?

2005-06-27 Thread TZOTZIOY
calhost', '[EMAIL PROTECTED]', ['[EMAIL PROTECTED]']) and I had no problem. What happens for you (substitute other server and email addresses, obviously :) ? -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Plain text email?

2005-06-27 Thread TZOTZIOY
BTW you don't have a newline before "Ubicación:"; is it intentional?) Tabs are infamous confusers of email clients, unfortunately. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-28 Thread TZOTZIOY
(even better, read :) the rest of Andrea's paragraph, it would be obvious that you actually agree with Andrea. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ? (OT I guess)

2005-06-28 Thread TZOTZIOY
the PSF could sell Python-branded shampoos named "poetry in lotion" etc. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Plain text email?

2005-06-28 Thread TZOTZIOY
t of the e-mail system. I suggest you send your "info" as an attached text file; no client will mess with it. The email package is your friend for MIME messages. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Better console for Windows?

2005-06-28 Thread TZOTZIOY
the top-left icon, or press Alt-Space), go to Properties, Layout tab, Window Size, Width. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ? (OT I guess)

2005-06-28 Thread TZOTZIOY
On Tue, 28 Jun 2005 15:46:01 +0300, rumours say that Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> might have written: >(kudos to Steve Holden for >[EMAIL PROTECTED] where the term PIPO >(Poetry In, Poetry Out) could be born) oops! kudos to Michael Spencer (I never sa

Re: Favorite non-python language trick?

2005-07-01 Thread TZOTZIOY
aced >directly with names's byte code contents at compile time. > >Defer could be shortened to def I suppose, but I think defer would be >clearer. Anyway, it's only a wish list item for now. This is similar: http://groups-beta.google.com/group/comp.lang.python/msg/6fc88414

Re: [OT] Better console for Windows?

2005-07-01 Thread TZOTZIOY
no keyboard shortcut to scroll: http://www.xvsxp.com/power_user/terminal/ -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling WinAMP (WM_COPYDATA problem)

2005-07-01 Thread TZOTZIOY
;s available in the www.winamp.com site. (Search for plugin "winampcom") -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re:

2005-07-01 Thread TZOTZIOY
ble libraries and more advanced developement tools. More advanced development tools, yes. More available libraries? Perhaps. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Which kid's beginners programming - Python or Forth?

2005-07-02 Thread TZOTZIOY
ew that would love Forth only for that. The perfect language for many kids I know would be Python with boolean operators reversed. Oh, and 'print' should be 'do_NOT_print'. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Boss wants me to program

2005-07-02 Thread TZOTZIOY
oject name is pretty offensive too, since it's related to the term "Sun" and not the term "Java". If one has heard of the differences between Sun and IBM about Java, and knowing that Eclipse started as an IBM project, then the reasoning for choosing the name "Eclipse"

Re: MD5 problem

2005-07-02 Thread TZOTZIOY
algorithm. I think some >character are strange for python, and makes it stop before the end of >the .msg file. FYI: the character that was strange for Windows (not Python) was chr(26), or Ctrl-Z, or end-of-file, which is special for files opened as text instead of binary. -- TZOTZIOY, I speak

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 29)

2005-07-02 Thread TZOTZIOY
ty Towers :-) Then surely it should have been "its" first attempt? Aren't piranhas neutral? -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Python choice of database

2005-07-02 Thread TZOTZIOY
se. There aren't any non-posix-conformant --or, at least, any non-self-described-as-posix-conformant :-)-- operating systems in wide use today. Hint: win32file.CreateHardLink -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Python choice of database

2005-07-02 Thread TZOTZIOY
er dbs? > >You could use ADO + adodbapi for both. >http://adodbapi.sourceforge.net/ Or pywin32/ctypes and COM (btw, I prefer DAO to ADO, but that is a personal choice). -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Python choice of database

2005-07-02 Thread TZOTZIOY
es to *view* the directory contents using Explorer. Command-line dir had no problem on a directory with >15000 files. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Better console for Windows?

2005-07-02 Thread TZOTZIOY
stem menu, doesn't it? Talk about blindness... >Seems to work for cmd.exe on NT4 XP too. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-07-02 Thread TZOTZIOY
On 28 Jun 2005 13:24:42 -0700, rumours say that "muldoon" <[EMAIL PROTECTED]> might have written: > Now, what forum would you recommend? Any help would be appreciated. alt.usage.english? alt.languages.english? alt.english.usage? uk.culture.language.english? -- TZOTZIOY, I

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-07-02 Thread TZOTZIOY
I would bet that somewhere in the "Ingliy-spiking werld" both terms sound exactly the same. -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for everything?

2005-07-02 Thread TZOTZIOY
piler ("Unix" compiler) you consider as such? Were there other Unix C compilers before K&R wrote one? Or are you considering as "K&R Unix compilers" those after the publication of the white book and before C89? -- TZOTZIOY, I speak England very best. "Dear P

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 29)

2005-07-04 Thread TZOTZIOY
humourous, I believe you noticed :) -- TZOTZIOY, I speak England very best. "Dear Paul, please stop spamming us." The Corinthians -- http://mail.python.org/mailman/listinfo/python-list

Re: pickle alternative

2005-07-08 Thread TZOTZIOY
listens on port 82 (we're behind a strict firewall), so I don't know if my following question has a reason to exist, but there we go: Have you considered basing your module on xdrlib, which is more of a cross-language standard? -- TZOTZIOY, I speak England very best. "Dear Pa

Re: Efficient checksum calculating on lagre files

2005-02-08 Thread TZOTZIOY
ename, "rb") |md5sum= md5.new() |while True: |data= fp.read(65536) |if not data: break |md5sum.update(data) |fp.close() |print md5sum.hexdigest(), filename It's fast enough, especially if you cache results. -- TZO

Re: Efficient checksum calculating on lagre files

2005-02-08 Thread TZOTZIOY
[snip] My first reaction was that "r+" should be "r+b"... but then one presumes that an mmap'ed file does not care about stdio text-binary conventions (on platforms that matters). -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiv

Re: goto, cls, wait commands

2005-02-10 Thread TZOTZIOY
d reopening it. >And last, how do I put program to wait certain amount of seconds ? >If I remeber correctly I used to type "Wait 10" and QBasic waits >10 seconds before proceeding to next command. (A serious answer for a change) Waiting is time related. So import time and call

Re: Efficient checksum calculating on lagre files

2005-02-10 Thread TZOTZIOY
ut the context was calculating efficiently checksums for large files to be /served/ by a webserver. I deduce it's almost certain that the files won't be larger than 3GiB, but ICBW :) -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda and for that matter goto not forgetting sugar

2005-02-10 Thread TZOTZIOY
wn replies to the this and the other thread. BTW, my sincere congratulations for what I presume best computer related April's Fool joke of all time; I love double-bluffs. The worst of all is I've often referenced your joke when advocating python... :) -- TZOTZIOY, I speak England very best.

Re: Pioneers of WIMPishness (was: A great Alan Kay quote)

2005-02-10 Thread TZOTZIOY
;hypertext" in '65, and >Vannevar Bush lucidly explained his vision for textual linking in >'45. With a little provocation, I can push the ideas of "mechanical" >or "machine" referencing back at least to the Enlightenment, and >arguably much farther.

Re: Python and version control

2005-02-10 Thread TZOTZIOY
dn't touch the product >with a virtual ten-foot pole Are you sure you got the acronym right?-) It seems that VSS provides viRTual source-safety... -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep

Re: Pioneers of WIMPishness (was: A great Alan Kay quote)

2005-02-10 Thread TZOTZIOY
smith.edu/hsc/museum/ancient_inventions/steamengine2.html Nice page, this: http://www.smith.edu/hsc/museum/ancient_inventions/hsclist.htm -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mi

Re: Variables.

2005-02-15 Thread TZOTZIOY
at you gave it. Try the following changes: >I = "Allen" >me = "Allen" >my = "Allen's" to xyzzy = "I" footy = "me" spike = "my" and then change the last line of the triple-quoted string: >it was so amazing!""&qu

Re: "perl -p -i -e" trick in Python?

2005-02-16 Thread TZOTZIOY
mation. >>>> ^D "Instant porting of any program to python". Smooth. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: check if object is number

2005-02-17 Thread TZOTZIOY
then my entry is: > assert obj+1 >= 1 >:-) So -1 is not a number. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Tk treat F10, F11, F12 diferently from F1...F9?

2005-02-17 Thread TZOTZIOY
um will be more safe since i'm >still getting they correct. It's not weird, it's the same in Windows as far as I remember (windows 3.0). F10 is the same as depressing Alt. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (

Re: python2.4 generator expression > python2.3 list expression

2005-02-21 Thread TZOTZIOY
, >while c: >c &= c - 1 >even_odd = not even_odd >print int( even_odd ) Just for the sake of people who haven't messed with bit manipulation in C or assembly, the effect of c &= c - 1 is to reset the rightmost (less significant) '1' bi

Re: [ANN] Python 2.4 Quick Reference available

2005-02-21 Thread TZOTZIOY
malised to a directory called 'www.python.org' in the local subdirectory 'http:'), but still could not on NTFS. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: python2.4 generator expression > python2.3 list expression

2005-02-22 Thread TZOTZIOY
t this as "reset the rightmost >bit" >instead of "reset the rightmost '1' bit". and i must have read what christos >wrote 100 times!!! Don't worry, Bryan, I'm probably more to blame, since I have this tendency to interject parenthesized sub-sent

Re: how can I make this script shorter?

2005-02-22 Thread TZOTZIOY
hash with other files: calculate full hash return all files with same full hash Something like that. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory Based File Objects

2005-02-22 Thread TZOTZIOY
t; File Object with an unknown size. You probably need the StringIO (or cStringIO) module. Check the module reference. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking w

Re: duplicate file finder (was: how can I make this script shorter?)

2005-02-24 Thread TZOTZIOY
sys.stderr.write("\r%d" % count) . return dupefinder def pprint(obj, level=0): . """For testing purposes.""" . indent= " "*level . if isinstance(obj, File): . print `obj` . elif isinstance(obj, list): . print "list"

Re: what is wrong?

2005-02-24 Thread TZOTZIOY
def __feed_time(self): # I worte this >self.feed += 1 # I wote this Because of this: >feed = property(__get_feed) # I wrote this which specifies only a 'get' method for the property. [snip] feed is a property, and there is not 'set&#

Re: duplicate file finder

2005-02-25 Thread TZOTZIOY
Even if one doesn't use vi for editing, it's easiest with Idle to remove the dot at the start of every line. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people

Re: netmask arithmetic?

2005-02-28 Thread TZOTZIOY
ented the wheel in http://www.sil-tec.gr/~tzot/python/IPv4_Utils-0.35.linux-i586.tar.gz It seems that ipv4 from pynms almost matches the functionality of my module, except for a function (included_nets): given two hosts/nets, find the minimal set of networks that include both hosts/nets. Just

Re: string methods (warning, newbie)

2005-02-28 Thread TZOTZIOY
t;u'TheBeatleshelpTickettoride' This works though: .>> filter(type(s).isalpha, s) As a function just for clarity. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: string methods (warning, newbie)

2005-02-28 Thread TZOTZIOY
ride' >py> filter(str.isalpha, s) >Traceback (most recent call last): > File "", line 1, in ? >TypeError: descriptor 'isalpha' requires a 'str' object but received a >'unicode' >py> ''.join(c for c in s if c.isalpha()) &

Re: unicode and socket

2005-03-03 Thread TZOTZIOY
bytes, no spurious control characters etc). Don't interpret as weakness the explicitness requested from Python. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and VT100

2005-03-05 Thread TZOTZIOY
ng to drop compatibility with escape sequences, you can use WConio: http://newcenturycomputers.net/projects/wconio.html Other related stuff: http://en.wikipedia.org/wiki/Vt100 http://en.wikipedia.org/wiki/Ansi.sys -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: seeking tree-browser widget for use with Tkinter

2005-03-06 Thread TZOTZIOY
I look at the documentation >(http://pmw.sourceforge.net/doc/refindex.html), it doesn't seem to be >there. Any advice will be much appreciated. Have you got Idle on your computer? Search the idlelib directory for the TreeWidget.py file. -- TZOTZIOY, I speak England very best. "Be st

Re: Appeal for python developers

2005-03-06 Thread TZOTZIOY
g.python/browse_frm/thread/efe172a98d165a1d/4c504caf72a622a7 -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: Appeal for python developers

2005-03-06 Thread TZOTZIOY
On Sun, 06 Mar 2005 22:52:10 +, rumours say that Michael Hoffman <[EMAIL PROTECTED]> might have written: >Christos TZOTZIOY Georgiou wrote: > >> Argument against your "only" in "you can only use goto": >> >> http://www.entrian.com/g

Re: using python to parse md5sum list

2005-03-07 Thread TZOTZIOY
n your case, you can use the find_duplicate_files function with arguments like: r"\\COMPUTER1\SHARE1", r"\\COMPUTER2\SHARE2" etc -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that i

Re: HELP: Python & Tkinter ?

2005-03-07 Thread TZOTZIOY
s the way to go. [snip: import Tkinter fails, probably due to missing package] Perhaps this page helps: http://www.python.org/2.4/rpms.html Otherwise this would show up anything in the cd: $ find /mnt/cdrom -name \*kinter\* -print (/mnt/cdrom or whatever the name of the cd mounting directory

Re: shuffle the lines of a large file - filelist.py (0/1)

2005-03-07 Thread TZOTZIOY
e big_file appending to fl the offset each time (if you need help with this, let me know). random.shuffle(fl) # this is tested with the filelist.FileList as given for offset_as_str in fl: offset= struct.unpack("q", offset_as_str)[0] big_file.seek(offset) sys.stdout.write(big_file.

Re: Recognizing the Arrival of a New File

2005-03-08 Thread TZOTZIOY
) is to use the SGI fam (file alteration monitor); I think it has been ported to Linux. Otherwise, either way you describe is common use. Suggestion: first check for changes in the st_mtime of the directory, then search for the file existence. -- TZOTZIOY, I speak England very best. "Be str

Re: [perl-python] a program to delete duplicate files

2005-03-09 Thread TZOTZIOY
of the spec. http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/de90435f3e56ab0c/048e292ec9adb82d The whole thread is about finding duplicate files. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really shou

Re: [perl-python] a program to delete duplicate files

2005-03-10 Thread TZOTZIOY
u have ten files less than 100KiB each and one file more than 2 GiB in size, there is no need to read the 2 GiB file, is there? If it's a one-shot attempt, I guess it won't mind a lot. On POSIX filesystems, one has also to avoid comparing files having same (st_dev, st_inum), because you

Re: [perl-python] a program to delete duplicate files

2005-03-10 Thread TZOTZIOY
Linux). Have you found any way to test if two files on NTFS are hard linked without opening them first to get a file handle? -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with p

Re: How can I Read/Write multiple sequential Binary/Text data files

2005-03-10 Thread TZOTZIOY
pen("%s%s%s" % (PREFIX, number, SUFFIX_O), "w") while 1: datum= fpi.read(2) if not datum: break fpo.write("%5d\n" % struct.unpack("H", datum)) # check endianness!!! fpi.close() fpo.close() -- TZOTZIOY, I speak England

Re: Wishlist item: itertools.flatten

2005-03-11 Thread TZOTZIOY
aints on library (itertools module in this case) expansion when talking about such useful *building blocks*. What happened to "batteries included"? -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: [perl-python] a program to delete duplicate files

2005-03-11 Thread TZOTZIOY
t.com/library/default.asp?url=/library/en-us/fileio/base/by_handle_file_information_str.asp The relevant parts from this last page: st_dev <-> dwVolumeSerialNumber st_ino <-> (nFileIndexHigh, nFileIndexLow) -- TZOTZIOY, I speak England very best. "Be strict when sending and tol

Re: [perl-python] a program to delete duplicate files

2005-03-11 Thread TZOTZIOY
n have a bug here - I consider all files with the same inode equal, > but according to what you say I need to consider the tuple >(st_dev,ST_ium). I'll have to fix that for 0.13. I have a bug here too-- I wrote st_inum meaning st_ino, but that would be quick to find! > Thanks ;-)

Re: [perl-python] a program to delete duplicate files

2005-03-11 Thread TZOTZIOY
jections to your objections (-:) other than that we are just trying to produce something of practical value out of an otherwise doomed thread... -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind

Re: Wishlist item: itertools.flatten

2005-03-11 Thread TZOTZIOY
I have needed enough times in *separate* occasions to add it in one of my personal "stdlib" modules (hinting it could be part of itertools): window('hello', 2) => 'he', 'el', 'll', 'lo' -- TZOTZIOY, I speak England very best. "

Re: Test

2005-03-11 Thread TZOTZIOY
of avoiding smart-ass replies like mine :) -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: Downloading all files older than 3 hours from a ftp-server.

2005-03-15 Thread TZOTZIOY
the only way to go is to parse the >ftp.retrlines('LIST') command and that seems to be very easy to mess >up. > >any hints? google brings this up: http://www.sschwarzer.net/python/ftputil.html ISTR seeing a parsedate (or similar) for ftp sites by the effbot, but I am not sure.

Re: simulated samba server

2005-03-15 Thread TZOTZIOY
ilesystem which is spread over various numbers >of drives and servers. I haven't seen one so far; however, is it possible that you could serve your users through HTTP? I have done so in a similar situation like yours. -- TZOTZIOY, I speak England very best. "Be strict when sending and

Re: python version anachronism

2005-03-15 Thread TZOTZIOY
On Tue, 15 Mar 2005 10:23:02 +, rumours say that Simon Brunning <[EMAIL PROTECTED]> might have written: >3.2.5 is a bugfix release of the 2.3 branch Damn, we're on Python 3 already? Where are all the PEPs I missed?-) -- TZOTZIOY, I speak England very best. "Be stri

Re: unicode study with unicodedata module

2005-03-15 Thread TZOTZIOY
EEK SMALL LETTER KAPPA}" or with .>> uc = unicodedata.lookup("GREEK SMALL LETTER KAPPA") and you get the ordinal with: .>> ord(uc) ord works for strings and unicode. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from

Re: unicode converting

2005-03-15 Thread TZOTZIOY
e('utf-16') # maybe utf-16be for network order You should not care about internal encoding of unicode objects. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: Itertools wishlists

2005-03-16 Thread TZOTZIOY
NST a_tuple/UNPACK_SEQUENCE/BUILD_TUPLE, "a,b,c=d,e,f" reordering and dropping of the tuple building/unpacking (which is a case already improved in C) etc. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should keep that in mind when talking with people, actually... -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode converting

2005-03-16 Thread TZOTZIOY
er as pre-built on recent RedHat systems. Does it also apply to FreeBSD? On Windoze, Mandrake and SuSE python has UCS-2 unicode and Tkinter is working just fine. -- TZOTZIOY, I speak England very best. "Be strict when sending and tolerant when receiving." (from RFC1958) I really should

  1   2   >