Re: convert list of tuples into several lists

2005-02-10 Thread Steven Bethard
Cappy2112 wrote: What does the leading * do? Tells Python to use the following iterable as the (remainder of the) argument list: py> def f(x, y): ... print x, y ... py> f([1, 2]) Traceback (most recent call last): File "", line 1, in ? TypeError: f() takes exactly 2 arguments (1 given) py>

Re: That horrible regexp idiom

2005-02-10 Thread alex23
Stephen Thorne wrote: > We've all seen it before. Its a horrible idiom that you would achieve > in another language by doing: > > if (m = foo_pattern.search(subject)) > { } > else > { } > > but it occured to me today, that it is possible to do it in python > without the extra line. > > '>>> for m i

Re: Is email package thread safe? (fwd)

2005-02-10 Thread Antoon Pardon
Op 2005-02-09, Roman Suzi schreef <[EMAIL PROTECTED]>: > On Wed, 9 Feb 2005, Antoon Pardon wrote: > >> Op 2005-02-09, Roman Suzi schreef <[EMAIL PROTECTED]>: >>> >>> Just to be sure, is email package of Python 2.3 thread-safe or not >>> (to use, for example, in python-milter?) > >>> Can I assume th

Re: empty classes as c structs?

2005-02-10 Thread Alex Martelli
Steven Bethard <[EMAIL PROTECTED]> wrote: > I'm not sure how much _I_ like them... =) It makes me uneasy that > > del b.x > print b.x > > doesn't throw an AttributeError. OTOH, if you're using namespaces as > the equivalent of nested scopes, deleting all 'x' attributes is probably > n

Re: strange behaviour with decorators.

2005-02-10 Thread Antoon Pardon
Op 2005-02-09, Delaney, Timothy C (Timothy) schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Ah, yes, the penny dropped. The try: except where there because >> originally there were other statements I wanted to test and I >> didn't want the raise exception by the inc(-2) stop the script. >>

deepcopy chokes with TypeError on dynamically assigned instance method

2005-02-10 Thread 5ÛHH575-UAZWKVVP-7H2H48V3
(see end of message for example code) When an instance has a dynamically assigned instance method, deepcopy throws a TypeError with the message "TypeError: instancemethod expected at least 2 arguments, got 0". Tested with Python 2.3.4 on OpenBSD and Python 2.4 on Win98; same results. Is this a b

Re: Vectors in Visual Python

2005-02-10 Thread Alex Martelli
Arthur <[EMAIL PROTECTED]> wrote: > thinking that the visciousness with wihich you were attacking someone > suggesting a proposal for an optional feature - even if an iill > adivised proposal for and ill advised optional feature (I frankly > don't care much about that part of the discussion one wa

Re: Is Python as capable as Perl for sysadmin work?

2005-02-10 Thread Richie Hindle
[Steve] > Was it INTERCAL that had the COMEFROM statement instead of > GOTO? I REALLY like the idea of a COMEFROM statement. I think python should > have a COMEFROM statement It does - see http://entrian.com/goto/ (In case you doubt it: yes, it works, but note that it doesn't work at the intera

pyFMOD writing a callback function in Python

2005-02-10 Thread Marian Aldenhövel
Hi, I am using the FMOD audio-library with the pyFMOD python bindings. pyFMOD uses ctypes. It is possible to register callback functions with FMOD that are called at certain points in the processing pipeline or when certain events happen. I am expecially interested in the one that fires when a curr

SAP IDOC with python

2005-02-10 Thread Jaco Smuts
Hello there I'm tinkering with parsing SAP IDOC's using Python. (initially reading possibly creating later on) I can get a C header file someCode.h from SAP describing the contents / structure of a document. I wondered if this file in conjunction with SWIG will be any use? Any one got any ex

Re: Python-list Digest, Vol 13, Issue 85

2005-02-10 Thread Dave Beech
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, October 06, 2004 6:35 AM Subject: Python-list Digest, Vol 13, Issue 85 > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.

Re: Python-list Digest, Vol 13, Issue 102

2005-02-10 Thread Dave Beech
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Thursday, October 07, 2004 1:04 AM Subject: Python-list Digest, Vol 13, Issue 102 > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.

How to quit a Tkinter application

2005-02-10 Thread Brian Colfer
Title: Message If I set up a menu item to Exit and use root.quit the application quits but I get a thread terminated abnormaly error.   BTW I'm using Pmw to create the menu and items.   primary email: [EMAIL PROTECTED]blog: http://briancolferblog.blogspot.com/M

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-10 Thread Phil Thompson
> After quite a while of wxPython I'm getting back into PyQt, mainly due > to the announcement by Trolltech that they will make a GPL version of > Qt4 for Windows (and Phil-T said he will make a PyQt to go with it > eventually!) > > I'm currently using PyQt 3.12 that comes with the BlackAdder demo,

Re: convert list of tuples into several lists

2005-02-10 Thread Oliver Eichler
Pierre Barbier de Reuille wrote: > Best answer is : try it :) > use the "timeit" module (in the standard lib) to do so ... Ok, import timeit s = """\ a,b,c1,c2 = zip(*[(x[2],x[4], x[2]-x[1], x[2] - x[3]) for x in z]) """ t = timeit.Timer(stmt=s,setup="z = [(1,2,3,4,5)]*1000") print "%.2f usec/p

thread / twisted defered etc...

2005-02-10 Thread Gustavo Rahal
Hi To practice some programming skills I would like to make a mp3 player that fetches lyrics from websites. I want to use PyGTK and gstreamer. I started some coding and i'm already stuck with the first problem. Gtk freezes waiting for the lyric to be fetched, which I guess was expected. How to so

Re: Newbie: SWIG or SIP?

2005-02-10 Thread Phil Thompson
> I have a third-party DLL and it's associated .h file. The DLL was written > in C. I have neither the associated .c files nor the .obj files for the > DLL. Can I use SWIG or SIP to build something that will allow me to use > the > DLL with Python? And what is that something, an .obj file, anot

hard_decoding

2005-02-10 Thread Tamas Hegedus
Hi! Do you have a convinient, easy way to remove special charachters from u'strings'? Replacing: ÀÁÂÃÄÅ => A èéêë=> e etc. 'L0xe1szl0xf3' => Laszlo or something like that: 'L\xc3\xa1szl\xc3\xb3' => Laszlo Thanks, Tamas -- Tamas Hegedus, Research Fellow | phone: (1) 480-301-6041 Mayo Clinic S

Re: variable declaration

2005-02-10 Thread Antoon Pardon
Op 2005-02-08, Fredrik Lundh schreef <[EMAIL PROTECTED]>: > Peter Otten wrote: > >>> executed. the compiler handles "global" and "from __future__", everything >>> else is done at runtime. >> >> and __debug__, too, it seems: > > you left out the "python -O" line. > > __debug__ >> False > def

Re: convert list of tuples into several lists

2005-02-10 Thread Oliver Eichler
Pierre Barbier de Reuille wrote: > > Best answer is : try it :) > use the "timeit" module (in the standard lib) to do so ... Ok, (a second time. I hope the first post was cancelled as it was false) import timeit s = """\ a,b,c1,c2 = zip(*[(x[2],x[4], x[2]-x[1], x[2] - x[3]) for x in z]) """ t

Re: Some questions...

2005-02-10 Thread bruno modulix
Mario Lacunza wrote: Hello, Im new in Python, please I need some information: - Somebody know if: is possible use Python within Net Framework in windows environment?? http://www.ironpython.com/ http://www.zope.org/Members/Brian/PythonNet/ - Where found info about reports in Python? exist some prog

sre is broken in SuSE 9.2

2005-02-10 Thread Denis S. Otkidach
On all platfroms \w matches all unicode letters when used with flag re.UNICODE, but this doesn't work on SuSE 9.2: Python 2.3.4 (#1, Dec 17 2004, 19:56:48) [GCC 3.3.4 (pre 3.3.5 20040809)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> re.compil

Re: hard_decoding

2005-02-10 Thread Peter Maas
Tamas Hegedus schrieb: Do you have a convinient, easy way to remove special charachters from u'strings'? Replacing: ÀÁÂÃÄÅ => A èéêë=> e etc. 'L0xe1szl0xf3' => Laszlo or something like that: 'L\xc3\xa1szl\xc3\xb3' => Laszlo >>> ord(u'ë') 235 >>> ord(u'e') 101 >>> cmap = {235:101} >>> u'he

Re: probably weird or stupid newbie dictionary question

2005-02-10 Thread Nick Craig-Wood
Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > But what happens in case of a hash code clash? Then a list of (key, values) > is stored, and for a passed key, each key in that list is additionally > compared for being equal to the passed one. So another requirement of > hashable objecst is the co

Re: convert list of tuples into several lists

2005-02-10 Thread Nick Craig-Wood
Cappy2112 <[EMAIL PROTECTED]> wrote: > What does the leading * do? It causes the list/tuple following the * to be unpacked into function arguments. Eg >>> zip(*[(1, 2, 3), (4, 5, 6)]) [(1, 4), (2, 5), (3, 6)] is the same as >>> zip((1, 2, 3), (4, 5, 6)) [(1, 4), (2, 5), (3, 6)] The * should m

Re: variable declaration

2005-02-10 Thread Antoon Pardon
Op 2005-02-09, Nick Coghlan schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Op 2005-02-08, Nick Coghlan schreef <[EMAIL PROTECTED]>: >>>The CPython *_FAST opcodes relate to functions' local variables. Behind the >>>scenes they are implemented as integer indexing operations into a pre-sized

Re: A great Alan Kay quote

2005-02-10 Thread jfj
Peter Hansen wrote: Grant Edwards wrote: In an interview at http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=273 Alan Kay said something I really liked, and I think it applies equally well to Python as well as the languages mentioned: I characterized one way of looking at language

Re: Python and version control

2005-02-10 Thread Nick Craig-Wood
Sergei Organov <[EMAIL PROTECTED]> wrote: > Carl <[EMAIL PROTECTED]> writes: > > [...] > > I am a keen user of Emacs, but version control, which is very simple > > when you are in a Linux environment, for example, is not a > > straightforward in Windows. > > Emacs + CVS (or CVSNT) should work

Re: That horrible regexp idiom

2005-02-10 Thread Ville Vainio
> "Stephen" == Stephen Thorne <[EMAIL PROTECTED]> writes: Stephen> We've all seen it before. Its a horrible idiom that you Stephen> would achieve in another language by doing: Stephen> if (m = foo_pattern.search(subject)) Stephen> { } Stephen> else Stephen> { } S

Re: Loop in list.

2005-02-10 Thread beliavsky
Jim wrote: > Wow! All I wanted to do was write the equivalence > of the Fortran statement: Real*4 matrix(n,n). If you are doing numerical linear algebra in Python, you should use the Numeric or Numarray modules. With Numeric, the equivalent is just from Numeric import zeros matrix = zeros([n,n]

Re: sre is broken in SuSE 9.2

2005-02-10 Thread Serge Orlov
Denis S. Otkidach wrote: > On all platfroms \w matches all unicode letters when used with flag > re.UNICODE, but this doesn't work on SuSE 9.2: > > Python 2.3.4 (#1, Dec 17 2004, 19:56:48) > [GCC 3.3.4 (pre 3.3.5 20040809)] on linux2 > Type "help", "copyright", "credits" or "license" for more infor

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-10 Thread Jason Tishler
Dean, On Wed, Feb 09, 2005 at 08:15:43AM -0800, Dean N. Williams wrote: > The "$ TMP=/tmp rebaseall" command worked! Thank you. You are quite welcome. > When a new Cygwin is available w/ your changes please let me know... Sorry, but the above does not scale. If you subscribe to cygwin-announce

Re: Freebsd thread/signal problem

2005-02-10 Thread Andrew MacIntyre
snacktime wrote: This is on freebsd 5.3-release-p2 with python 2.4 and twisted both installed from ports. I tested it on Debian (sarge) and the signals work fine. I don't have a 5.x system usable at the moment, but last time I looked there were 3 possible threading options - the 4.x libc_r, libk

Re: sre is broken in SuSE 9.2

2005-02-10 Thread Denis S. Otkidach
On Thu, 10 Feb 2005 13:00:42 +0300 "Denis S. Otkidach" <[EMAIL PROTECTED]> wrote: > On all platfroms \w matches all unicode letters when used with flag > re.UNICODE, but this doesn't work on SuSE 9.2: > > Python 2.3.4 (#1, Dec 17 2004, 19:56:48) > [GCC 3.3.4 (pre 3.3.5 20040809)] on linux2 > Typ

Re: negative integer division

2005-02-10 Thread Mike Meyer
Jive Dadson <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> [C] isn't - it's a portable assembler. > > I've heard that many times, but it makes no sense to me. By definition, > the syntax of an assembly language closely resembles the format of > individual hardware instructions for a particula

Re: variable declaration

2005-02-10 Thread Nick Coghlan
Antoon Pardon wrote: Well it seems you have some fair points. I'll just stop here stating that I would like to have it, even if it proved to be slower. Speed is not that big a factor in the things I write. Oh, certainly. I wasn't suggesting the speed hit was enough to kill the idea - I was just po

Re: empty classes as c structs?

2005-02-10 Thread Nick Coghlan
Alex Martelli wrote: Nick Coghlan <[EMAIL PROTECTED]> wrote: For bindings, you could just go with standard Python semantics - normal name binding always happens in the innermost scope, so binding a name in a namespace should happen in the directly referenced namespace. Then you can shadow names fro

Re: Loop in list.

2005-02-10 Thread Jim
I did appreciate the reference. I started with Fortran on an IBM (7040 maybe, not sure) using keypunched cards. Some of the concepts of the newer languages take some to seem useable. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Vectors in Visual Python

2005-02-10 Thread Arthur
On Thu, 10 Feb 2005 09:59:41 +0100, [EMAIL PROTECTED] (Alex Martelli) wrote: >Arthur <[EMAIL PROTECTED]> wrote: > >> thinking that the visciousness with wihich you were attacking someone >> suggesting a proposal for an optional feature - even if an iill >> adivised proposal for and ill advised opt

passing arguments like -JOB

2005-02-10 Thread John Leslie
I am porting a script from Korn Shell to python and want to pass named parameters like -JOB 123456 -DIR mydir I can get it to work passing --JOB and --DIR but not -JOB and -DIR Any ideas? Current code : try: options, xarguments = getopt.getopt(sys.argv[1:], '', ['JOB=', 'DIR=', 'ERR=', 'GRP

Re: hard_decoding

2005-02-10 Thread John Lenton
On Wed, Feb 09, 2005 at 05:22:12PM -0700, Tamas Hegedus wrote: > Hi! > > Do you have a convinient, easy way to remove special charachters from > u'strings'? > > Replacing: > ÀÁÂÃÄÅ=> A > èéêë => e > etc. > 'L0xe1szl0xf3' => Laszlo > or something like that: > 'L\xc3\xa1szl\xc3\xb3' => La

Re: A great Alan Kay quote

2005-02-10 Thread alex23
jfj wrote: > Bah. My impressions from the interview was "there are no good > languages anymore. In my time we made great languages, but today > they all suck. Perl for example" That was kind of what I took from it as well. Don't get me wrong, I've a lot of respect for Kay's contributions...he

pyclbr

2005-02-10 Thread Fernando San Martín Woerner
Hi guys! i'm using pycblr to implement a class browser for my app, i got some issues about it: i did: dict = pyclbr.readmodule(name, [dir] + sys.path) but this only works one time, i mean if module "name" is changed and some class were added or removed i can't see any changes even if i execute

some question about tp_basicsize

2005-02-10 Thread Dmitry Belous
Hi, All I use C++ to create new types(inherited from PyTypeObject) and objects(inherited from PyObject) and virtual destructor to destroy objects. sizeof() is different for different objects and therefore i don't know what i must do with tp_basicsize. Will the following source code work? Must i s

Re: variable declaration

2005-02-10 Thread Antoon Pardon
Op 2005-02-10, Nick Coghlan schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Well it seems you have some fair points. I'll just stop here stating >> that I would like to have it, even if it proved to be slower. Speed >> is not that big a factor in the things I write. > > Oh, certainly. I wasn

Re: Testing conditions.

2005-02-10 Thread Nick Coghlan
Ray Gibbon wrote: Before I resign myself to the inevitable, 'that's the way it is - get used to it', I'd just like to scratch it once. But, before I try walking on very thin ice, I want to ask whether there are expectations of some future changes which address these issues? I note PEP 3000 is sile

Re: Loop in list.

2005-02-10 Thread Jim
I assume this is one of the addons for Python. I know that there is a great deal of stuff out there available for Python that does some of the stuff that I am looking at, but I am interested in learning to use Python. When I want to get faster and more general, I will get some of this stuff or us

implementing singleton class at the module level

2005-02-10 Thread Satchidanand Haridas
Hi, I was looking at ways to implement a Singleton class. I saw some methods described on the PythonSingleton wiki (http://c2.com/cgi/wiki?PythonSingleton). I implemented the following. module: A.py -- class Singleton: def __init__(self): #do something singleton_ins

Re: That horrible regexp idiom

2005-02-10 Thread Nick Coghlan
Stephen Thorne wrote: Hi, import re foo_pattern = re.compile('foo') '>>> m = foo_pattern.search(subject) '>>> if m: '>>>pass '>>> else: '>>>pass Heh. Did you see Ray Gibbons's 'Testing Conditions' post before you sent this? I knew if/elif was a much better argument in favour of embedded as

Re: passing arguments like -JOB

2005-02-10 Thread Duncan Booth
John Leslie wrote: > I am porting a script from Korn Shell to python and want to pass named > parameters like -JOB 123456 -DIR mydir > > I can get it to work passing --JOB and --DIR but not -JOB and -DIR > > Any ideas? > Unfortunately (for you), I think you will find most or all of the existing

Re: deepcopy chokes with TypeError on dynamically assigned instance method

2005-02-10 Thread Nick Coghlan
5ÛHH575-UAZWKVVP-7H2H48V3 wrote: class Foo(list): "Foo" def __init__(self, l=[]): Change this too: def __init__(self, l=None): if l is None: l = [] And see if your problem goes away. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --

Re: Reportlab and Barcodes

2005-02-10 Thread Jaime Wyant
That looks cleaner than mine. I had to do this -> # Register the barcode true-type-font # Don't want to push the font out to everyone in the office... from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont pdfmetrics.registerFont( TTFont( 'barcode', r'c:\inetpub\www

lambda and for that matter goto not forgetting sugar

2005-02-10 Thread Philip Smith
I've read with interest the continuing debate about 'lambda' and its place in Python. Just to say that personally I think its an elegant and useful construct for many types of programming task (particularly number theory/artificial intelligence/genetic algorithms) I can't think why anyone woul

OT: Anyone want a GMail account?

2005-02-10 Thread Chris Cioffi
I've got 50 so if you want a GMail invite reply directly to me and I'll send our an invite. Chris Cioffi -- "It is our responsibilities, not ourselves, that we should take seriously." -- Peter Ustinov -- http://mail.python.org/mailman/listinfo/python-list

is there a safe marshaler?

2005-02-10 Thread Irmen de Jong
Pickle and marshal are not safe. They can do harmful things if fed maliciously constructed data. That is a pity, because marshal is fast. I need a fast and safe (secure) marshaler. Is xdrlib the only option? I would expect that it is fast and safe because it (the xdr spec) has been around for so lo

Re: newbie question

2005-02-10 Thread Peter Hansen
Dan Perl wrote: I can't say that is not part of the reason, but the example in the OP is a clear illustration of cases where something like an increment/decrement operator would be very useful. The OP didn't show how he was using the "while (n--)" at all, so it can hardly be a clear illustratio

Re: That horrible regexp idiom

2005-02-10 Thread Duncan Booth
Nick Coghlan wrote: > I knew if/elif was a much better argument in favour of embedded > assignment than while loops are. > I know I'm going to regret posting this, but here is an alternative, very hackish way to do all those things people keep asking for, like setting variables in outer scopes

Re: is there a safe marshaler?

2005-02-10 Thread Pierre Barbier de Reuille
Irmen de Jong a écrit : Pickle and marshal are not safe. They can do harmful things if fed maliciously constructed data. That is a pity, because marshal is fast. I need a fast and safe (secure) marshaler. Is xdrlib the only option? I would expect that it is fast and safe because it (the xdr spec) h

Re: convert list of tuples into several lists

2005-02-10 Thread Nick Coghlan
Steven Bethard wrote: Peter Hansen wrote: Steven Bethard wrote: Diez B. Roggisch wrote: zip(*[(1,4),(2,5),(3,6)]) While this is also the approach I would use, it is worth noting that Guido thinks of this as an abuse of the argument passing machinery: http://mail.python.org/pipermail/python-dev/2

Re: newbie question

2005-02-10 Thread Dan Perl
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Perl wrote: >> OTOH, I was thinking of saying in my previous posting that I prefer >> for n in range(start, 0, -1): >> to >> n = start >> while (n--) >> I think that the first form is more readable, altho

Re: sre is broken in SuSE 9.2

2005-02-10 Thread Denis S. Otkidach
On 10 Feb 2005 03:59:51 -0800 "Serge Orlov" <[EMAIL PROTECTED]> wrote: > > On all platfroms \w matches all unicode letters when used with flag > > re.UNICODE, but this doesn't work on SuSE 9.2: [...] > I can get the same results on RedHat's python 2.2.3 if I pass re.L > option, it looks like this

Re: lambda and for that matter goto not forgetting sugar

2005-02-10 Thread Nick Coghlan
Philip Smith wrote: I've read with interest the continuing debate about 'lambda' and its place in Python. Just to say that personally I think its an elegant and useful construct for many types of programming task (particularly number theory/artificial intelligence/genetic algorithms) I can't t

Re: Is Python as capable as Perl for sysadmin work?

2005-02-10 Thread Nick Coghlan
Richie Hindle wrote: [Steve] Was it INTERCAL that had the COMEFROM statement instead of GOTO? I REALLY like the idea of a COMEFROM statement. I think python should have a COMEFROM statement It does - see http://entrian.com/goto/ (In case you doubt it: yes, it works, but note that it doesn't work

Two questions: python/Net(c#) and Win Raw sockets?

2005-02-10 Thread Simon Roses Femerling
Hi all,   First Question: Anyone has experience with any of this Python/Net implementations:   - PythonNet - IronPython - Boo   Which is best for using in a c# app for embedding and extending ?   Second Question: I know that python 2.3 _socket.dll was not compile with raw socket support on wi

Re: variable declaration

2005-02-10 Thread Nick Coghlan
Antoon Pardon wrote: I don't think that would be a big issue. Python uses '=' also differently from a number of languages. My preference would currently be for ':=' because I have the impression that if you don't leave spaces the period in '.=' tends to be obscured. x.=42 vsx:=42 seems a cl

Re: convert list of tuples into several lists

2005-02-10 Thread Peter Hansen
Nick Coghlan wrote: I never really got the impression that Guido was particularly *strongly* opposed to this use of the extended call syntax. Merely that he was concerned that it would break down if the relevant list turned out to be large (that is, the abuse is using *args with a list when the

Re: lambda and for that matter goto not forgetting sugar

2005-02-10 Thread Richie Hindle
[Philip] > For that matter I would find implementing the classical algorithms far > easier if python had 'goto' I can't believe it - first a request for COMEFROM and now one for GOTO, both on the same day. I should have put http://entrian.com/goto/ under a commercial license. 8-) -- Richie H

Re: wxgrid multiline cell editor

2005-02-10 Thread jean-michel
"James" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > wxpython 2.5.3 > anyone know how to make a multiline cell editor for wxgrid? Hello, You can do that by a "wxGridCellAutoWrapStringEditor". You can test it by modifying GridSimple.py in the demo by adding (at line 24 i

¿ù1%´ë ¹ýÁ¤±Ý¸®Áؼö ÃÖ°í5000¸¸¿ø±îÁö!

2005-02-10 Thread ÀÌÇÏ´Ã15
Title: www.kc-loan.com -- http://mail.python.org/mailman/listinfo/python-list

Re: sre is broken in SuSE 9.2

2005-02-10 Thread Daniel Dittmar
Denis S. Otkidach wrote: On all platfroms \w matches all unicode letters when used with flag re.UNICODE, but this doesn't work on SuSE 9.2: I think Python on SuSE 9.2 uses UCS4 for unicode strings (as does RedHat), check sys.maxunicode. This is not an explanation, but perhaps a hint where to look

python equivalent to access reports

2005-02-10 Thread flupke
Hi, a lot of applications here a made with access. Tables, forms, reports and the like. Now i rather use Python to do this but i'm not sure how to proceed. I can use wxPython for a gui via wxGlade for rapid testing and design (forms), MySQL as db (tables) but the report part is what's bothering

Re: python equivalent to access reports

2005-02-10 Thread flupke
flupke wrote: Hi, a lot of applications here a made with access. Tables, forms, reports and the like. Now i rather use Python to do this but i'm not sure how to proceed. I can use wxPython for a gui via wxGlade for rapid testing and design (forms), MySQL as db (tables) but the report part is wha

Re: sre is broken in SuSE 9.2

2005-02-10 Thread Denis S. Otkidach
On Thu, 10 Feb 2005 16:23:09 +0100 Daniel Dittmar <[EMAIL PROTECTED]> wrote: > Denis S. Otkidach wrote: > > > On all platfroms \w matches all unicode letters when used with flag > > re.UNICODE, but this doesn't work on SuSE 9.2: > > I think Python on SuSE 9.2 uses UCS4 for unicode strings (as do

Re: Reportlab and Barcodes

2005-02-10 Thread Josh
Damjan, Code39 here refers to part of the Barcode Extensions available to Reportlabs. It can be imported as such from reportlab.extensions.barcode import code39 Josh -- http://mail.python.org/mailman/listinfo/python-list

Re: Datatype of non-negative values

2005-02-10 Thread Dirk Hagemann
A result smaller than 0 should be just invalid. I'd like to work with "try" and "except" like this: value=20 try: value=value-23 except: print 'value is smaller than 23' Now it should run into the "except". Dirk Hagemann Larry Bates <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PRO

Variable size plot symbols, variable hue plot colors in Python (MatPlotLib) ?

2005-02-10 Thread Dr. Colombes
Using MatPlotLib plot function, is there a way to get variable size plot symbols? For example, using symbol strings like 'o' (circle), 's' (square), 'x' (cross), etc., is there a way to specify other plot symbols such a small circle, Medium square, LARGE cross, etc.? Similarly, using the MatPlotL

goto, cls, wait commands

2005-02-10 Thread BOOGIEMAN
I've just finished reading Python turtorial for non-programmers and I haven't found there anything about some usefull commands I used in QBasic. First of all, what's Python command equivalent to QBasic's "goto" ? Secondly, how do I clear screen (cls) from text and other content ? And last, how do I

Re: negative integer division

2005-02-10 Thread Mark Jackson
[EMAIL PROTECTED] (John Machin) writes: > [EMAIL PROTECTED] (Mark Jackson) wrote in message news:<[EMAIL PROTECTED]>... > > > > A: 42 > > > > Q: What multiple of 7 did I add to the critical expression in the Zeller > > algorithm so it would remain nonnegative for the next few centuries? >

Re: goto, cls, wait commands

2005-02-10 Thread Fouff
BOOGIEMAN a écrit : I've just finished reading Python turtorial for non-programmers and I haven't found there anything about some usefull commands I used in QBasic. First of all, what's Python command equivalent to QBasic's "goto" ? I had a professor that told me that using goto in prog is that the

Re: is there a safe marshaler?

2005-02-10 Thread [EMAIL PROTECTED]
Irmen de Jong wrote: > Pickle and marshal are not safe. They can do harmful > things if fed maliciously constructed data. > That is a pity, because marshal is fast. I think marshal could be fixed; the only unsafety I'm aware of is that it doesn't always act rationally when confronted with incorrec

Re: goto, cls, wait commands

2005-02-10 Thread Duncan Booth
BOOGIEMAN wrote: > I've just finished reading Python turtorial for non-programmers > and I haven't found there anything about some usefull commands I used > in QBasic. First of all, what's Python command equivalent to QBasic's > "goto" ? There isn't one. Why do you think you need this? > Secondl

Re: goto, cls, wait commands

2005-02-10 Thread TZOTZIOY
On Thu, 10 Feb 2005 16:59:04 +0100, rumours say that BOOGIEMAN <[EMAIL PROTECTED]> might have written: Best advice: try to forget QBasic, and try again reading the tutorial. That, if your post is serious. If it isn't, keep reading my reply :) >I've just finished reading Python turtorial for non

Re: goto, cls, wait commands

2005-02-10 Thread Grant Edwards
On 2005-02-10, BOOGIEMAN <[EMAIL PROTECTED]> wrote: > First of all, what's Python command equivalent to QBasic's "goto" ? There isn't one. One defines functions and calls them. One uses for and while loops. One uses list comprehensions. One uses if/elif/else. > Secondly, how do I clear scre

Re: [noob] Questions about mathematical signs...

2005-02-10 Thread administrata
Steve Holden <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > administrata wrote: > > > Hi! I'm programming maths programs. > > And I got some questions about mathematical signs. > > > > 1. Inputing suqare like a * a, It's too long when I do time-consuming > >things. Can it

Re: sre is broken in SuSE 9.2

2005-02-10 Thread Fredrik Lundh
Denis S. Otkidach wrote: >> > On all platfroms \w matches all unicode letters when used with flag >> > re.UNICODE, but this doesn't work on SuSE 9.2: >> >> I think Python on SuSE 9.2 uses UCS4 for unicode strings (as does >> RedHat), check sys.maxunicode. >> >> This is not an explanation, but perh

Re: sre is broken in SuSE 9.2

2005-02-10 Thread Serge Orlov
Denis S. Otkidach wrote: > On 10 Feb 2005 03:59:51 -0800 > "Serge Orlov" <[EMAIL PROTECTED]> wrote: > > > > On all platfroms \w matches all unicode letters when used with flag > > > re.UNICODE, but this doesn't work on SuSE 9.2: > [...] > > I can get the same results on RedHat's python 2.2.3 if I p

Re: executing VBScript from Python and vice versa

2005-02-10 Thread Valentina Boycheva
A while ago I asked how VBScript can be called from Python. The two answers I received suggested using win32com.client and MSScriptControl.ScriptControl. This solution required embedding the VBScript code inside the Python script. Here's a shell approach that runs an existing VBScript file: Pyth

Re: is there a safe marshaler?

2005-02-10 Thread Irmen de Jong
Pierre Barbier de Reuille wrote: Irmen de Jong a écrit : Pickle and marshal are not safe. They can do harmful things if fed maliciously constructed data. That is a pity, because marshal is fast. I need a fast and safe (secure) marshaler. Is xdrlib the only option? I would expect that it is fast and

Re: is there a safe marshaler?

2005-02-10 Thread Irmen de Jong
Hello Guido [EMAIL PROTECTED] wrote: Irmen de Jong wrote: Pickle and marshal are not safe. They can do harmful things if fed maliciously constructed data. That is a pity, because marshal is fast. I think marshal could be fixed; the only unsafety I'm aware of is that it doesn't always act rationall

Is this a bug? BOM decoded with UTF8

2005-02-10 Thread pekka niiranen
Hi there, I have two files "my.utf8" and "my.utf16" which both contain BOM and two "a" characters. Contents of "my.utf8" in HEX: EFBBBF6161 Contents of "my.utf16" in HEX: FEFF6161 For some reason Python2.4 decodes the BOM for UTF8 but not for UTF16. See below: >>> fh = codecs.open("

Re: sre is broken in SuSE 9.2

2005-02-10 Thread Denis S. Otkidach
On Thu, 10 Feb 2005 17:46:06 +0100 "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > > Can --with-wctype-functions configure option be the > > source of problem? > > yes. > > that option disables Python's own Unicode database, and relies on the C > library's > wctype.h (iswalpha, etc) to behave prop

XDR? (was Re: is there a safe marshaler?)

2005-02-10 Thread PA
On Feb 10, 2005, at 15:01, Irmen de Jong wrote: Is xdrlib the only option? I would expect that it is fast and safe because it (the xdr spec) has been around for so long. XDR? Like Sun's "XDR: External Data Representation standard"? http://www.faqs.org/rfcs/rfc1014.html http://www.faqs.org/rfcs/rfc1

Re: goto, cls, wait commands

2005-02-10 Thread Alan Kennedy
[BOOGIEMAN] I've just finished reading Python turtorial for non-programmers and I haven't found there anything about some usefull commands I used in QBasic. First of all, what's Python command equivalent to QBasic's "goto" ? Oh no! You said the "G" word! That's a dirty word in computer science cir

Re: pyclbr

2005-02-10 Thread Dennis Benzinger
Fernando San MartÃn Woerner wrote: > Hi guys! > > i'm using pycblr to implement a class browser for my app, i got some > issues about it: > > i did: > > dict = pyclbr.readmodule(name, [dir] + sys.path) Don't use dict (or the name of any other built-in function) as an identifier! It shadows the

Re: Big development in the GUI realm

2005-02-10 Thread Stelios Xanthakis
Alex Martelli wrote: Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: hassle to code, but if your application could dynamically select from whatever toolkit is available on the machine, you (and I should emphasis that this is an impersonal/generic "you" I reference) might be able to argue an exemption

Re: is there a safe marshaler?

2005-02-10 Thread Alan Kennedy
[Irmen de Jong] Pickle and marshal are not safe. They can do harmful things if fed maliciously constructed data. That is a pity, because marshal is fast. I need a fast and safe (secure) marshaler. Hi Irmen, I'm not necessarily proposing a solution to your problem, but am interested in your require

Re: empty classes as c structs?

2005-02-10 Thread Steven Bethard
Alex Martelli wrote: Steven Bethard <[EMAIL PROTECTED]> wrote: I like the idea of chain, though, so I'll probably add the class with just __init__ and __getattribute__ to the current implementation. I'm willing to be persuaded, of course, but for the moment, since I can see a few different options

Re: Newbie: SWIG or SIP?

2005-02-10 Thread suryaprakashg
Look at this , this might be more simple to use http://starship.python.net/crew/theller/ctypes/ Phil Thompson wrote: > > I have a third-party DLL and it's associated .h file. The DLL was written > > in C. I have neither the associated .c files nor the .obj files for the > > DLL. Can I use SW

Re: newbie question

2005-02-10 Thread Jeff Shannon
Dennis Lee Bieber wrote: On Wed, 09 Feb 2005 18:10:40 -0800, Jeff Shannon <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: for i in range(n)[::-1]: func(n) Shouldn't that be func(i) (the loop index?) You're right, that's what I *meant* to say. (What, t

[N00B] What's %?

2005-02-10 Thread administrata
Hi! it's been about a week learning python! I've read 'python programming for the absolute begginer' I don't understand about % like... 107 % 4 = 3 7 % 3 = 1 I'm confused with division :/ Please help me... thx 4 reading. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >