Re: send an email with picture/rich text format in the body

2006-05-27 Thread anya
Acctualy there is a solution: see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473810 (thanks darrin massena for sharing) and , if you will set all the neccessary parametrs, it won't be recognized as a spam, thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Using a package like PyInstaller

2006-05-27 Thread James Stroud
LittlePython wrote: > That is very close to what I have being doing, however I was unable to > enclose a bmp or another file for that matter in the exe. I used both DATA > and BINARY key words with no luck. I checked what was in the package and > there were there. I guess for some reason it could n

Re: Best way to check that a process is running on a Unix system?

2006-05-27 Thread BJörn Lindqvist
> What is the best way to check that a process is running (or better yet > number of instances) based on the name of the process? Would have to > work on a unix/linux system. Use "ps -C proc_name". Then either read the nr of lines in the output (for the number of instances) or read the return valu

Best way to check that a process is running on a Unix system?

2006-05-27 Thread Arthur Pemberton
Hello list, What is the best way to check that a process is running (or better yet number of instances) based on the name of the process? Would have to work on a unix/linux system. Thank you. -- To be updated... -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for triangulator/interpolator

2006-05-27 Thread Travis E. Oliphant
Grant Edwards wrote: > On 2006-05-27, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > >> Not that you made a bad choice. I do wonder, how much of your >> difficulty was with the interface to the underlying fitpack >> routines. > > I've no idea. I had never done anything with splines before, > s

Re: Pyrex speed

2006-05-27 Thread Gonzalo Monzón
Hi John, John Machin escribió: >On 28/05/2006 12:10 AM, Gonzalo Monzón wrote: > >[good advice snipped] > > > >>Example A: >>This code is more than 80 times faster than a "easy" Python >>implementation. For every call, it does some bitwise operations and does >>an array lookup for every string

Re: linking errors with debug build of Python2.4.3

2006-05-27 Thread [EMAIL PROTECTED]
Martin Wiechert wrote: > Hi list, > > I've created a fresh build of Python 2.4.3 using the following configuration > > $ ./configure --with-pydebug --prefix=/usr/local/debug --enable-shared > --with-fpectl --with-signal-module > > What did I do wrong? Try with just: ./configure --with-pydebug --p

run time linked attributes

2006-05-27 Thread michael . murr
I've read a few posts about how to have attributes that are "linked" at run time. I've created a (simple) Python metaclass that accomplishes this with some behind-the-scenes __init__ redirection. I'm posting the code at the end in case anyone is interested. Problem background: Object a (an insta

Re: Pyrex speed

2006-05-27 Thread John Machin
On 28/05/2006 12:10 AM, Gonzalo Monzón wrote: [good advice snipped] > > Example A: > This code is more than 80 times faster than a "easy" Python > implementation. For every call, it does some bitwise operations and does > an array lookup for every string character from argument. Its a lot > f

Re: Using a package like PyInstaller

2006-05-27 Thread LittlePython
That is very close to what I have being doing, however I was unable to enclose a bmp or another file for that matter in the exe. I used both DATA and BINARY key words with no luck. I checked what was in the package and there were there. I guess for some reason it could not locate then when executed

Re: Serializing / Unserializing datetime

2006-05-27 Thread John Machin
On 28/05/2006 3:37 AM, Brendan wrote: > Hi All > > I can't find the "Python Way" of writing a datetime instance to a > string so that it can be easily parsed back again. time.strptime is > apparantly not supported on some platforms, and time.time <==> > datetime.utcfromtimestamp will cause proble

[ANNOUNCE]: typecheck 0.3.5 released

2006-05-27 Thread Collin Winter
Hello all, I have released version 0.3.5 of my typecheck module, a Python module providing run-time typechecking facilities for function parameters and return values, as well as generator yield values. The main workhorses of this module, the functions accepts, returns and yields, are used as func

Re: Using a package like PyInstaller

2006-05-27 Thread James Stroud
LittlePython wrote: > Thx for the tip. > > I am referring more to the use of PyInstaller or py2exe. Packages that > create exe files that basically have your py script and a small py > interpreter all rolled up into one. This way py does not need to be > installed on a system to execute a py scrip

Re: Using a package like PyInstaller

2006-05-27 Thread LittlePython
Thx for the tip. I am referring more to the use of PyInstaller or py2exe. Packages that create exe files that basically have your py script and a small py interpreter all rolled up into one. This way py does not need to be installed on a system to execute a py script. I am being advised that pytho

Re: iterator? way of generating all possible combinations?

2006-05-27 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Terry Reedy wrote: > >> >> Are the dice identical or distinguishable (marked). In other words, >> with 2 >> dice, is 1,2 the same as 2,1 or different? Note that in most dice >> games, >> such as craps, the dice are not distinguis

Re: Array? Please help.

2006-05-27 Thread Scott David Daniels
Dr. Pastor wrote: > I need a row of 127 bytes that I will use as a > circular buffer. Into the bytes (at unspecified times) > a mark (0 After some time the "buffer" will contain the last 127 marks. Sounds a lot like homework. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/

(mostly-)POSIX regular expressions

2006-05-27 Thread Sébastien Boisgérault
Hi, I'm searching for a POSIX 1003.2 compatible regular expression engine. The Python binding "pregex" by Neal Becker may do the job, but I did not manage to download it as the original link ftp://ftp.ctd.comsat.com/pub/ seems dead. Does any old-timer () have a copy of this package ? Cheers, SB

Re: Array? Please help.

2006-05-27 Thread George Sakkis
Diez B. Roggisch wrote: > Dr. Pastor schrieb: > > I need a row of 127 bytes that I will use as a > > circular buffer. Into the bytes (at unspecified times) > > a mark (0 > After some time the "buffer" will contain the last 127 marks. > > (A pointer will point to the next byte to write to.) > > What

Re: Software Needs Philosophers

2006-05-27 Thread Bruno Desthuilliers
Paul Rubin a écrit : > John D Salt writes: > >>What exciting new ideas exist in software that are both important and >>cannot be traced back to 1986 or earlier? > > > Automated spamming tools? ;-) keyboard ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Software Needs Philosophers

2006-05-27 Thread Bruno Desthuilliers
John A. Bailo a écrit : > John D Salt wrote: > >> <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: >> >> [Snips] >> >>> Wrong. We live in a paradise of ideas and possibilities well beyond the >>> wildest dreams of only 20 years ago. >> >> >> >> What exciting new ideas exist in software that ar

Re: Software Needs Philosophers

2006-05-27 Thread Bruno Desthuilliers
John D Salt a écrit : > <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > [Snips] > >>Wrong. We live in a paradise of ideas and possibilities well beyond the >>wildest dreams of only 20 years ago. > > > What exciting new ideas exist in software that are both important and > cannot be tr

Re: Using a package like PyInstaller

2006-05-27 Thread James Stroud
LittlePython wrote: > Is it possible when using packages like PyInstaller to create an .exe for > distribution that parts of the package can bleed out and be left on a system > when the .exe is executed? > > Thx > > Look at innosetup. -- James Stroud UCLA-DOE Institute for Genomics and Proteo

Re: Go "help" the perl list instead Fredrik Lundh

2006-05-27 Thread Bruno Desthuilliers
D H a écrit : > Fredrik Lundh wrote: > >> vbgunz wrote: >> I have new a list , when it hava large number of values, I wonna to delete all the values in it,how to do? >>> >>> >>> something like this will probably help. >>> >>> x = [1,2,3,4,5,6,7,8,9] >>> y = x >>> >>> list([x.pop() for z

Re: How to control color of contour lines?

2006-05-27 Thread Grant Edwards
On 2006-05-27, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2006-05-27, Grant Edwards <[EMAIL PROTECTED]> wrote: >> How do I get contour lines drawn in just one color (e.g. black)? >> >> Multicolored contour lines on top of a pm3d surface can be very >> hard to look at... > > Of course I found it

Re: Python - Web Display Technology

2006-05-27 Thread Marco Carvalho
We don't need any proprietary junk to make a nice-look website: http://www.csszengarden.com You can navigate in this site with any kind of browser, even graphical or text-based, like lynx. -- http://mail.python.org/mailman/listinfo/python-list

Re: Array? Please help.

2006-05-27 Thread Diez B. Roggisch
Dr. Pastor schrieb: > I need a row of 127 bytes that I will use as a > circular buffer. Into the bytes (at unspecified times) > a mark (0 After some time the "buffer" will contain the last 127 marks. > (A pointer will point to the next byte to write to.) > What would be the Pythonic way to do the a

CLAIM YOUR TWO FREE UNIVERSAL STUDIOS TICKETS!

2006-05-27 Thread Toyagaines
  -- http://mail.python.org/mailman/listinfo/python-list

Array? Please help.

2006-05-27 Thread Dr. Pastor
I need a row of 127 bytes that I will use as a circular buffer. Into the bytes (at unspecified times) a mark (0http://mail.python.org/mailman/listinfo/python-list

Re: How to control color of contour lines?

2006-05-27 Thread Grant Edwards
On 2006-05-27, Grant Edwards <[EMAIL PROTECTED]> wrote: > How do I get contour lines drawn in just one color (e.g. black)? > > Multicolored contour lines on top of a pm3d surface can be very > hard to look at... Of course I found it right after I posted the question: "unset clabel" -- Grant Ed

How to control color of contour lines?

2006-05-27 Thread Grant Edwards
How do I get contour lines drawn in just one color (e.g. black)? Multicolored contour lines on top of a pm3d surface can be very hard to look at... -- Grant Edwards grante Yow! Is it 1974? What's at for SUPPER? Can I

Serializing / Unserializing datetime

2006-05-27 Thread Brendan
Hi All I can't find the "Python Way" of writing a datetime instance to a string so that it can be easily parsed back again. time.strptime is apparantly not supported on some platforms, and time.time <==> datetime.utcfromtimestamp will cause problems come 2038. Unfortunately there don't seem to b

Re: groupby

2006-05-27 Thread Paul McGuire
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > So here's how to save the values from the iterators while iterating over the > groupby: > > >>> m = [(x,list(y)) for x,y in groupby([1, 1, 1, 2, 2, 3])] > >>> m > [(1, [1, 1, 1]), (2, [2, 2]), (3, [3])] > > -- Paul > > Pl

Re: dynamic type changing

2006-05-27 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I'm working on a "TempFile" class that stores the data in memory until > it gets larger than a specified threshold (as per PEP 42). Whilst > trying to implement it, I've come across some strange behaviour. Can > anyone explain this? > > The test case at the bottom s

Re: PIL problem with biprocessor hardware

2006-05-27 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > oops. lost my train of thought. I was gonna say, I wonder if some of > these image manipulation routines are using multiple threads? PIL doesn't use threading by itself, and I know of quite a few PIL-based systems running on multi-processor hardware (not to mention mul

Re: monkeypatching NamedTemporaryFile

2006-05-27 Thread Jason Lunz
[EMAIL PROTECTED] said: > Maybe that should be the default behaviour. Presumably the file has > been deleted by some other process? The use case is that a NamedTemporaryFile was used to securely create and populate a file, which is then atomically (on posix) os.rename()d to its final location. I

Re: HTTPS client certificates (was Re: Twill question) (fwd)

2006-05-27 Thread John J Lee
Oops, spot the deliberate misteka ;-) should have been: opener = urllib.FancyURLopener(key_file=KEY_FILE, cert_file=CERT_FILE, ) r = opener.open() print r.read() ... which *does* work for me. Sorry for the noise everybody. John

Re: John Bokma harassment

2006-05-27 Thread Dražen Gemić
I can't see the way how Xah Lee could be on topic in comp.lang.java.programmer. He is not a programmer, and does not write about neither programming nor Java. He should stick to philosophy and advocacy groups. DG -- http://mail.python.org/mailman/listinfo/python-list

Re: Running External Commands + Seeing when they are Finished

2006-05-27 Thread Tommy B
The problem is with that (which is what I'm doing already) is that one app is in a window and one app is on the command line. Thus, you end up with both apps running at the same time. Are there any modules that have functions for checking when windows are opened or closed? -- http://mail.python.o

HTTPS client certificates (was Re: Twill question) (fwd)

2006-05-27 Thread John J Lee
Just forwarding this in case anybody here can shed light on this -- urllib's support for SSL client certificates didn't work for me, and I'm wondering if it works for anybody else... John -- Forwarded message -- Date: Sat, 27 May 2006 14:33:03 + (UTC) From: John J Lee <[EMA

dynamic type changing

2006-05-27 Thread andychambers2002
I'm working on a "TempFile" class that stores the data in memory until it gets larger than a specified threshold (as per PEP 42). Whilst trying to implement it, I've come across some strange behaviour. Can anyone explain this? The test case at the bottom starts a TempFile at size 50 and prints i

Re: starting some Python script from C#

2006-05-27 Thread tatamata
thanks. "Gerard Flanagan" <[EMAIL PROTECTED]> je napisao u poruci interesnoj grupi:[EMAIL PROTECTED] > tatamata wrote: >> Hello. >> >> How can I run some Python script within C# program? >> > > - >ProcessS

Re: Pyrex speed

2006-05-27 Thread Gonzalo Monzón
Hi Jim, It depends a lot on what you're doing. You will get speed up from Pyrex or wrapping C code if you understand how does it work internally, and to speed up you application via coding *only* Pyrex parts (I mean don't using it for wrapping C but implementing in Pyrex), it limits a lot the

Re: Pyrex speed

2006-05-27 Thread Graham Breed
Jim Lewis \/\/|20+3: > I'm not planning to write C functions. My understanding is that by > using cdefs in the python code one can gain substantial speed. I'm > trying to find a description of how to modify python code in more > detail so it runs fast under pyrex. I've used pyrex to speed up my co

Re: "Learning Python" 2nd ed. p479 error?

2006-05-27 Thread AbrahamLincolnIllinois
Thanks for your help, guys. I'm convinced it is a bug, not a misunderstanding. I submitted it to the errata page at O'Reilly. Regards, Abraham -- http://mail.python.org/mailman/listinfo/python-list

Using a package like PyInstaller

2006-05-27 Thread LittlePython
Is it possible when using packages like PyInstaller to create an .exe for distribution that parts of the package can bleed out and be left on a system when the .exe is executed? Thx -- http://mail.python.org/mailman/listinfo/python-list

Re: access serial port in python

2006-05-27 Thread Grant Edwards
On 2006-05-27, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > i can use the polling method to check for data on the serial port using > pyserial...but i need to use the interrupt driven method .am workin > on a windows platform I don't think there is any way to so interrupt driven I/O un

Re: Looking for triangulator/interpolator

2006-05-27 Thread Grant Edwards
On 2006-05-27, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > Not that you made a bad choice. I do wonder, how much of your > difficulty was with the interface to the underlying fitpack > routines. I've no idea. I had never done anything with splines before, so it's quite possible I just wasn'

Re: Pyrex speed

2006-05-27 Thread Jim Lewis
> I never had an opportunity to do any more sophisticated math than simple > adding, multiplying, subtracting and dividing. Neither is the primes example doing anything more sophisticated than basic arithmetic but it's 50 times faster. -- http://mail.python.org/mailman/listinfo/python-list

TreeCtrl to TreeListCtrl

2006-05-27 Thread sendhil kumar
Hi all, whwn working with xml connectvity to python, i have a sash window, in which first window has a Tree Control that has 'n' parent fields preceded by + sign and on leftdown all the childs got from external xml file. when the particular parent field is selected and dragged, it must get posted

Re: how to clear up a List in python?

2006-05-27 Thread Martin v. Löwis
Duncan Smith wrote: > chris brat wrote: >> Doesnt this do what the original poster is try accomplish? >> > > Not what the OP asked for, no. Clearing a list implies that list1 > should still be bound to the same list (which might be important if > there are other names bound to the same list). If

Re: Pyrex speed

2006-05-27 Thread Jarek Zgoda
Jim Lewis napisal: >>main point of Pyrex is ease of wrapping, not of speeding-up. > > Supposedly the primes example is 50 times faster. How often you perform primes calculations in your programs? In my >10 years of professional career in writing business software I never had an opportunity to do

Re: Pyrex speed

2006-05-27 Thread Jim Lewis
> main point of Pyrex is ease of wrapping, not of speeding-up. Supposedly the primes example is 50 times faster. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyrex speed

2006-05-27 Thread Simon Percivall
You can gain substantial speed-ups in very certain cases, but the main point of Pyrex is ease of wrapping, not of speeding-up. Depending on what you're doing, rewriting in Pyrex or even in C, using the Python/C API directly, might not gain you much. -- http://mail.python.org/mailman/listinfo/pyt

Re: starting some Python script from C#

2006-05-27 Thread Gerard Flanagan
tatamata wrote: > Hello. > > How can I run some Python script within C# program? > - ProcessStartInfo startInfo; Process process; string directory; string pyArgs;

Re: getattr for modules not classes

2006-05-27 Thread Piet van Oostrum
> Heiko Wundram <[EMAIL PROTECTED]> (HW) schreef: >HW> from x import test as x >HW> print x.one >HW> print x.two >HW> print x.three Or replace test by x in x.py :=) -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: [EMAIL PROTECTED]

Re: Pyrex speed

2006-05-27 Thread Jim Lewis
I'm not planning to write C functions. My understanding is that by using cdefs in the python code one can gain substantial speed. I'm trying to find a description of how to modify python code in more detail so it runs fast under pyrex. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyrex speed

2006-05-27 Thread Diez B. Roggisch
Jim Lewis schrieb: > Has anyone found a good link on exactly how to speed up code using > pyrex? I found various info but the focus is usually not on code > speedup. The code speedup comes through the usage of C by pyrex itself, and using it to put a thin layer over C-functions available/coded fo

Re: Python - Web Display Technology

2006-05-27 Thread Steve Holden
Edward Elliott wrote: > [EMAIL PROTECTED] wrote: > > >>Flash also behaves consistently cross-browser, cross/platform -- and >>features cannot be disabled by the user. > >^^ > And that's a good thing? Maybe for Macromedia, not for us. This smells > like

Re: Method Delegation To Subinstances

2006-05-27 Thread Steve Holden
Cloudthunder wrote: > In the example: > > class Boo: > def __init__(self, parent): > self.parent = parent > print self.parent.testme > def run(): > print "Yaho!" > > class Foo: > testme = "I love you!" > def __init__(self): > test = Boo(self) >

Re: CMFBoard

2006-05-27 Thread Bruno Desthuilliers
maria a écrit : > Hi everybody! > > I use CMFBoard 2.2.1 as a discussion board on my website. > I want to open the forum to all users, anonymous and registred users! > But my problem is, that whenever an ano user posts a topic, the > overview doesn't display the message correctly. Instead of a ta

Pyrex speed

2006-05-27 Thread Jim Lewis
Has anyone found a good link on exactly how to speed up code using pyrex? I found various info but the focus is usually not on code speedup. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyrex installation on windows XP: step-by-step guide

2006-05-27 Thread greg
Jim Lewis wrote: > Thanks but now another problem :-( > Examples in books show importing a global so why does below give: > AttributeError: 'module' object has no attribute 'globalvar' > > primes.pyx: > from run import globalvar > def prime(int kmax): > result = [run.globalvar] > ... > > run.py

Re: Running External Commands + Seeing when they are Finished

2006-05-27 Thread andychambers2002
from os import * for cmd in ['adaware', 'spybot']: system(cmd) -- http://mail.python.org/mailman/listinfo/python-list

Re: matplotlib and numpy installation

2006-05-27 Thread Travis E. Oliphant
cesco wrote: > Hi, > > I wanted to install python, numpy and matplotlib on Linux Ubuntu. > I installed python with the following commands > ./configure --enable-unicode=ucs4 > [snip] > running build_ext > building 'matplotlib.backends._ns_backend_agg' extension > gcc options: '-pthread -fno-strict

CMFBoard

2006-05-27 Thread maria
Hi everybody! I use CMFBoard 2.2.1 as a discussion board on my website. I want to open the forum to all users, anonymous and registred users! But my problem is, that whenever an ano user posts a topic, the overview doesn't display the message correctly. Instead of a table containing topic-title, s

Re: chop() and empty() functions

2006-05-27 Thread John Machin
On 27/05/2006 7:10 AM, Jeremy L. Moles wrote: > On Sat, 2006-05-27 at 06:22 +1000, John Machin wrote: >> On 27/05/2006 2:54 AM, Jeremy L. Moles wrote: >> >> ["chop" snipped] >> >>> Furthermore, what do people think about the idea of adding a truly >>> empty, no-op global lambda somewhere in Python?

Re: monkeypatching NamedTemporaryFile

2006-05-27 Thread craighse888
Maybe that should be the default behaviour. Presumably the file has been deleted by some other process? -- http://mail.python.org/mailman/listinfo/python-list

Re: chop() and empty() functions

2006-05-27 Thread bearophileHUGS
Jeremy L. Moles>It's just an iterative way to say, "Okay, give me some default behavior for everything, and I'll come back around later and set the explicit handlers later."< There's some correlation with the Null Object pattern: http://www.cs.oberlin.edu/~jwalker/nullObjPattern/ Bye, bearophile

matplotlib and numpy installation

2006-05-27 Thread cesco
Hi, I wanted to install python, numpy and matplotlib on Linux Ubuntu. I installed python with the following commands ./configure --enable-unicode=ucs4 make make install and then I installed numpy running python setup.py install Finally I came to matplotlib, that for the installation requires the c

Re: Speed up this code?

2006-05-27 Thread Frank Millman
Gregory Petrosyan wrote: > # Paul Rubin's version > [EMAIL PROTECTED]:~$ python -mtimeit "import test2" "test2.primes(1000)" > 100 loops, best of 3: 14.3 msec per loop > > # version from the Cookbook > [EMAIL PROTECTED]:~$ python -mtimeit "import test1" "test1.primes(1000)" > 1000 loops, best of 3

Re: Looking for triangulator/interpolator

2006-05-27 Thread Travis E. Oliphant
Grant Edwards wrote: > On 2006-05-27, Travis E. Oliphant <[EMAIL PROTECTED]> wrote: > >>> I need to interpolate an irregularly spaced set of sampled >>> points: Given a set of x,y,z points, I need to interpolate z >>> values for a much finer x,y grid. >> How many x,y,z points do you have? > > I'v

starting some Python script from C#

2006-05-27 Thread tatamata
Hello. How can I run some Python script within C# program? Thanks, Zlatko -- http://mail.python.org/mailman/listinfo/python-list