Re: Writing PNG with pure Python

2006-06-12 Thread Johann C. Rocholl
> > I have now decided to license my project (including the pure python PNG > > library) under the Apache License 2.0 which is less restrictive than > > the GPL in terms of sublicensing. > > But it is also incompatible with the GPL: > > http://www.fsf.org/licensing/licenses/index_html#GPLIncompatib

Re: Writing PNG with pure Python

2006-06-13 Thread Johann C. Rocholl
How about this here construct? #!/usr/bin/env python # png.py - PNG encoder in pure Python # Copyright (C) 2006 Johann C. Rocholl <[EMAIL PROTECTED]> # # This file is licensed alternatively under one of the following: # 1. GNU Lesser General Public License (LGPL), Version 2.1 or newer #

Re: Writing PNG with pure Python

2006-06-14 Thread Johann C. Rocholl
Ben Finney schrieb: > Simplify. Please don't attempt to write yet another set of license > terms without expert legal assistance. You've already chosen the Expat > license as being acceptable; use that, and you grant all the rest > without even mentioning it. Sorry for my stubborn ignorance, and t

Dive into Python question

2006-08-26 Thread Fred C. Dobbs
I feel like an idiot. I'm going thru "Dive Into Python" and running the first program - odbchelper.py My output is "pwd=secret;database=master;uid=sa;server=mpilgrim" which has all the substrings reversed from the output documented in the book. I've run the downloaded code in Komodo, PythonWin and

Re: Dive into Python question

2006-08-26 Thread Fred C. Dobbs
Thanks, after I looked into it I realized that the output order can change arbitarily. It just seems kind of strange that the first example is one where your output might not match what the author tells you it should be - and yet there's no mention of this in the book (at least at that point.) --

Re: simpleparse parsing problem

2006-09-02 Thread Mike C. Fletcher
gt; expr:= termlist, ( operator, termlist )+ > I *believe* you wanted that to be *, not + Best way to write a SimpleParse grammar is from the ground up, using test cases, so test each thing you think you're parsing. Makes it much easier to spot situations like this. HTH, Mike -

Re: does anybody earn a living programming in python?

2006-09-26 Thread Mike C. Fletcher
are putting together today in all those big institutions. Have fun, Mike ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: "fork and exit" needed?

2006-11-30 Thread Mike C. Fletcher
python which is how Linux knows what interpreter to use for the script. HTH, Mike -- ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: pyopengl glShaderSourceARB error

2006-12-09 Thread Mike C. Fletcher
ay of lengths) parameters are pulled from the list-of-strings you pass. HTH, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Metaclass uses?

2006-12-15 Thread Mike C. Fletcher
taclasses-pycon.pdf HTH, Mike -- ____ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Traceback of hanged process

2007-01-08 Thread Mike C. Fletcher
Klaas wrote: > Hynek Hanke wrote: > >> Hello, >> >> please, how do I create a pythonic traceback from a python process that >> hangs and is not running in an interpreter that I executed manually >> or it is but doesn't react on CTRL-C etc? I'm try

Re: OpenGL

2006-01-22 Thread Mike C. Fletcher
PyOpenGL these days is focusing on the OpenGL-ctypes implementation, which hopefully will let far more people work on the source-code (and add features and coverage of more extensions). Have fun, Mike -- ____ Mike C. Fletcher Designer, VR Plumb

Re: OpenGL

2006-01-22 Thread Mike C. Fletcher
[EMAIL PROTECTED] wrote: > Does that mean PyOpenGL is based on ctypes ? > PyOpenGL, the project with releases, binaries on most platforms, and lots of history is currently written in SWIG. It was originally written in pure Python C-extension code, then Tarn rewrote it using SWIG a few

Re: Collecting snmp data - threads, processes, twisted?

2006-02-07 Thread Mike C. Fletcher
devices you'll likely want to batch the queries into ~ 200 simultaneous queries and/or use multiple protocols (gives you more OS-level buffering). Have fun, Mike Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com htt

urllib2 and timeout question

2005-05-02 Thread Gerard C Blais
I'm trying to get a page from a slow server. and i'm timing out. I've tried socket.setdefaulttimeout9300), and urllib2.socket.setdefaulttimeout(300), and urllib2.socket.setdefauttimeout(300.0), but all seem to give up after 20 seconds. What's the best (or a good) way to increase the t

Re: Python & SQLite

2005-05-03 Thread Swaroop C H
org/tracker/pysqlite For Linux/BSD, use your favorite package management software (yum in Fedora, urpmi in Mandrake, emerge in Gentoo, apt-get in Debian, pkg_add in FreeBSD), etc. For Mac, use Fink. HTH :-) -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- ht

Re: python+windows/linux -> write stdout text to always on top text?

2005-05-03 Thread Swaroop C H
er > what program is on top. Why would you want to do that ? -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 and timeout question

2005-05-03 Thread Gerard C Blais
Thanks for the suggestion: My program now starts like this: import time import socket socket.setdefaulttimeout(300) import urllib2 import httplib import urlparse, gzip from StringIO import StringIO and it hasn't helped. On Mon, 2 May 2005 21:58:46 -0500, Skip Montanaro <[EMAIL PROTECTED]>

Re: python+windows/linux -> write stdout text to always on top text?

2005-05-03 Thread Swaroop C H
e engines achieve the same. HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: Pydev Refactoring Feature in Eclipse

2005-05-03 Thread Philippe C. Martin
Hi, I am using Eclipse 3.0.2 with Pydev 0.9.3 under Mandrake 10.1 and it works OK. Is 3.1M3 stable?, I see their latest milestone/stable is 3.1M6 - might want to upgrade. Regards, Philippe querejeto wrote: > Folks: > > I cannot get a refactoring menu to show up on my Eclipse (3.1M3, > Wi

Re: OOP

2005-05-03 Thread Philippe C. Martin
Try this: http://pigseye.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/ [EMAIL PROTECTED] wrote: > Hey yall, > I'm new to Python and I love it. Now I can get most of the topics > covered with the Python tutorials I've read but the one thats just > stumping me is Object Orientation. I can't get

Re: file parsing/watching + qt

2005-05-04 Thread Swaroop C H
.3 on linux with PyQt3. Use the Python binding to FAM (File Alteration Monitor): http://python-fam.sourceforge.net/ HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter and threads

2005-05-04 Thread Philippe C. Martin
I might be wrong, but my experience is to keep all tkinter calls in the main thread and use queues to have other threads tell the main one what to do. Regards, Philippe Nir Aides wrote: > Hello, > > In Tkinter, is it safe to call widget.after(time, callback) from another > thread (other than

Re: python+windows/linux -> write stdout text to always on top text?

2005-05-04 Thread Philippe C. Martin
I understand you wish to reroute stdout to some object than can write to a window - correct ? If so, this is what I do with tkinter class SC_Log_Stdout: #*** def __init__(self, p_log_text): self.__m_log_text

SC-Corporate-ID released

2005-05-06 Thread Philippe C. Martin
Dear all, I am very pleased to announce the release of SC-Corporate-ID. SC-Corporate-ID is a commercial Smart Card security system that can be extended by the user using the Python language. SC-Corporate-ID is written in Python and wxPython for the most part (except for the PCSC wrapper, the GIN

Re: hard memory limits

2005-05-07 Thread Philippe C. Martin
on element list is fine in >>>>python. >>>> >>>>Now I have a performance problem... >>>> >>>>Say I have 3 lists (20K elements, 1G elements, and 0 elements), call >>>>them 'a', 'b', and 'c'. I wan

Re: Ask for a tools to protect my .pyc file :)

2005-05-07 Thread Philippe C. Martin
Is it stable ? I tried it a few months ago and it crashed on my code I do not code that badly ;-) Regards, Philippe [EMAIL PROTECTED] wrote: > pyobfuscate > > http://www.lysator.liu.se/~astrand/projects/pyobfuscate/ -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-07 Thread Philippe C. Martin
This is nice! I just might understand regex eventually. Xah Lee wrote: > erratum: > > the correct URL is: > http://xahlee.org/perl-python/python_re-write/lib/module-re.html > > Xah > [EMAIL PROTECTED] > â http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption with Python?

2005-05-07 Thread Philippe C. Martin
I use http://www.amk.ca/python/code/crypto.html Regards, Philippe Blake T. Garretson wrote: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong file encryption in Python?

Re: Encryption with Python?

2005-05-07 Thread Philippe C. Martin
PS: remmember that single DES has been brocken. If you're also interested in signature, this is an interesting article (a big upsate if true) http://it.slashdot.org/article.pl?sid=05/02/16/0146218&tid=93 Regards, Philippe Philippe C. Martin wrote: > I use http://www.amk.ca

Re: How to implement multiple constructors

2005-05-08 Thread J C Lawrence
[EMAIL PROTECTED] wrote: > I am a C++ developer with only a little experience using Python. I > want to create a Python class where by I can construct an instance from > that class based on one of two different object types. The approaches I've seen used are to use a new clas

Pipes of binaries - IPC::Run

2005-05-10 Thread Swaroop C H
Is there a Python equivalent of Perl's IPC::Run module [ http://search.cpan.org/dist/IPC-Run/lib/IPC/Run.pm ] ? Thanks! -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: Read tab delimited ascii file

2005-05-12 Thread Swaroop C H
On 5/12/05, Irvine, Wayne D <[EMAIL PROTECTED]> wrote: > I have a tab delimited ascii/excel file formated like ... The CSV module can help you: http://docs.python.org/lib/module-csv.html HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info

Re: Encryption with Python?

2005-05-14 Thread Philippe C. Martin
Hi, I am a very happy user of http://www.amk.ca/python/code/crypto.html Regards, Philippe Blake T. Garretson wrote: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong fil

Re: A new to Python question

2005-05-14 Thread Philippe C. Martin
Hi, You're thinking you're passing the arguments as reference (look at mutable vs non-mutable) Your function returns the values in a tupple (x,y,...); you need to fetch the values from that tupple Regards, Philippe David wrote: > Hi I'm trying to teach myself python and so far to good, bu

Re: A new to Python question

2005-05-14 Thread Philippe C. Martin
Yes, I gathered. We all get our habits from somewhere :-) Regards, Philippe Bernd Nawothnig wrote: > On 2005-05-14, Philippe C. Martin wrote: > >> You're thinking you're passing the arguments as reference > > That is the way Fortran handles them: > > [

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-16 Thread Philippe C. Martin
No need to, just give the guy a glass of water and he'll fix it for you Mike Meyer wrote: > [EMAIL PROTECTED] (Mike brown) writes: > >> In article <[EMAIL PROTECTED]>, "Bubba" <[EMAIL PROTECTED]> >> wrote: >> >>> I'm so glad you've decided what everyone believes >>> >> >> >> >> Some of us

Extracting pickle from Python

2005-05-16 Thread Philippe C. Martin
Hi, How would one go about extracting the pickle module from Python (ex: to make a .a or a .dll) ? Thanks Philippe -- http://mail.python.org/mailman/listinfo/python-list

Sorting x lists based on one list

2005-05-17 Thread Philippe C. Martin
Hi, I'm looking for an easy algorithm - maybe Python can help: I start with X lists which intial sort is based on list #1. I want to reverse sort list #1 and have all other lists sorted accordingly. Any idea is welcome. Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-lis

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-17 Thread Philippe C. Martin
l1 = ['a','b','c'] l2 = ['toto','titi','tata'] # 'toto' refers to 'a', 'titi' to b' l3 = ['foo','bar','doe'] # 'foo' refers to 'a' I want

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-17 Thread Philippe C. Martin
Philippe Peter Otten wrote: >> Philippe C. Martin wrote: >> >>> I'm looking for an easy algorithm - maybe Python can help: >>> I start with X lists which intial sort is based on list #1. >>> I want to reverse sort list #1 and have all other lists sorted

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-17 Thread Philippe C. Martin
I will look at that merge/unmerge thing Peter Otten wrote: >> Philippe C. Martin wrote: >> >>> I'm looking for an easy algorithm - maybe Python can help: >>> I start with X lists which intial sort is based on list #1. >>> I want to reverse

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-17 Thread Philippe C. Martin
I had no clue this was feasible! Python folks should get the Nobel price ! Larry Bates wrote: > Why not merge the lists together using zip() and then > sort. > > info=zip(l1, l2, l3) > info.sort() > info.reverse > > Larry Bates > > Philippe C. Martin wrot

Re: How to learn OO of python?

2005-05-18 Thread Philippe C. Martin
You might want to look at this first: http://pigseye.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/ http://uml.tutorials.trireme.com/ could ildg wrote: > I have learned python for over a month. > I heard that it was very easy to learn, but when I tried to know OO of > python, I found it re

Re: newbie running IDLE with command line arguments

2005-05-18 Thread Philippe C. Martin
is the > following: > > import sys, socket > size = 1024 > host, port, message = sys.argv[1], int(sys.argv[2]), sys.argv[3] > print host > > How do I run this program on IDLE? I trying Run->Run Module but it > gives me: > > Traceback (most recent call last): >

Re: How to learn OO of python?

2005-05-18 Thread Philippe C. Martin
PS: if you're under linux, try umbrello: you design your classes with a graphical tool and umbrello will generate the code (Python too) for you. Philippe C. Martin wrote: > You might want to look at this first: > > http://pigseye.kennesaw.edu/~dbraun/csis4650/A&D/UM

Re: Newbie python design question

2005-05-22 Thread Philippe C. Martin
Hi, I C I usually use switch for my FSMs, in Python however I usually use if + elif Your question makes me realize it would be trivial to use a dictionnary in case the FSM had too many states, the key being the state and the item the method to handle the state. Regards, Philippe

Re: passing arguments

2005-05-22 Thread Philippe C. Martin
Hi, look at sys.argv Regards, Philippe Jeff Elkins wrote: > I'm sure this is obvious, but how the heck do pass an argument(s) to a > python script from the command line? > > Thanks, > > Jeff Elkins -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: twill v0.7, scriptable Web testing

2005-05-23 Thread C. Titus Brown
ANNOUNCING twill v0.7. twill is a simple Web scripting language built on top of Python and mechanize. It's designed for automated testing of Web sites, but it may be useful for anybody who needs to deal with Web sites (with e.g. logins and cookies) in a non-interactive manner. twill is a reimple

Python 2.4.1 installation problem

2005-05-24 Thread Philippe C. Martin
Hi, I am trying to install 2.4.1 on a new machine and have the following problems. 1) I'm on MDK 10.1 2) The system had 2.3.4 installed in /usr , I deleted the lib 3) I ran ./configure --prefix=/usr, then make, then make install, everything went OK If I run Python, I get File "/etc/pythonrc.py

Re: Python 2.4.1 installation problem

2005-05-24 Thread Philippe C. Martin
I had not realized (silly me) that Python might need external libraries in order to support specific modules. I have installed the bz2 and readline devel packages re-configured/made and everythin os now working. Philippe C. Martin wrote: > Hi, > > I am trying to install 2.4.1

SCF Bundle released

2005-05-26 Thread Philippe C. Martin
Dear all, I am very happy to announce the release of SCFB: a python development toolkit for Smart Cards. SCFB comes with all necessary tools to easily get a Smart Card application running. SCFB also includes the necessary Smart Card and their software interface. SCFB is the tool we use to deve

Re: Case Sensitive, Multiline Comments

2005-05-26 Thread Philippe C. Martin
Hi, A1: because some people find it very useful ? I know I do A2: they exist: """ Regards, Philippe Elliot Temple wrote: > Hi I have two questions. Could someone explain to me why Python is > case sensitive? I find that annoying. Also, why aren't there > multiline comments? Would adding

Trying to understand pickle.loads withou class declaration

2005-05-28 Thread Philippe C. Martin
Hi, Shuffling files around in my project, I notice I broke everything when I stopped declaring classes in a program that "pickled.loaded" existing pickled object of type "classes". The error message being that the class(es) was unknown. However, I _think_, I did manage to do the following in the

Re: Trying to understand pickle.loads withou class declaration

2005-05-28 Thread Philippe C. Martin
I confirm that all I have to do in order to successfully load a pickled object of class A is to declare class A: def __init__(self): pass Although the object has tons of fields Quid ? Regards, Philippe Philippe C. Martin wrote: > Hi, > > Shuffling files around in m

Re: Getting value of radiobutton trouble

2005-05-28 Thread Philippe C. Martin
Hi, I think your second call to Tk() does it: this works although the look is different: from Tkinter import * class GetVariant: def __init__(self): self.root = Tk() self.mainframe = Frame(self.root,bg="yellow") self.mainframe.pack(fill=BOTH,expand=1) s

Re: Getting value of radiobutton trouble

2005-05-28 Thread Philippe C. Martin
Button(self.root,text="click me",command=self.getvar).pack() def getvar(self): print 'HRE' a=GetVariant(self.root) d = OneButton() d.root.mainloop() Philippe C. Martin wrote: > Hi, > > I think your second call to Tk() does

Re: Getting value of radiobutton trouble

2005-05-28 Thread Philippe C. Martin
PS: Since your starting with TKinter, and although I do not know what your goal is, I suggest you take a look at wxPython: it is _wonderfull_ ! (no offence to TCL/TK) Regards, Philippe VK wrote: > Philippe C. Martin wrote: >> Hi, >> >> I think your second call to Tk(

Re: scipy for python 2.4

2005-05-28 Thread Philippe C. Martin
In order to help, I just tried to compile it, and it seems to have a bunch of dependencies to worry about: [EMAIL PROTECTED] SciPy_complete-0.3.2]# python setup.py install fftw_info: NOT AVAILABLE dfftw_info: NOT AVAILABLE FFTW (http://www.fftw.org/) libraries not found. Directori

Re: String manipulations

2005-05-28 Thread Philippe C. Martin
Multiply them by 1 ? Lorn wrote: > I'm trying to work on a dataset that has it's primary numbers saved as > floats in string format. I'd like to work with them as integers with an > implied decimal to the hundredth. The problem is that the current > precision is variable. For instance, some n

Re: Getting value of radiobutton trouble

2005-05-28 Thread Philippe C. Martin
self.v.get() print 'Input => "%s"' % self.variant class OneButton: def __init__(self): self.root = Tk() Button(self.root,text="click me",command=self.getvar).pack() def getvar(self): self.mainframe =

Re: Trying to understand pickle.loads withou class declaration

2005-05-29 Thread Philippe C. Martin
Thanks, Philippe Sébastien Boisgérault wrote: > Even > > class A: > pass > > should do the trick. Only the instance attributes are saved by a > pickle, > not the methods or the class itself. The unpickler tries to merge the > saved data and the class/method info that is not saved

Re: plotting with Python

2005-05-30 Thread Philippe C. Martin
Look at wxPython Regards, Philippe Rolf Wester wrote: > Hi, > > I have a Python console application that is intended to be used > interactively and I have to add plotting capabilities (multiple XY plots > and if possible 2D-surface plots). I'm loocking for a reasonably fast > plotting librar

Re: exit after process exit

2005-05-31 Thread Philippe C. Martin
os.popen ? Regards, Philippe [EMAIL PROTECTED] wrote: > Hello, > > I would like to run a python process and wait until the process exit. > How can I do it? > > For example I would like to run a.exe. and wait until a.exe exit. > > Sincerely Yours, > Pujo -- http://mail.python.org/mailman/

csv and iterator protocol

2005-06-04 Thread Philippe C. Martin
Hi, I have the following working program: 1) I import data in csv format into internal data structures (dict + list) 2) I can export back to csv 3) I can store my internal data using pickle+bz2 4) I can reload it. Hovever I notice a factor 10 size loss using pickle. So I would like to bzip/sto

Re: csv and iterator protocol

2005-06-05 Thread Philippe C. Martin
Thanks Kent, I had a bug in my test program: it works fine with strings Philippe Kent Johnson wrote: > Philippe C. Martin wrote: >> Can I initialize csv with input data stored in RAM (ex: a string) ? - so >> far I cannot get that to work. Or to rephrase the question, what

Re: circular import Module

2005-06-08 Thread Philippe C. Martin
That's the only way out I found with some module import problem using code generated by wxDesigner. Josef Meile wrote: >>>Circular import does not work on module level, but you can >>>import the module in a method: >>> >>>file1.py: >>>import file2 >>> >>> >>> >>>file2.py: >>># import file1 #

Generating HTML from python

2005-06-09 Thread Philippe C. Martin
Hi, I wish to use an easy way to generate reports from wxPython and feel wxHtmlEasyPrinting could be a good solution. I now need to generate the HTML wxHtmlEasyPrinting can print: I need to have a title followed by lines of text that do not look too ugly. If possible I would like to use an existi

Re: Generating HTML from python

2005-06-09 Thread Philippe C. Martin
PS: I am looking at the formatter module which seems to be related to HTML somehow, but without any code sample I'm a bit lost Philippe C. Martin wrote: > Hi, > > I wish to use an easy way to generate reports from wxPython and feel > wxHtmlEasyPrinting could be a good solution

Re: Generating HTML from python

2005-06-09 Thread Philippe C. Martin
I'll take a pick thanks - I like the fact it's buit-in (no extra installation) Michele Simionato wrote: > You could generate your report in reStructuredText > format (Google is your friend) and then convert > them in HTML, PS, PDF, etc. > > Michele Simionato -- http://mail.python.o

Re: Generating HTML from python

2005-06-09 Thread Philippe C. Martin
Thanks a bunch, I'm currently playing with HTMLGen (great but not in Python distrib ...) and it look very good - Yet your code example looks simple enough for me to look at that alternative. Thomas Guettler wrote: > Am Thu, 09 Jun 2005 12:43:19 + schrieb Philippe C. Martin:

ANNOUNCE: twill v0.7.1, scriptable Web testing.

2005-06-09 Thread C. Titus Brown
ANNOUNCING twill v0.7.1. twill is a simple Web scripting language built on top of Python and John J. Lee's 'mechanize'. It's designed for automated testing of Web sites, but it should prove useful for anybody who needs to interact with Web sites (especially those using logins and cookies) on the

howto send html mails using smtplib

2005-06-09 Thread Philippe C. Martin
Hi, I have the following problem: 1) I can use smtplib to send text messages 2) I can generate html 3) I want to email the html and want it to be seen by the email client as html. However, when I receive the message, the email client displays it as text (code hereunder) - I assume it has to do wi

Re: Generating HTML from python

2005-06-09 Thread Philippe C. Martin
Thanks Kent Johnson wrote: > Philippe C. Martin wrote: >> Hi, >> >> I wish to use an easy way to generate reports from wxPython and feel >> wxHtmlEasyPrinting could be a good solution. >> >> I now need to generate the HTML wxHtmlEasyPrinting can print

re: howto send html mails using smtplib

2005-06-10 Thread Philippe C. Martin
Tim, You are most correct, replace_header did the trick. Thanks a bunch. Philippe Tim Williams wrote: > "Philippe C. Martin" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I have the following problem: >> 1) I can use smtplib to send

Re: Generating HTML from python

2005-06-10 Thread Philippe C. Martin
Thanks Walter Dörwald wrote: > Cappy2112 wrote: >> I looked at HTMLGen a while ago- I didn't see what the advantage was. >> I wrote soem code similar to the example above, to generate a page.. >> It worked out fine. >> >> However, I want to add HTML ouput to many of my other python programs, >>

Re: Generating HTML from python

2005-06-10 Thread Philippe C. Martin
PS: Just wanted to add that HTMLGen works very well and outputs html that wxHtmlEasyPrinting and my email client have not problem reading (I output student grades, missing assignments, ... in tables). The one gitch is they do not have any installation program (that I've seen) for windows. Regards

Release announcement

2005-06-10 Thread Philippe C. Martin
Dear all, I am very happy to anounce the release of SnakeCard's School-ID, a school/university Smart Card based security solution that can be extended using Python or other languages that can "talk" to Python modules. The current release includes the following features: Student/Faculty Identific

Re: case/switch statement?

2005-06-11 Thread Philippe C. Martin
I _love_ Python! Leif K-Brooks wrote: > Joe Stevenson wrote: >> I skimmed through the docs for Python, and I did not find anything like >> a case or switch statement. I assume there is one and that I just >> missed it. Can someone please point me to the appropriate document, or >> post an exam

What is different with Python ?

2005-06-11 Thread Philippe C. Martin
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very pragmatic - 3) I usually move forward when I get the gut feeling I am correct - 4) Most likely because of

Re: Dealing with marketing types...

2005-06-11 Thread Philippe C. Martin
This is the never ending story of the cyclic (I'm being redundant) life cycle of many companies: R&D driven versus Marketing driver. My belief is that none work as the trades do not attempt to reach the same goal: 1) R&D should not try to define products 2) Marketing should not try to impose the t

Re: What is different with Python ?

2005-06-11 Thread Philippe C. Martin
Thanks , I have gotten many answers already, some not posted. 1) Typing is not the issue - even with RT-Kernels, people use C++ 2) Yes I find dynamic binding very nice 3) "... you didn't give many examples of what you did for the last 18 years (except that that also included

Re: What is different with Python ?

2005-06-11 Thread Philippe C. Martin
soup ...") >> seems to be the answer but >> my brain somehow wants to formalize it. > > Here one further suggestion trying to point out, that > it probably can't generally be formalized, because > the experience one developes after going through > the story

Re: What is different with Python ?

2005-06-11 Thread Philippe C. Martin
> PS: http://jove.prohosting.com/~zahlman/cpp.html So you're saying they only use perl in Taiwan ;-) Tom Anderson wrote: > On Sat, 11 Jun 2005, Philippe C. Martin wrote: > >> Yet for the first time I get (most) of my questions answered by a >> language I did not kno

Re: What is different with Python ?

2005-06-12 Thread Philippe C. Martin
embedded systems with realtime constaints use assembly, C/C++, or ADA. I agree with you and Peter though that these issues need not be treated on a first course. Yet, and depending on the ultimate goal (John spoke of IT versus CS) some of the newly trained folks should know about it. We could not enjoy

slicing a bsddb table, eg. for rec in bsddb["AArdvark":"zebra"]: print rec

2005-06-12 Thread Neville C. Dempsey
#!/bin/env python import bsddb test=bsddb.btopen("test.tbl") for m in "JFMATQPHSOND": test[m]="Profit for month "+m+" $1B" def subyear_report(record_selection): for data in record_selection.iteritems(): print data # I was expecting a slice of an index file to yield a # generator so not all

Re: What is different with Python ?

2005-06-12 Thread Philippe C. Martin
Taking stuff for granted in unrelated to progress. I agree that the "trade" of software engineering evolves and that, thanks to hardware advances, we _usually_ can now "object orient" our software, add billions of abstraction layers, and consume memory without a second thought. But the trade evolv

recursive import list

2005-06-13 Thread Philippe C. Martin
Hi, I have a fairly large project going on and would like to figure out automatically from the source which files are being imported. ex: find_out mymain.py Is there an easy way to achieve that ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: What is different with Python ?

2005-06-13 Thread Philippe C. Martin
> So you're arguing that a CS major should start by learning electronics > fundamentals, how gates work, and how to design hardware(*)? Because > that's what the concrete level *really* is. Start anywhere above that, > and you wind up needing to look both ways. Some very good schools still believe

Re: What is different with Python ?

2005-06-13 Thread Philippe C. Martin
> I don't buy that. I think there's a world of difference between knowing > what something does and how it does it; a black-box view of the memory > system (allocation + GC) is perfectly sufficient as a basis for > programming using it. That black-box view should include some idea of how > long the

Re: searching for IDE

2005-06-13 Thread Philippe C. Martin
pydev for eclipse ? alexrait1 wrote: > I need an IDE for python that has the ability to show the filds of a > class when I write "." > Just the way it works in eclipse/JBuilder with java or visual studio > with c++ > For now I treid eric3 and IDLE they d

Re: case/switch statement?

2005-06-13 Thread Philippe C. Martin
Any speed issue ? [EMAIL PROTECTED] wrote: > Philippe C. Martin wrote: >> Leif K-Brooks wrote: >> >> > Joe Stevenson wrote: >> >> I skimmed through the docs for Python, and I did not find anything >> >> like >> >> a case or switch st

Re: recursive import list

2005-06-14 Thread Philippe C. Martin
Mike Meyer wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: >>> I have a fairly large project going on and would like to figure out >>> automatically from the source which files are being imported. >> If you use your own import function, like below, you could create a >> list of all import

Re: eclipse, pydev and wxpython - standard output redirection ?

2005-06-14 Thread Philippe C. Martin
app = MyApp(False) app.MainLoop() will keep wxWidgets from using its own window. Grzegorz wrote: > Hello, I'm using eclipse with pydev plugin, I'm working on a program using > wxpython . > When I'm executing that application standard error output does not show in > eclipse console window - w

Re: Where do they tech Python officialy ?

2007-07-23 Thread Mike C. Fletcher
d suggest just learning "normal" Python first, *then* moving onto the hardcore stuff. HTH, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter or wxpython?

2007-08-05 Thread Raúl Gómez C.
Well, for a newbie I think the best choice is PythonCard, is a framework based on wxPython but much more simple, check it out! On 8/3/07, Glenn Hutchings <[EMAIL PROTECTED]> wrote: > > On Aug 3, 1:00 am, "wang frank" <[EMAIL PROTECTED]> wrote: > > I want to buil

Re: Call for advice on how to start PyOpenGL!

2007-08-20 Thread Mike C. Fletcher
arge number of simple samples, though I've still got "release OpenGLContext" on my seemingly infinitely long and growing todo list, so that might not be the easiest way to start. The "Red Book" is an older standard manual for getting started with (C) OpenGL code, ofte

Re: Question: wxpython and 3d engine example with model load ?

2007-08-23 Thread Mike C. Fletcher
get panda3d and wxPython working together I don't see a soya + wxPython page in a few seconds of googling, so I guess finding that is left as an exercise for the reader. HTH, Mike -- Mike C. Fletcher Designer, VR Plumber, Coder http://www.vr

Re: Python GUI + OpenGL

2007-03-02 Thread Mike C. Fletcher
Achim Domma wrote: > Hi, > > I'm developing a GUI app in Python/C++ to visualize numerical results. > Currently I'm using Python 2.4 with wx and PyOpenGLContext, but there > are no windows binaries for Python 2.5 for quite some time now. > > I need a OpenGL contex

Bug in python!? persistent value of an optional parameter in function!

2007-03-07 Thread C Barr Leigh
Help! Have I found a serious bug? This seems like highly undesired behaviour to me. From the program below, I get output: call1: ['sdf'] call2: ['Set within test for call2'] call3: ['Set within test for call2'] instead of what I should get, call1: ['sdf'] call2: ['Set within test for call2'] cal

<    3   4   5   6   7   8   9   10   11   12   >