Re: Tuple parameter unpacking in 3.x

2008-10-05 Thread Martin Geisler
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 04 Oct 2008 17:07:14 +0200, Martin Geisler wrote: > >> A somewhat related question: do I pay a performance penalty when I >> let a function define an inner function like this: >>

Re: Tuple parameter unpacking in 3.x

2008-10-05 Thread Martin Geisler
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 04 Oct 2008 22:57:23 +0200, Martin Geisler wrote: > > Here's another alternative. Compare: > >>>> x = (2, 3) >>>> (lambda (a,b): a*b)(x) > 6 > > with this: > >>>> (

image reduction script

2006-03-24 Thread Philippe Martin
Hi, I need to write a script to reduce the resolution/color depth of an image (ex: .jpg) based on a target size. The point is for the target picture to still be "understandable" - yet I target getting down to 5K. Are there libraries out there that could help me start ? Thanks Philippe -- ht

Re: image reduction script

2006-03-25 Thread Philippe Martin
Larry, I actually did not find what I needed in PIL (missed it ?) but found this package quite usefull: http://www.imagemagick.org/script/index.php Philippe Larry Bates wrote: > Philippe Martin wrote: >> Hi, >> >> I need to write a script to reduce the resolution/co

Re: image reduction script

2006-03-26 Thread Philippe Martin
Thanks, I'll give it a shot. Philippe Kamilche wrote: > > To reduce the color depth of an image in PIL: > im = im.convert(mode="P", palette=Image.ADAPTIVE) -- http://mail.python.org/mailman/listinfo/python-list

Re: image reduction script

2006-03-26 Thread Philippe Martin
Kamilche, I am posting the code in another thread but am not certain that convert does anything to the picture color depth ... still searching in the doc. Philippe Kamilche wrote: > > To reduce the color depth of an image in PIL: > im = im.convert(mode="P", palette=Image.ADAPTIV

PIL & image size reduction script

2006-03-26 Thread Philippe Martin
Hi, Thanks to the NG, I got the script hereunder working. 1) I am not certain that the call to convert does much (checking the doc) 2) Can this be improved as far as the final image size in (X,Y) ? For instance, passing a large .jpg with a target byte size of 7000, I get final (X,Y) results aro

Re: image reduction script

2006-03-26 Thread Philippe Martin
Kamilche wrote: > Be sure and use mode = P instead of RGB, like you have in your other > code. P is for palettized images. Don't palettize if you're storing as > JPG, only if you're storing as PNG or some other format that can handle > 256 color images. My problem is this: 1) If I use a save to

Re: PIL & image size reduction script

2006-03-27 Thread Philippe Martin
nikie wrote: > Philippe Martin wrote: >> Hi, >> >> Thanks to the NG, I got the script hereunder working. >> >> 1) I am not certain that the call to convert does much (checking the doc) > > I think you only need it if your source image comes in a format

Re: PIL & image size reduction script

2006-03-27 Thread Philippe Martin
PS: where can I find those extra parameters in the doc (ex: quality) ... I must be blind. Philippe nikie wrote: > Philippe Martin wrote: >> Hi, >> >> Thanks to the NG, I got the script hereunder working. >> >> 1) I am not certain that the call to convert do

Re: PIL & image size reduction script

2006-03-27 Thread Philippe Martin
Many thanks nikie wrote: > Philippe Martin wrote: >> PS: where can I find those extra parameters in the doc (ex: quality) ... >> I must be blind. > In the http://www.pythonware.com/library/pil/handbook/formats.htm page. > Look in the "JPEG" section. Different

Re: wx.checklistbox

2006-03-31 Thread Philippe Martin
Not sure I understand: a wx.CheckBox has up to three states (on, off ... does not apply/greyed) Is that what you read from your file ? Philippe luca72 wrote: > Hello > I write one file using:...(i think that is ok for write all the > lines of my list) > luca = open('/tmp/luca', 'w') > luc

Re: wx.checklistbox

2006-04-01 Thread Philippe Martin
Hi, I do not see where you close the file: I beleve you need to close it to flush information prior to reading again. Philippe luca72 wrote: > i have again one simple problem: > the script is this: > > def output(self): > global lista2 > lista2 = open('/lista2', 'w') >

Re: Python 2.5 licensing: stop this change

2006-04-03 Thread Philippe Martin
That was nasty Steve - at least I'm ready for any kind of bad new today ;-) Regards, Philippe Steve Holden wrote: > As the only director of the Python Software Foundation to vote against a > recent Board motion to implement the change in licensing terms described > in > >http://pyfound.b

Re: Registration Code

2006-04-03 Thread Philippe Martin
Hi, A suggestion: I would use encryption (ex: AES): Hide a secret key in your code and generate an encrypted (readable: ex 07 7B 6F ) version of the correct info (such as full release, or demo expire in ...) with that very same key. Have your software input that encrypted info (some GUI di

Re: Registration Code

2006-04-03 Thread Philippe Martin
Hi, Use the DES example here (DES has been cracked but is definitly secure enough for your need): http://www.amk.ca/python/writing/pycrypt/pycrypt.html Can't help you with the Dutch ;-) Philippe Math wrote: > P..Philippe.. > Where can I find some sample code if any? > And I'm not

Re: COM Server & wxPython

2006-04-03 Thread Philippe Martin
Hi, I do not know what your constraints are ... but, having been through the same thought process (because there is not VB6 _free_ calendar) ... I feel that getting to that stage _might_ justify rewriting the application in Python/wxPython (and potentially gain cross-platform compatibility in the

Loading a default browser under Windows

2006-04-03 Thread Philippe Martin
Hi, Is there (maybe through pywin) a way to call the default browser with a url as param ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Loading a default browser under Windows

2006-04-04 Thread Philippe Martin
BartlebyScrivener wrote: > Philippe, > > import webbrowser > > webbrowser.open("http://groups.google.com/group/comp.lang.python";) > > rpd Many thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Standalone Python functions in UML?

2006-04-04 Thread Philippe Martin
Roman Susi wrote: > Hi! > > Out of curiosity, how do I draw functions outside classes with UML? How > module could be drawn in this case? > I'm not up to par on the latest UML specs (or not too old) - but I don't believe UML handles that: it is called a class diagram after all. > More theoretic

Re: Standalone Python functions in UML?

2006-04-04 Thread Philippe Martin
But not in UML: a class diagram will represent classes while a sequence diagram objects. Philippe bruno at modulix wrote: > Philippe Martin wrote: >> Roman Susi wrote: >> > (snip) > >>>More theoretical question is if I create classes on the fly, how UML can &

Re: Python Decompilers?

2006-04-04 Thread Philippe Martin
I needed a laugh: funny but why ? Felipe Almeida Lessa wrote: > Em Ter, 2006-04-04 às 16:42 -0700, flamesrock escreveu: >> Hi, > > Hi > >> Are there any good decompilers for python? > > Yes > >> -Thanks > > You're welcome =) > -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Decompilers?

2006-04-04 Thread Philippe Martin
, Philippe Felipe Almeida Lessa wrote: > Em Ter, 2006-04-04 às 20:40 -0500, Philippe Martin escreveu: >> I needed a laugh: funny but why ? > > I made a simple answer for a simple question. =) > > Sometimes the way people ask things annoys me a lot, they seem to think > that

Re: PIL question about crop method

2006-04-05 Thread Philippe Martin
Yes John Salerno wrote: > John Salerno wrote: >> Diez B. Roggisch wrote: >> >>> Alternatively you can see it as boundary lines, in the order left, >>> top, right, bottom. >>> >>> (10, 20, 30, 100) >> >> So in the above, from where are the numbers being counted? 10 is ten >> pixels from the l

Re: How can I reduce the number of queries to my PostgreSQL database?

2006-04-08 Thread Martin Christensen
d information that would reasonably fit in one table on a web page or the equivalent - one query is always enough. Or perhaps that should be One Query Is Always Enough. :-) Learn at your own pace, though, but you might want to keep this in mind for future reference. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Compleated Begginers Guide. Now What?

2006-04-08 Thread Martin Christensen
am differently so that you only need one thread of execution. Then you can proceed to multi-threading when you have more experience. Martin -- http://mail.python.org/mailman/listinfo/python-list

Where python looks for path

2006-04-08 Thread Philippe Martin
Hi, I am currently packaging python and a few libraries: PyWin32, PySerial, PIL, wxPython, HTML generator, numarray for U3 distribution. Basically that means that the complete system initially in $path1\host will be moved dynamically to $path2\at execution. To take PIL as an example, I notice w

Re: Where python looks for path

2006-04-08 Thread Philippe Martin
PS: I forgot to say that on the win32api import I get a "DLL load failed" Philippe Philippe Martin wrote: > Hi, > > I am currently packaging python and a few libraries: PyWin32, PySerial, > PIL, wxPython, HTML generator, numarray for U3 distribution. > > B

Re: Where python looks for path

2006-04-08 Thread Philippe Martin
Hi, I had to move the dlls from pywin32_system32 to where python.exe is. PS: if someone has a great desire to have another library included in the package, let me know. Regards, Philippe Philippe Martin wrote: > Hi, > > I am currently packaging python and a few libraries

Re: how relevant is C today?

2006-04-10 Thread Philippe Martin
Hi, It is very hard to avoid C in embedded/low-level/industrial programming. Philippe John Salerno wrote: > Because of my 'novice-ness' in programming, I had always thought that C > was replaced by C++ and wasn't really used anymore today. I know that's > not the case at all now, but I'm stil

python + access + odbc + linux

2006-04-10 Thread Philippe Martin
Hi, I understand that access can be accessed through an ODBC driver under windows (instead of Jet). I am wondering if the same can be done under Linux. Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: python + access + odbc + linux

2006-04-10 Thread Philippe Martin
Thanks a lot Felipe. Regards, Philippe Felipe Almeida Lessa wrote: > Em Seg, 2006-04-10 às 10:38 -0500, Philippe Martin escreveu: >> I understand that access can be accessed through an ODBC driver under >> windows (instead of Jet). >> >> I am wondering if the s

RE: python + access + odbc + linux

2006-04-10 Thread Philippe Martin
Thanks TIM. Philippe Tim Golden wrote: > [Philippe Martin] > > | I understand that access can be accessed through an ODBC driver under > | windows (instead of Jet). > | > | I am wondering if the same can be done under Linux. > > You need to look at the mdb

swig-style utility

2006-04-10 Thread Philippe Martin
Hi, I need to add a feature to an existing C wrapper that is not based on swig (pycsc:http://homepage.mac.com/jlgiraud/pycsc/Pycsc.html) I'm not the best with C wrapper and would love it if there were some type of utility that would generate the correct code (most) for a specific C function that

Re: Help needed on COM issue

2006-04-11 Thread Philippe Martin
Hi, First I'd check if the type is indeed tuple. How about converting the tuple to a list, modifying the list, then making it a tuple again ? Philippe Mike Howard wrote: > Should read ... > I'm doing some conversion of vb code to python code and I have a > problem with a COM object > > Spec

Numpy and cPickle

2006-04-12 Thread Martin Manns
0.9.6 on both machines. Thanks in advance Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Numpy and cPickle

2006-04-12 Thread Martin Manns
Robert Kern wrote: > Martin Manns wrote: >> If I cPickle a numpy array under Linux and un-cPickle it under Solaris >> 10, my arrays seem to be transposed. > Transposed? That's odd. There was a byteorder issue with pickles going across > differently-endianed platforms

Re: Remove Whitespace

2006-04-13 Thread Martin Blais
On 13 Apr 2006 12:32:56 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > re.sub() doesn't do the substitution in place: it returns the resulting > string. Try this: In-place substitution is impossible in Python, strings are immutable. -- http://mail.python.org/mailman/listinfo/python-list

Passing a packed C structure to a c module

2006-04-14 Thread Philippe Martin
Hi, Is it possible to define a packed C structure in python and pass it to the c module, or should the wrapper do that ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing a packed C structure to a c module

2006-04-14 Thread Philippe Martin
Thanks, It's a pretty big structure: painfull to pass each item as a param. Regards, Philippe "Martin v. Löwis" wrote: > Philippe Martin wrote: >> Is it possible to define a packed C structure in python and pass it to >> the c module, or should the wrapper d

Re: Passing a packed C structure to a c module

2006-04-14 Thread Philippe Martin
is that ? PS: the wrapper also has to work under multiple OSs Regards, Philippe "Martin v. Löwis" wrote: > Philippe Martin wrote: >> It's a pretty big structure: painfull to pass each item as a param. > > So how else would you like to pass them? Define the

Re: Passing a packed C structure to a c module

2006-04-14 Thread Philippe Martin
I misslead you: it is a smart card-style ioctl ... Philippe "Martin v. Löwis" wrote: > Philippe Martin wrote: >> The call actually is an IOCtl: depending on the control code, the >> structure has a different format. > > Ah. In that case, I recommend to use the

Re: Passing a packed C structure to a c module

2006-04-14 Thread Philippe Martin
I'll take a look, thanks. Jay Parlar wrote: > > On Apr 14, 2006, at 9:44 AM, Philippe Martin wrote: > >> Thanks, >> >> It's a pretty big structure: painfull to pass each item as a param. >> >> Regards, >> >> Ph

Furius on-site Python training course

2006-04-14 Thread Martin Blais
glish and french. * I'm currently based in Canada, but I can fly anywhere for the course. Any further questions (or for a quote), please let me know at <[EMAIL PROTECTED]>. Best regards, -- Martin Blais <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: The whitespaceless frontend

2006-04-15 Thread Martin Blais
On 4/15/06, Stelios Xanthakis <[EMAIL PROTECTED]> wrote: > It had to happen :) Did it? > http://pyvm32.infogami.com/EPL > > Seriously, this is not so much about the whitespace as for the > new features, which might interest people who are thinking about > new features. More specifically,

Perl to Python conversion

2009-12-09 Thread Martin Schöön
mmending a manual re-write. Any thoughts/recommendations? TIA, /Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl to Python conversion

2009-12-10 Thread Martin Schöön
n and PyQt will be a 'long term' educational project at home. There are various bits and pieces there: data base handling, GUI design, math, logic, error/exception handling... We have long, dark winters where I live :-) All the best, /Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl to Python conversion

2009-12-13 Thread Martin Schöön
rogs like glade) rather than hand coded anyway so it will > probably provide little insight. Also, they probably didn't make it with > QT which is fairly different from GTK. Tk is what they used. /Martin -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Pyspread 0.0.13 released

2009-12-27 Thread Martin Manns
fixes - + Small white rectangle in upper left corner removed (BUG 2918360) + setup.py does not copy directories fixed (BUG 2913911) + Folder renaming to fix installation errors (BUG 2909017) Enjoy Martin -- http://mail.python.org/mailman/listinfo/python-list

Long integers and ways around xrange

2010-01-16 Thread Martin Manns
d below. Is there a standard long integer replacement for xrange? Do you have ideas for improving the code? Best Regards Martin File irange.py: #! /usr/bin/env python # -*- coding: utf-8 -*- from itertools import count, imap, islice def scount(n=0, step=1): "&q

Re: Long integers and ways around xrange

2010-01-16 Thread Martin Manns
On 16 Jan 2010 20:25:44 GMT Steven D'Aprano wrote: > On Sat, 16 Jan 2010 20:04:09 +0100, Martin Manns wrote: > >> islice(count(start, step), (stop-start+step-1)//step). > > > > However, count only accepts one parameter, so that this solution > > does not wor

Symbols as parameters?

2010-01-20 Thread Martin Drautzburg
Hello all, When passing parameters to a function, you sometimes need a paramter which can only assume certain values, e.g. def move (direction): ... If direction can only be "up", "down", "left" or "right", you can solve this by passing strings, but this is not quite to th

Re: Symbols as parameters?

2010-01-21 Thread Martin Drautzburg
Thanks for all the answers. Let me summarize (1) I fail to see the relevance of  >>> def move( direction ): ...   print( "move " + str( direction ) ) ...  >>> move( "up" ) move up not only in the context of my question. And I don't see an abuse of the language either. Maybe this could pass as a

Re: Symbols as parameters?

2010-01-21 Thread Martin Drautzburg
Here is a complete expample using a decorator, still a bit noisy def move(aDirection): print "moving " + aDirection #Here comes the decorator def scope(aDict): def save(locals): """Set symbols in locals and remember their original state""" setSymbols={} unsetSymbol

Re: Symbols as parameters?

2010-01-22 Thread Martin Drautzburg
Steven D'Aprano wrote: > I think this really is the correct solution for your problem. In > Python, the standard place to have such public constants is at the > module level, not the function or class. I think you're worrying > unnecessarily about "namespace pollution" -- the module namespace is >

Re: Symbols as parameters?

2010-01-22 Thread Martin Drautzburg
Carl Banks wrote: > I see. Well, Python is a poor choice for defining an internal DSL > (i.e., DSL using the general language's syntax), because it's > (deliberately) rigid in both grammar and semantics. I had this impression too. > Paul McGuire should be by to recommend PyParsing shortly.

Re: Symbols as parameters?

2010-01-22 Thread Martin Drautzburg
On 22 Jan., 11:56, Roald de Vries wrote: > Hi Martin, > > On Jan 21, 2010, at 8:43 AM, Martin Drautzburg wrote: > > > > > > > Hello all, > > > When passing parameters to a function, you sometimes need a paramter > > which can only assume certain

Re: Symbols as parameters?

2010-01-22 Thread Martin Drautzburg
Mark Dickinson wrote: > On Jan 21, 10:57 pm, Martin Drautzburg > wrote: >> Here is a complete expample using a decorator, still a bit noisy >> >> def move(aDirection): >> print "moving " + aDirection >> >> #Here comes the decorator >> def

A.x vs. A["x"]

2010-01-22 Thread Martin Drautzburg
This has probably been asekd a million times, but if someone could give a short answer anyways I's be most grateful. What is it that allows one to write A.x? If I have a variable A, then what to I have to assign to it to A.x becomes valid? Or even further: what do I have to do so I can write A.x=

Re: Symbols as parameters?

2010-01-22 Thread Martin Drautzburg
Martin Drautzburg wrote: >> with scope(): >> # ... >> # use up, down, left, right here >> >> # up, down, left, right no longer defined after the with block exits. Just looked it up again. It's a cool thing. Too bad my locals() hack would still be

Re: A.x vs. A["x"]

2010-01-23 Thread Martin Drautzburg
Terry Reedy wrote: > On 1/22/2010 2:29 PM, Martin Drautzburg wrote: >> This has probably been asekd a million times, but if someone could >> give a short answer anyways I's be most grateful. >> >> What is it that allows one to write A.x? If I have a variable A,

Re: [Edu-sig] some turtle questions

2010-01-24 Thread Helene Martin
I'm almost sure that there's no way for a turtle to know anything about the background. That's an unfortunate limitation! As for putting a limit on a turtle's travel, you need to write an appropriate conditional. For example, if you want your turtle to stay within a 200x200 square centered aroun

problem with pythonw.exe

2009-10-23 Thread Martin Shaw
t be the problem? Thanks in advance, Martin <>-- http://mail.python.org/mailman/listinfo/python-list

pyspread 0.0.12a released

2009-11-22 Thread Martin Manns
Save functionality for row and column size added * Problem with update of cells that contain strings, lists solved * Frozen cells toolbar update fixed * Windows missing cell background bug removed Martin -- http://mail.python.org/mailman/listinfo/python-list

new.instancemethod __iter__

2010-02-06 Thread Martin Drautzburg
Hello all When I create an Object and set its __iter__ method from outside s = Sequence #one of my own classes s.__iter__ = new.instancemethod(f,s,Sequence) I get different results, depending on whether I call for x in y.__iter__(): print x or for x in y: print x The first case does

Re: new.instancemethod __iter__

2010-02-07 Thread Martin Drautzburg
Steven D'Aprano wrote: > If you want iterator operations "similar to itertools", why does this > mean you need to replace anything? Just create your own iterators. > > Or use pre-processing and post-processing to get what you want. > > Can you show an example of what you would like to happen? S

Re: new.instancemethod __iter__

2010-02-07 Thread Martin Drautzburg
Christian Heimes wrote: > If you *really* need to overwrite __iter__ on your instance rather > than defining it on your class, you need to proxy the method call: > > class MyObject(object): >def __iter__(self): > return self.myiter() > > obj = MyObject() > obj.myiter = myiter > > Tha

Re: new.instancemethod __iter__

2010-02-07 Thread Martin Drautzburg
Steve Holden wrote: >> y = s1*2 + s2(align=10) >> >> which should iterate as >> >> Time=1,'a' >> Time=2,'a' >> Time=10,'b' >> >> I have no difficulty passing "align" to the object (using __call__) >> and use it while I furnish my own __iter__() method. However I don't >> quite see how I can do

Ternary plus

2010-02-08 Thread Martin Drautzburg
Just for the hell of it ... I can easily define __plus__() with three parameters. If the last one is optional the + operation works as expected. Is there a way to pass the third argument to "+" -- http://mail.python.org/mailman/listinfo/python-list

Re: Ternary plus

2010-02-09 Thread Martin Drautzburg
Carl Banks wrote: > You can have __add__ return a closure for the first addition, then > perform the operation on the second one. Example (untested): > > class Closure(object): > def __init__(self,t1,t2): > self.t1 = t1 > self.t2 = t2 > def __add__(self,t3): > #

Re: ANN: obfuscate

2010-02-12 Thread Bob Martin
in 16 20100212 034121 Paul Rubin wrote: >See http://en.wikipedia.org/wiki/Colossus_computer >That was almost at the end of the war though. Colossus was working by the end of 1943 - the year that the Americans first dropped bombs on Germany ;-) -- http://mail.python.org/mailman/listinfo/

Re: ANN: obfuscate

2010-02-12 Thread Bob Martin
in 144460 20100212 103319 Jean-Michel Pichavant wrote: >Bob Martin wrote: >> in 16 20100212 034121 Paul Rubin wrote: >> >> >>> See http://en.wikipedia.org/wiki/Colossus_computer >>> That was almost at the end of the war though. >>> >>

[ANN] Pyspread 0.0.14b released

2010-03-13 Thread Martin Manns
tested). On Mac OS X, some icons are too small but the application basically works. Homepage http://pyspread.sourceforge.net New features * Cell border can be changed independently. * Cell access allows negative indices when not slicing. Enjoy Martin -- http

Re: python to exe

2010-03-13 Thread Martin Schöön
mong other things she learnt that plastic surgery got going for real during WWII 'thanks' to all pilots with burns. I have forwarded the link above to her. /Martin -- http://mail.python.org/mailman/listinfo/python-list

extract occurrence of regular expression from elements of XML documents

2010-03-15 Thread Martin Schmidt
, and the total number of words. I did not find a post that addresses my problem. If someone could help me with this I would really appreciate it. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 78, Issue 161

2010-03-16 Thread Martin Schmidt
). Best regards. Martin P.S. Sorry for my late reply, but my Internet connection was down for a day. > -- Forwarded message -- > From: Stefan Behnel > To: python-list@python.org > Date: Tue, 16 Mar 2010 08:50:30 +0100 > Subject: Re: extract occurrence of regular

Re: extract occurrence of regular expression from elements of XML documents

2010-03-16 Thread Martin Schmidt
On Tue, Mar 16, 2010 at 11:56 AM, Martin Schmidt wrote: > Thanks, Stefan. > Actually I will have to run the searches I am interested in only a few > times and therefore will drop performance concerns. > > Thanks for len(text.split()) . > I will try it later. > > The te

[ANN] Pyspread 0.1 released

2010-03-20 Thread Martin Manns
) Homepage http://pyspread.sourceforge.net Enjoy Martin -- http://mail.python.org/mailman/listinfo/python-list

QT window closes immediately

2010-11-14 Thread Martin Caum
I am attempting to open a window on mouse activity which works, but the window fails to stay open. I set it to terminate when the escape key is pressed even when the program is not currently selected. This works fine. Originally I had it create the window only with a right click, but when I noticed

Re: Is Unladen Swallow dead?

2010-11-17 Thread Martin Gregorie
Seems the German > translation sucks (misses a lot) and my copy lacks the original dub. > While you're at it, pick up the video of "Monty Python and the Holy Grail". the project name, Unladen Swallow, is a reference to the film. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read such file and sumarize the data?

2010-11-17 Thread Martin Gregorie
be adjacent - use the first field as the key to an array and put the start time and CPU count in that element. When a matching stop line is found you, retrieve the array element, calculate and output or total the usage figure for that run and delete the array element. -- martin@

Re: Program, Application, and Software

2010-11-18 Thread Martin Gregorie
Perl programs are scripts aloing with programs written as awk, Javascript and bash scripts. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Re: Program, Application, and Software

2010-11-18 Thread Martin Gregorie
On Thu, 18 Nov 2010 15:41:51 +, Grant Edwards wrote: > On 2010-11-18, Martin Gregorie wrote: >> On Thu, 18 Nov 2010 01:16:34 +, MRAB wrote: >> >>> I'd probably say that a "script" is a program which is normally not >>> interactive: you jus

Re: Program, Application, and Software

2010-11-18 Thread Martin Gregorie
On Fri, 19 Nov 2010 00:07:05 +, Steven D'Aprano wrote: > On Thu, 18 Nov 2010 14:21:47 +, Martin Gregorie wrote: > >> I use 'script' to refer to programs written in languages that don't >> have a separate compile phase which must be run before the

Re: Program, Application, and Software

2010-11-19 Thread Martin Gregorie
irectly interpreted by the command processor, and .EXE or .COM files, which must be compiled before they can be run. AFAIK there's no way you can mark anything else, such as an awk, Perl or Python source file, as executable since there is no 'executable' attribute in an

Re: building a web interface

2010-11-20 Thread Martin Gregorie
ter would be a better place to start: once its running you simply point your browser at localhost:80 and send it the URL of the initial page of your application. Search on "Python web server" for details of building or downloading a simple one. You'll also find stuff about interfacing Python programs to a web server. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Re: building a web interface

2010-11-21 Thread Martin Gregorie
the same session and keep each session's context separate. The web server doesn't do this, so this managing session context is the application's responsibility. Common methods are to use a session cookie and/or to store session context in the database. -- martin

Re: building a web interface

2010-11-21 Thread Martin Gregorie
t need 2 because you can have your simple web server and program running in a console window on your desktop PC while you hammer it from your web browser. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Glob in python which supports the ** wildcard

2010-11-22 Thread Martin Lundberg
n which do support **? Regards, Martin Lundberg -- http://mail.python.org/mailman/listinfo/python-list

Collision of rotated rectangles without pygame

2010-12-05 Thread Martin Manns
t xrect >>> r=xrect.RotoRect(10,10,30,20,angle=34) >>> s=xrect.RotoRect(10,10,30,20,angle=34) >>> r.rotocollide(s) False >>> Is my replacement of the rectangle object wrong or is vizier not working correctly with pygame as well? Do you know of

Re: Collision of rotated rectangles without pygame

2010-12-05 Thread Martin Manns
On Sun, 5 Dec 2010 23:49:36 +0100 Martin Manns wrote: > Is my replacement of the rectangle object wrong or is vizier not > working correctly with pygame as well? Answering my first question: Vizier works O.K. with pygame. I am unsure what I did wrong in the rect replacement though.

Re: Comparison with False - something I don't understand

2010-12-06 Thread Martin Gregorie
Any BASIC that implements ON ERROR (i.e. just about all of them) will do this, not just VB. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Re: Collision of rotated rectangles without pygame

2010-12-07 Thread Martin Manns
On Tue, 07 Dec 2010 00:53:27 -0800 John Nagle wrote: > On 12/5/2010 2:49 PM, Martin Manns wrote: > Probably because you seem to be trying to compute the intersection > point for coincident lines, which is not well-defined. I found the problem: pygame returns one pixel more for

python-parser running Beautiful Soup needs to be reviewed

2010-12-11 Thread Martin Kaspar
Hello commnity i am new to Python and to Beatiful Soup also! It is told to be a great tool to parse and extract content. So here i am...: I want to take the content of a -tag of a table in a html document. For example, i have this table This is a sample te

Re: Ways of accessing this mailing list?

2010-12-11 Thread Martin Schoeoen
nd I have not used vi in many, many years). I have tried out other programs such as traditional email clients and mainstream gui programs such as Pan but find that user interface paradigm does not work well for usenet news and me. /Martin -- http://mail.python.org/mailman/listinfo/python-list

Fail import with SWIG generated imp.load_module ?

2010-12-14 Thread Hvidberg, Martin
cript that activates this code, it returns the following: -- start code snip 2 - fp: pn: C:\gdal\bin\gdal\python\osgeo\_gdal.pyd de: ('.pyd', 'rb', 3) Traceback (most recent call last): File "C:\Martin\Work_Eclipse\Hilfe\src\check_GDAL.py", l

Reading special Danish letters in Python

2010-12-19 Thread Martin Hvidberg
3\xb8 å = \xc3\xa5 Æ = \xc3\x86 Ø = \xc3\x98 Å = \xc3\x85 Question: What is this, how do I get my Danish letters back? Best Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Why do my list go uni-code by itself?

2010-12-20 Thread Martin Hvidberg
12-15.46.12.73450'] Question: In the last printout, tagged >InReturLst> all entries turn into uni-code. What happens here? Look for the word 'FANØ'. This word changes from 'FANØ' to u'FAN\xd8' -- That's a problem to me, and I don't want it to change like this. What do I do to stop this behavior? Best Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Scanning directories for new files?

2010-12-21 Thread Martin Gregorie
ready for further processing. I've used this technique reliably with files arriving via FTP at quite high rates. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

python-parser running Beautiful Soup only spits out one line of 10. What i have gotten wrong here?

2010-12-25 Thread Martin Kaspar
Hello dear Community,. I am trying to get a scraper up and running: And keep running into problems. when I try what you have i have learnedd so far I only get: Schuldaten Here is the code that I used: import urllib2 from BeautifulSoup import BeautifulSoup page = urllib2.urlopen("http://www.sch

<    7   8   9   10   11   12   13   14   15   16   >