ANN: eGenix mxODBC Zope Database Adapter 1.0.9

2005-10-17 Thread M.-A. Lemburg
ANNOUNCEMENT EGENIX.COM mxODBC Zope Database Adapter Version 1.0.9 Usable with Zope and the Plone CMS.

NYLUG meeting: 10/26 The Python Object Model with Alex Martelli Google (slight correction)

2005-10-17 Thread Ron Guerin
(date and time inadvertently omitted last time. sorry!) The New York Linux User's Group invites you to a special presentation by Alex Martelli of Google, on the Python Object Model. This presentation will be held at P.J. Clarke's Sidecar, rather than our usual location, and Google is picking up

Re: Microsoft Hatred FAQ

2005-10-17 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: As for it being illegal, it was illegal only because if was Microsoft doing it. Actually, *any* company with a defacto monopoly pulling such a stunt would be found in violation of the law. Such companies operate under different legal rules than

can a cut-down Python still be Python?

2005-10-17 Thread The Eternal Squire
All, Regardless of the technical difficulties involved (and I know they are legion), I am considering developing a very limited subset of Python fit to run on embedded systems using 80188 or 68332 microchips. My main question regarding this is: even if I am successful, would the results be

How do you draw this layout with wxpython?

2005-10-17 Thread Young H. Rhiu
See: http://hilug.org/img/app_layout.GIF I'm implementing an album-like application with wxpython but I'm new to wxPython though I know how to program with python. The problem is that it's not easy for me to deal with drawing layout stuff with wxpython. What layout I'm thinking of looks like the

Re: UI toolkits for Python

2005-10-17 Thread Steve Holden
Claudio Grondi wrote: Steve Holden [EMAIL PROTECTED] schrieb im Newsbeitrag [...] [Claudio] I don't fully understand your attitude here. The Web Browser interface has all I can imagine is required for a GUI, so what is missing when you consider, that you can generate custom images on the fly

Re: can a cut-down Python still be Python?

2005-10-17 Thread Paddy
If you mean missing out some of the libraries then that would be different to missing out core functionality sucjh as generators or list expressions,... In general, if the end task is not to present the world with a new programming language then it's usually best to choose from the available,

Re: can a cut-down Python still be Python?

2005-10-17 Thread Fredrik Lundh
The Eternal Squire wrote: Regardless of the technical difficulties involved (and I know they are legion), I am considering developing a very limited subset of Python fit to run on embedded systems using 80188 or 68332 microchips. My main question regarding this is: even if I am successful,

Re: How do you draw this layout with wxpython?

2005-10-17 Thread Tim
Young H. Rhiu wrote: See: http://hilug.org/img/app_layout.GIF I'm implementing an album-like application with wxpython but I'm new to wxPython though I know how to program with python. The problem is that it's not easy for me to deal with drawing layout stuff with wxpython. What layout I'm

Outdated documentation

2005-10-17 Thread Laszlo Zsolt Nagy
Hi All, This is from the documentation of the dbhash module: Returns the key next key/value pair in a database traversal. The following code prints every key in the database |db|, without having to create a list in memory that contains them all: print db.first() for i in

Repost: Text not showing up

2005-10-17 Thread Simone
Simone wrote: Hi all, I am new to python and trying to write a simple GUI that would call 2 growisofs processes (dvd burning) at the same time, and retrive the exit code to be printed on a text box (couldn't find any program that could use multiple dvd burners, not even k3b). Excuse me if this

Re: TypeError: unbound method PrintInput() must be called with test instance as first argument (got test instance instead)

2005-10-17 Thread arotem
Thanks... it solves the problem :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: unbound method PrintInput() must be called with test instance as first argument (got test instance instead)

2005-10-17 Thread arotem
Thanks... it solves the problem :-) -- http://mail.python.org/mailman/listinfo/python-list

graphic memory animation

2005-10-17 Thread Peres
Thanks a lot for your answer, Fredrik, Slow means more than 20ms to erase the screen. After double buffering it improved a lot , of course (16 ms) but I'll need a faster speed. I program 2D animated sequences on a PC. Do you think OpenGL is the correct direction to take? If so is it easy to

Re: bizarro world (was Re: Python Doc Problem Example: sort() (reprise))

2005-10-17 Thread Xah Lee
Bryan wrote: mr. xah... would you be willing to give a lecture at pycon 2006? i'm sure you would draw a huge crowd and a lot of people would like to meet you in person... thanks. I'd be delight to. My requirements are: 1 cup of fat-free milk, free, and free pizza. Xah [EMAIL

Re: graphic memory animation

2005-10-17 Thread Fredrik Lundh
Peres wrote: Slow means more than 20ms to erase the screen. After double buffering it improved a lot , of course (16 ms) but I'll need a faster speed. are you measuring the time it takes to go from a populated screen to a blank screen? if so, you're probably seeing the screen refresh time (16

Re: popen4

2005-10-17 Thread Piet van Oostrum
billie [EMAIL PROTECTED] (b) wrote: b Hi all. I'm trying to execute system commands and capture the output by b using popen4: b stdout example: exec_cmd = popen2.popen4(echo hello!) output = exec_cmd[0].read() b hello b stderr example: exec_cmd = popen2.popen4(echobv hello!) output =

Question on class member in python

2005-10-17 Thread Johnny Lee
Class A: def __init__(self): self.member = 1 def getMember(self): return self.member a = A() So, is there any difference between a.member and a.getMember? thanks for your help. :) Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a raised exception from other thread

2005-10-17 Thread Alex Martelli
[EMAIL PROTECTED] wrote: Nevermind. I found a better solution. I used shared memory to create a keep-alive flag. I then use the select function with a specified timeout, and recheck the keep-alive flag after each timeout. Definitely a better architecture. Anyway, one supported way for a

Re: How to get a raised exception from other thread

2005-10-17 Thread Antoon Pardon
Op 2005-10-14, dcrespo schreef [EMAIL PROTECTED]: Hi all, How can I get a raised exception from other thread that is in an imported module? For example: You could try the following class, it needs ctypes and if the exception is raised while in a C-extention, the exception will be delayed

Re: subtyping a builtin type in a C extension

2005-10-17 Thread Gerhard Häring
shawn wrote: I am trying to make a subtype of a string. Initially it will have no new methods or attributes, the C equivalent of: class myStr(str): pass I have experimented a bit, but am currently making a mess of it. Does anybody have an example they can point to of inheriting from

wxPython advice

2005-10-17 Thread vpr
Hi Guys I have a question re. socketserver and wx. I've written a p2p program using socketserver that's nice and quick. I'd like to give the user a tray applet (part of the p2p service) that will allow the user to activate / deactivate / config and exit the service. However I'm starting to bang

Re: Comparing lists

2005-10-17 Thread Alex Martelli
Christian Stapfer [EMAIL PROTECTED] wrote: This is why we would like to have a way of (roughly) estimating the reasonableness of the outlines of a program's design in armchair fashion - i.e. without having to write any code and/or test harness. And we would also like to consume vast amounts

Re: Queue question

2005-10-17 Thread Alex Martelli
Steve M [EMAIL PROTECTED] wrote: According to my Python in a Nutshell: q.get(block=True) is the signature, so, as you use it above, the call will hang until something is on the queue. If block is false and the queue is empty, q.get() will raise the exception Empty. q.get_nowait is

Re: Problems with properties

2005-10-17 Thread Alex Martelli
Michael Schneider [EMAIL PROTECTED] wrote: Thanks to all, I added the object as a subclass (should this be required for 2.4.1 ???) It _IS_ required, because Python these days moves *very slowly indeed* before changing semantics of existing code in any way that is not backwards compatible --

Re: Question on class member in python

2005-10-17 Thread Peter Otten
Johnny Lee wrote: Class A: def __init__(self): self.member = 1 def getMember(self): return self.member a = A() So, is there any difference between a.member and a.getMember? thanks for your help. :) Yes. accessor methods for simple attributes are a Javaism that

Re: Question on class member in python

2005-10-17 Thread Tau
Get answer by typing: id(a.member)==id(a.getMember()) You will often find id() useful when in doubt whether the two objects are distinct. -- http://mail.python.org/mailman/listinfo/python-list

[PIL]: Question On Changing Colour

2005-10-17 Thread Andrea Gavana
Hello Terry, new_hue # your 'basic color', just the hue part rgb_base # color from the basic button image rgb_new # the new color you want to replace rgb_base with rgb_new = hsv_to_rgb( (new_hue,) + rgb_to_hsv(rgb_base)[1:]) thanks a lot for your suggestion! However, either I did not

setup.py dll linking

2005-10-17 Thread brussel13
Hi, I'd like to link a dll/pyd against another which was compiled by a distutils script and mingw32, winxp obviously. there aren't any symbols in the symbol table of the first pyd. i removed the -s which distutils sends to mingw32 but that only made symbols appear with nm. pexports still reports

Python Programmer Urgently Required

2005-10-17 Thread dashkedar123
Job Description: The position holder will supplement the existing pool of application development and programming pool of OWSA technical team. In particular S/he will be responsible for developing Python based overlay application – to be mounted on existing software tools and solutions. The

Re: Send password over TCP connection

2005-10-17 Thread dcrespo
I think you said the same as me: Client: Password = password h = Hash(Password) h is GddTHww90lze7vnmxG (whatever) Sends h over the network to the server. h is a string, so this approach is simply vulnerable. SRP seems to be very good, but because I don't know it well, I think I'll delay it for

Expression templates for arithmetic operations in python

2005-10-17 Thread David Welch
Hi, I am new to python so I thought I would write a quick and simple vector/matrix multiplication class in c++ and use it in python. Is it possible to overload the operators in python such a way that a tree of calculations is built which I can then pass to an evaluator written in c++ to

Stripping ASCII codes when parsing

2005-10-17 Thread David Pratt
I am working with a text format that advises to strip any ascii control characters (0 - 30) as part of parsing data and also the ascii pipe character (124) from the data. I think many of these characters are from a different time. Since I have never seen most of these characters in text I am

Re: Microsoft Hatred FAQ

2005-10-17 Thread Jim Benson
(sorry for the top post...but given the subject line (OP), hopefully I won't offend more than one) ...and just when I was beginning to think that Mr. Xah Lee was a changed man and had dropped his compulsion to use profanity to express his thoughts. I didn't actually do a grep on his last

Name Lookups

2005-10-17 Thread zhu_dave
Hello All, I would like to gather some information on Python's performance. As far as I understand, it deals with a lot of string objects. It looks up all names. - Is there a way to find out how many name look up operations take place in a Python program? - Is it the name lookup operation or

OT: On Microsoft monopolies, was MS FAQ

2005-10-17 Thread Adriaan Renting
Jeroen Wenting jwenting athornetdotdemondotnl@bag.python.org 10/16/05 11:49 am % %Peter T. Breuer [EMAIL PROTECTED] wrote in message %news:[EMAIL PROTECTED] %In comp.os.linux.misc Jeroen Wenting jwenting at hornet dot demon dot nl %wrote: %Without Microsoft 90% of us would never have seen

OT: OS monopolies, was MS FAQ

2005-10-17 Thread Adriaan Renting
John Bokma [EMAIL PROTECTED] 10/17/05 5:27 am #Roel Schroeven [EMAIL PROTECTED] wrote: # # #Maybe they can force it, maybe not, but that's not the point (again). #The point is what their intentions are, and that is trying to lock #people into using their software. # #Can you name big

Re: Stripping ASCII codes when parsing

2005-10-17 Thread Steve Holden
David Pratt wrote: I am working with a text format that advises to strip any ascii control characters (0 - 30) as part of parsing data and also the ascii pipe character (124) from the data. I think many of these characters are from a different time. Since I have never seen most of these

[newbie]Is there a module for print object in a readable format?

2005-10-17 Thread James Gan
I want the object printed in a readable format. For example, x =[a, b, c, [d e]] will be printed as: x--a |_b |_c |___d |_e I tried pickled, marshel. They do different work. Is there another module which do this kind of job? Thanks! James Gan --

Re: [newbie]Is there a module for print object in a readable format?

2005-10-17 Thread bruno modulix
James Gan wrote: I want the object printed in a readable format. For example, x =[a, b, c, [d e]] will be printed as: x--a |_b |_c |___d |_e I tried pickled, marshel. They do different work. Is there another module which do this kind of job? pprint -- bruno desthuilliers

ANN: MathDOM 0.5.2 - MathML in Python - now featuring lxml API!

2005-10-17 Thread Stefan Behnel
Hi everyone, MathDOM 0.5.2 is ready for download from SourceForge. http://mathdom.sourceforge.net/ MathDOM is a set of Python modules (using pyparsing and either PyXML or lxml) that import mathematical terms as a Content MathML DOM. It currently parses MathML and literal infix terms into a DOM

Re: [newbie]Is there a module for print object in a readable format?

2005-10-17 Thread enrico . sirola_NOSPAM
James == James Gan [EMAIL PROTECTED] writes: James I want the object printed in a readable format. For [...] James I tried pickled, marshel. They do different work. Is there James another module which do this kind of job? from pprint import pprint pprint(object) bye, e. --

Re: Question on class member in python

2005-10-17 Thread bruno modulix
Johnny Lee wrote: Class A: s/C/c/ def __init__(self): self.member = 1 def getMember(self): return self.member a = A() So, is there any difference between a.member and a.getMember? yes : a.member is an integer, a.getMember is a bound method. You could have found

Any 3state Check Tree Ctrl for wxPython available?

2005-10-17 Thread Petr Prikryl
Hi, I am experimenting with wxPython on Windows box. What I need to implement is a check tree control with 3 states for each checkbox: unchecked, checked, gray checked. The status of the checkbox should reflect the status of the children. When ALL children are checked, then the status should be

Re: Outdated documentation

2005-10-17 Thread Kent Johnson
Laszlo Zsolt Nagy wrote: Is this the good place to post? Follow the About this document link at the bottom of any page of Python docs for information about submitting change requests. Kent -- http://mail.python.org/mailman/listinfo/python-list

Re: UI toolkits for Python

2005-10-17 Thread Wolfgang Keller
With OS X compatibility you tend to come across with the fact that many OS X compatible things are actually X11 things. X11 certainly looks different from Aqua (the native interface). But imho, Gnome _does_ look and feel quite Mac-ish in the sense that its ergonomics has certain things in

Re: array subset could be improved? -repost ;)

2005-10-17 Thread Jim O'D
With the new numeric, you'll be able to do: negatives = a[a0] Cheers, f Ooh, that's nice. Jim -- http://mail.python.org/mailman/listinfo/python-list

xmlrpclib: how to marshal special instances

2005-10-17 Thread Willi Langenberger
Hi! We have an application server (Zope) and make heavy use of xml-rpc. One problem arised, when we tried to return a zope.DateTime instance. xmlrpclib (naturally) knows nothing about zope.DateTime and marshalls it as instance, which gives a structure (of zope.DateTime attributes) on the client

Re: How to get a raised exception from other thread

2005-10-17 Thread Antoon Pardon
Op 2005-10-17, Alex Martelli schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Nevermind. I found a better solution. I used shared memory to create a keep-alive flag. I then use the select function with a specified timeout, and recheck the keep-alive flag after each timeout. Definitely

generic xmerge ?

2005-10-17 Thread [EMAIL PROTECTED]
Hi, I was reading this recipe and am wondering if there is a generic version of it floating around ? My list is a tuple (date, v1, v2, v3) and I would like it to sort on date. The documentation doesn't mention how the items are compared and the example only use integers.

Re: How to get a raised exception from other thread

2005-10-17 Thread Steve Holden
Antoon Pardon wrote: Op 2005-10-17, Alex Martelli schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Nevermind. I found a better solution. I used shared memory to create a keep-alive flag. I then use the select function with a specified timeout, and recheck the keep-alive flag after each

Re: generic xmerge ?

2005-10-17 Thread Alex Martelli
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I was reading this recipe and am wondering if there is a generic version of it floating around ? My list is a tuple (date, v1, v2, v3) and I would like it to sort on date. The documentation doesn't mention how the items are compared and the

Re: How to get a raised exception from other thread

2005-10-17 Thread Paul Rubin
Steve Holden [EMAIL PROTECTED] writes: Otherwise you have to write the worker thread to be capable of handling asynchronous signals, which is a notoriously difficult task. Doing it properly needs a language extension. http://www.cs.williams.edu/~freund/papers/02-lwl2.ps --

Run process with timeout

2005-10-17 Thread Natan
Hi. I have a python script under linux where I poll many hundreds of interfaces with mrtg every 5 minutes. Today I create some threads and use os.system(command) to run the process, but some of them just hang. I would like to terminate the process after 15 seconds if it doesn't finish, but

Re: generic xmerge ?

2005-10-17 Thread [EMAIL PROTECTED]
oops, sorry. I meant l1=[(date,v1,v2,v3), ...] l2=[ another set of tuples ] Thanks. so I have to concat the multiple lists first(all of them are sorted already) ? Alex Martelli wrote: I'm not sure what my list is a tuple mean (list and tuple being different types) nor what this has to do

Re: Microsoft Hatred FAQ

2005-10-17 Thread Roel Schroeven
John Bokma wrote: Roel Schroeven [EMAIL PROTECTED] wrote: But that's not the point; the point is that they have the choice. If MS had it its way, they wouldn't have that choice. I doubt that. But even if you're right, do you really think that MS is the only evil company on earth working

Re: generic xmerge ?

2005-10-17 Thread Alex Martelli
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: oops, sorry. I meant l1=[(date,v1,v2,v3), ...] l2=[ another set of tuples ] Thanks. so I have to concat the multiple lists first(all of them are sorted already) ? You can do it either way -- simplest, and pretty fast, is to concatenate them all

Re: can a cut-down Python still be Python?

2005-10-17 Thread Kay Schluehr
The Eternal Squire wrote: My main question regarding this is: even if I am successful, would the results be rejected out of hand by y'all as not meeting the Zen of Python? Have you ever asked a Zen master about Zen? Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Run process with timeout

2005-10-17 Thread Alex Martelli
Natan [EMAIL PROTECTED] wrote: Hi. I have a python script under linux where I poll many hundreds of interfaces with mrtg every 5 minutes. Today I create some threads and use os.system(command) to run the process, but some of them just hang. I would like to terminate the process after 15

Re: generic xmerge ?

2005-10-17 Thread [EMAIL PROTECTED]
million thanks. So the default compare funcion of heapq also do it like sort ? The size of the list is not very large but has the potential of being run many times(web apps). So I believe second one should be faster(from the app perspective) as it goes into the optimized code quickly without all

Re: Calling an exe from Python?

2005-10-17 Thread Jorgen Grahn
On 16 Oct 2005 15:23:08 -0700, SPE - Stani's Python Editor [EMAIL PROTECTED] wrote: Slightly offtopic, but you can translate any double clicking (*.exe, *.pdf, *.html, ...) in the Windows Explorer into: import os os.startfile(fileName) That would be Windows-specific, though. But yes, it's

Re: Perl-Python-a-Day: split a file full path

2005-10-17 Thread Dr.Ruud
Xah Lee: In Perl, spliting a full path into parts is done like this: And then follows Perl-code that only works with an optional .html extension, which is similar to the code in the File::Basename description. http://www.perl.com/doc/manual/html/lib/File/Basename.html It is best practice to

Dynamic generation of doc-strings of dynamically generated classes

2005-10-17 Thread Mikael Olofsson
Hi! I've asked Google, but have not found any useful information there. Situation: I have a base class, say class base(object): ImportantClassAttribute = None Now, I want to dynamically generate subclasses of base. That's not a problem. However, I very much want those subclasses to

Re: Problems with properties

2005-10-17 Thread bruno modulix
[EMAIL PROTECTED] wrote: If you change it to this it works. You should provide a get and a set function for a property. The OP did: - command=property(getCommand, setNothing) -- bruno desthuilliers python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL

Re: How to get a raised exception from other thread

2005-10-17 Thread Antoon Pardon
Op 2005-10-17, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-10-17, Alex Martelli schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Nevermind. I found a better solution. I used shared memory to create a keep-alive flag. I then use the select function with a

Re: Microsoft Hatred FAQ

2005-10-17 Thread Steven D'Aprano
On Mon, 17 Oct 2005 00:17:03 -0400, Mike Meyer wrote: Yup. When NS was the 800 lb gorilla When was this? When did Netscape have a monopoly in any market? Netscape was never the 800 lb gorilla. on they acted like MS, When did Netscape executives perjure themselves in court? When did

Re: [newbie]Is there a module for print object in a readable format?

2005-10-17 Thread Steven D'Aprano
On Mon, 17 Oct 2005 17:25:35 +0800, James Gan wrote: I want the object printed in a readable format. For example, x =[a, b, c, [d e]] will be printed as: x--a |_b |_c |___d |_e I think you missed an un- in your first sentence. :-) In general, if you want special/fancy/bizarre

Re: Microsoft Hatred FAQ

2005-10-17 Thread Tim Tyler
Tim Roberts [EMAIL PROTECTED] wrote or quoted: [Microsoft] Part of their behavior really escape me. The whole thing about browser wars confuses me. Web browsers represent a zero billion dollar a year market. Why would you risk anything to own it? Power. Minshare. Controlling the

Re: [newbie]Is there a module for print object in a readable format?

2005-10-17 Thread Steven D'Aprano
On Mon, 17 Oct 2005 11:31:46 +0200, enrico.sirola_NOSPAM wrote: James == James Gan [EMAIL PROTECTED] writes: James I want the object printed in a readable format. For [...] James I tried pickled, marshel. They do different work. Is there James another module which do this

Re: Microsoft Hatred FAQ

2005-10-17 Thread Tim Tyler
In comp.lang.java.programmer Roedy Green [EMAIL PROTECTED] wrote or quoted: MS has held BACK computer evolution by tying their OS so heavily to the Pentium architecture. The chip architecture has nowhere near enough registers. MS refused to believe the Internet was more than a passing fad.

Re: Run process with timeout

2005-10-17 Thread P
Natan wrote: Hi. I have a python script under linux where I poll many hundreds of interfaces with mrtg every 5 minutes. Today I create some threads and use os.system(command) to run the process, but some of them just hang. I would like to terminate the process after 15 seconds if it doesn't

Re: Dynamic generation of doc-strings of dynamically generated classes

2005-10-17 Thread Alex Martelli
Mikael Olofsson [EMAIL PROTECTED] wrote: ... Any ideas? Am I stuck with the clumsy exec-solution, or are there other ways to dynamically generate doc-strings of classes? The best way to make classes on the fly is generally to call the metaclass with suitable parameters (just like, the best

Re: Profiling results

2005-10-17 Thread Magnus Lycka
Dave wrote: I'm trying to profile a Python program using gprof, I don't think you will learn anything meaningful about a Python program from gprof. Use the profiling tools in Python. http://docs.python.org/lib/profile.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic generation of doc-strings of dynamically generated classes

2005-10-17 Thread George Sakkis
Mikael Olofsson [EMAIL PROTECTED] wrote: Hi! I've asked Google, but have not found any useful information there. Situation: I have a base class, say class base(object): ImportantClassAttribute = None Now, I want to dynamically generate subclasses of base. That's not a

reading hebrew text file

2005-10-17 Thread hagai26
I have a hebrew text file, which I want to read in python I don't know which encoding I need to use how I do that thanks, hagai -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a raised exception from other thread

2005-10-17 Thread Lasse Vågsæther Karlsen
Steve Holden wrote: snip Why should the coder of this software have to go through this deliberate set up attrition, to get at this functionality, just because it wasn't intented to be used in such a way by the developers? Because otherwise people who know no better will use the feature for

Re: reading hebrew text file

2005-10-17 Thread Alex Martelli
[EMAIL PROTECTED] wrote: I have a hebrew text file, which I want to read in python I don't know which encoding I need to use how I do that As for the how, look to the codecs module -- but if you don't know what codec the textfile is written in, I know of no ways to guess from here!-) Alex

Re: reading hebrew text file

2005-10-17 Thread jepler
I looked for VAV in the files in the encodings directory (/usr/lib/python2.4/encodings/*.py on my machine). I found that the following character encodings seem to include hebrew characters: cp1255 cp424 cp856 cp862 iso8859-8 A file containing hebrew text

Re: reading hebrew text file

2005-10-17 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I have a hebrew text file, which I want to read in python I don't know which encoding I need to use that's not a good start. but maybe it's one of these: http://sites.huji.ac.il/tex/hebtex_fontsrep.html ? how I do that f = open(myfile) text =

Re: win32api.FindFiles Win2003, problem with Short Name

2005-10-17 Thread Frank Borell
Neil Hodgson wrote: Frank Borell: On all three types of PC/Servers they are set to 0. For now I'll have to process this script on non 2003 servers?!? What do you get if you call win32api.GetShortPathName on the long name? Neil Neil, It seems I'm in a catch 22. My initial

Installing Python at Work

2005-10-17 Thread Nikola
I'm currently learning Python for my own use. I'm considering installing it on a work laptop, knowing that it is non-licensed, distributable software. However, does it access communication ports? I know the company checks their ports regularly for activity. I won't be doing anything very

ANN: Leo 4.4a1 released

2005-10-17 Thread Edward K. Ream
Leo 4.4 alpha 1 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 To learn about Leo, see: http://webpages.charter.net/edreamleo/intro.html Leo 4.4 adds an Emacs-like minibuffer and support for all frequently-used Emacs commands. Emacs users will be

Re: Stripping ASCII codes when parsing

2005-10-17 Thread David Pratt
Many thanks Steve. This is good information. I think this should work fine. I was doing a string.replace in a cleanData() method with the following characters but don't know if that would have done it. This contains all the control characters that I really know about in normal use. ord(c) 32

[no subject]

2005-10-17 Thread Finn Waldrip
!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN HTMLHEAD TITLE404 Not Found/TITLE /HEADBODY H1Not Found/H1 The requested URL was not found on this server.P HR ADDRESSApache/1.3.31/ADDRESS /BODY/HTML -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing Python at Work

2005-10-17 Thread Jaime Wyant
The python interpreter doesn't do anything other than what you tell it. That is, the standard python installation does not install any `secret programs' that run in the background. Like most tools, Python is as benign as it's user. However, unlike most tools even benign users can be powerful.

Writing an immutable object in python

2005-10-17 Thread Mapisto
Hi, I've noticed that if I initialize list of integers in the next manner: my_list = [0] * 30 It works just fine, even if I'll try to assign one element: id( my_list[4] ) 10900116 id( my_list[6] ) 10900116 my_list[4] = 6 id( my_list[4] ) 10900044 id( my_list[6] ) 10900116 The change in

NYLUG meeting: 10/26 The Python Object Model with Alex Martelli Google (open bar and food!)

2005-10-17 Thread Ron Guerin
(date and time inadvertently omitted last time. sorry!) The New York Linux User's Group invites you to a special presentation by Alex Martelli of Google, on the Python Object Model. This presentation will be held at P.J. Clarke's Sidecar, rather than our usual location, and Google is picking up

Re: can a cut-down Python still be Python?

2005-10-17 Thread The Eternal Squire
No, but the BFDL has the corner on the Zen of Python. What he says, evidently goes. -- http://mail.python.org/mailman/listinfo/python-list

Re: can a cut-down Python still be Python?

2005-10-17 Thread The Eternal Squire
Oops, I meant to say BDFL. Sorry about the transpose. -- http://mail.python.org/mailman/listinfo/python-list

Problem Pythoncard tutorial

2005-10-17 Thread LenS
Under the Getting Started with Pythoncard there is a short little example of changing the starter1.py. I have made the 2 changes and when I run the program I get the following error: Traceback error ... result = dialog.alertDialog(self, 'It works!', 'Showing Off') NameError: name 'self' is

Re: Stripping ASCII codes when parsing

2005-10-17 Thread Steve Holden
David Pratt wrote: [about ord(), chr() and stripping control characters] Many thanks Steve. This is good information. I think this should work fine. I was doing a string.replace in a cleanData() method with the following characters but don't know if that would have done it. This contains

Re: Writing an immutable object in python

2005-10-17 Thread Diez B. Roggisch
The change in the poision occurs becouse int() is an immutable object. if I will do the same with a user-defined object, This reference manipulating will not happen. So, every entry in the array will refer to the same instance. Is there a way to bypass it (or perhaps to write a

Re: Installing Python at Work

2005-10-17 Thread Nikola
Many thanks. I know it sounds like a silly question, but it's the company's laptop etc. Does Python allow conflicting statements? :) -- http://mail.python.org/mailman/listinfo/python-list

newbie regex

2005-10-17 Thread csselo
Hi I want to filter some strings,but i don t know how to use compile method. first character must be [a-zA-z] group and others can only be digits or letters. like a24354trt,Tsd1234 -- http://mail.python.org/mailman/listinfo/python-list

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 17)

2005-10-17 Thread Cameron Laird
QOTW: If you don't have the time to be paranoid, try taking the time to straighten out identity theft. -- K. G. Schneider The best way to make classes on the fly is generally to call the metaclass with suitable parameters (just like, the best way to make instances of any type is generally to call

Re: Run process with timeout

2005-10-17 Thread Micah Elliott
On Oct 17, Alex Martelli wrote: Natan [EMAIL PROTECTED] wrote: I have a python script under linux where I poll many hundreds of interfaces with mrtg every 5 minutes. Today I create some threads and use os.system(command) to run the process, but some of them just hang. I would like to

Re: Installing Python at Work

2005-10-17 Thread Steve Holden
Nikola wrote: Many thanks. I know it sounds like a silly question, but it's the company's laptop etc. Does Python allow conflicting statements? :) Actually it sounds like a meaningless question, but that's only because I'm not a mind-reader. ;-) I'm sure *you* know what you mean, it's

Re: How do you draw this layout with wxpython?

2005-10-17 Thread Tony Nelson
In article [EMAIL PROTECTED], Young H. Rhiu [EMAIL PROTECTED] wrote: See: http://hilug.org/img/app_layout.GIF I'm implementing an album-like application with wxpython but I'm new to wxPython though I know how to program with python. The problem is that it's not easy for me to deal with

Re: List of strings to list of floats ?

2005-10-17 Thread Madhusudan Singh
[EMAIL PROTECTED] wrote: Madhusudan Is it possible to convert a very long list of strings to a Madhusudan list of floats in a single statement ? Madhusudan I have tried float(x) and float(x[:]) but neither work. I Madhusudan guess I would have to write a loop if there

Re: Comparing lists

2005-10-17 Thread Christian Stapfer
Alex Martelli [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Christian Stapfer [EMAIL PROTECTED] wrote: This is why we would like to have a way of (roughly) estimating the reasonableness of the outlines of a program's design in armchair fashion - i.e. without having to write any

  1   2   3   >