adding a character to the last string element of a list

2005-07-05 Thread Philippe C. Martin
Hi, I have the following question: l = ['ABCDE','FGHI'] l[1:] #returns ['FGHI'] l[1:][0] #return 'FGHI' a = l[1:][0] + 'J' #a becomes 'FGHIJ' l[1:][0] += 'J' #NO ERROR BUT l[1:][0] == 'FGHI' What am I missing ? Thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

RE: adding a character to the last string element of a list

2005-07-05 Thread Philippe C. Martin
I guess my slicing was wrong, l[-1] worked Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re:

2005-07-01 Thread Philippe C. Martin
Being a C programmer before a C++ I am not certain my opinon qualifies. Yet I have seen myself avoiding C++ contracts lately because I dread going back to that type of work: why use silex when you got a match ? Adriaan Renting wrote: I'm not a very experienced Python programmer yet, so I

Re: Seeking IDE

2005-06-30 Thread Philippe C. Martin
Linux: Eric3 All: Eclipe: my choice (might be tough to get into) Nick Mountford wrote: Hi, Complete newb to Python and programming, looking for an open source IDE to download. Any suggestions? Thanks, Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeking IDE

2005-06-30 Thread Philippe C. Martin
oops: eclipse Philippe C. Martin wrote: Linux: Eric3 All: Eclipe: my choice (might be tough to get into) Nick Mountford wrote: Hi, Complete newb to Python and programming, looking for an open source IDE to download. Any suggestions? Thanks, Nick -- http://mail.python.org

Re: ANN: PyDev 0.9.5 released

2005-06-28 Thread Philippe C. Martin
Thanks Fabio, I take this opportunity to ask what I could be doing wrong with pylint: my PYTHONPATH is good (I think), my code compiles and passes pylint when I run it by hand. Yet pylint in pydev does not seem to think the modules I include and usually derive from exist. Any clue ? Regards,

Embedding python in C

2005-06-28 Thread Philippe C. Martin
Hi, Is there a program out there that would generate the C code to instantiate objects and call them: ex: miracle.exe -i mymodule.py -o module_internface.c ? I seem to recall a _yes_ to that but I got a memory overflow :-) Thanks, Philippe --

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Philippe C. Martin
Hi, 1) check the spacing before if name == Nathan: 2) put a ':' after else Regards, Philippe Nathan Pinno wrote: Hi all, I need help figuring out how to fix my code. I'm using Python 2.2.3, and it keeps telling me invalid syntax in the if name == Nathan line. Here is the code if you

Re: Embedding python in C - newbie

2005-06-28 Thread Philippe C. Martin
Just to make sure i'm clear as I've been told about swig and pyrex: I don't want to eventually have a python script call C modules, but rather a main.c make calls to python functionnalities. I did add newbie in the title :-) Regards, Philippe Philippe C. Martin wrote: Hi

Re: Embedding python in C - newbie

2005-06-28 Thread Philippe C. Martin
Sorry, it is still not clear when I reread it: 1) I have a bunch of Python working modules 2) I need to compile something so external C applications can access 1) Thanks, Philippe Philippe C. Martin wrote: Just to make sure i'm clear as I've been told about swig and pyrex: I don't want

Re: Embedding python in C

2005-06-28 Thread Philippe C. Martin
Thanks, I cannot get the demo to compile, but I joined their list. Thanks Philippe Chris Lambacher wrote: pyrex can be used for embedding too. http://www.freenet.org.nz/python/embeddingpyrex/ On 6/28/05, Philippe C. Martin [EMAIL PROTECTED] wrote: Actually maybe not ... looking

Re: Boss wants me to program

2005-06-27 Thread Philippe C. Martin
As well as wxDesigner (great!) http://www.roebling.de/ Regards, Philippe Björn Lindström wrote: Apple Grew [EMAIL PROTECTED] writes: I think since speed is not such an issue (I heard that python can make faster GUI programs) you should use Visual Basic. It is very well suited for

SCF 1.1 with BasicCard support released

2005-06-27 Thread Philippe C. Martin
Dear all, I am very happy to announce the release of SCF 1.1, a Python based Smart Card development framework for Windows® and Linux. SCF 1.1 introduces support for BasicCard® Enhanced and Professional under GNU/Linux and Windows®. All commands are supported as well as firmware image parsing so

Re: Plain text email?

2005-06-27 Thread Philippe C. Martin
Hi, I had the exact opposite problem :-) Hope this helps Regards, Philippe # def Mail(self,p_data): #data is string of text you = wx.GetTextFromUser('EMAIL ADDRESS','ID') if len(you) == 0:

Re: Which kid's beginners programming - Python or Forth?

2005-06-27 Thread Philippe C. Martin
Hi, A couple links ... http://www.summerland.uku.co.uk/ http://pylogo.org/ http://www.python.org/sigs/edu-sig/ BORT wrote: Please forgive me if this is TOO newbie-ish. I am toying with the idea of teaching my ten year old a little about programming. I started my search with something

Re: Better console for Windows?

2005-06-27 Thread Philippe C. Martin
Hi, You might want to check out ipyhton. http://ipython.scipy.org Regards, Philippe Brett Hoerner wrote: This is a pretty basic, mostly un-python-related question, although I'm asking because of Python. Is there a different shell I can use (other than cmd.com) to run Python in, where

Re: Better console for Windows?

2005-06-27 Thread Philippe C. Martin
Ho! I thought the shell commands in ipython (cd, lx ) might cut it. Regards, Philippe Brett Hoerner wrote: Philippe C. Martin wrote: You might want to check out ipyhton. I use it. :) I love it. When I meant console I meant the shell app that runs any text-based programs

Re: Big problem fetching members from dynamically loaded module

2005-06-26 Thread Philippe C. Martin
will study that. Many thanks Philippe Peter Otten wrote: Philippe C. Martin wrote: OK Peter, first of all thanks. You seem to be German and although I leave in the states, I'm French and your english is clearly far more advanced than mine: I have yet to understand a few of your comments

Re: Running Python interpreter in Emacs

2005-06-26 Thread Philippe C. Martin
Hi, I was refering to the Windows $PATH which you can modify in the same dialog. To make sure it's done properly, open a console (cmd.exe) and type python Regards, Philippe Rex Eastbourne wrote: I went to My Computer | Properties | Advanced | Environment Variables and added c:\program

Big problem fetching members from dynamically loaded module

2005-06-25 Thread Philippe C. Martin
Hi, I'm getting pretty desperate here: The code below crashes on the last line (but works from a shell). The class 'BC' exists and the loop on self.__BC_EXEC_LIST passes fine. It's got to be something really stupid but I've been looking at it too long I guess. Any clue would be quite welcome.

Re: Big problem fetching members from dynamically loaded module

2005-06-25 Thread Philippe C. Martin
Hi, Hopefully to make things clearer: this works from a shell: In [23]:from SC.CARDS.BC import * In [24]:l = inspect.getmembers(eval('BC')) #l will get all members from class 'BC' whereas the code referenced below gets an exception saying 'BC' is not defined. Thanks, Philippe Philippe C

Re: Big problem fetching members from dynamically loaded module

2005-06-25 Thread Philippe C. Martin
of 'XYZ' What puzzles me furher is that the 'exec' of commands such as 'sc_bc = BC()' do work as I use them further in 'XYZ' whereas the exec of 'from xxx import *' does not _seem_ to do anything. Grrr! I feel more stupid every day ! Any insight ? Thanks, Philippe Philippe C. Martin

Re: Excellent Site for Developers

2005-06-25 Thread Philippe C. Martin
Hi, Not being from anglo-saxon heritage, I keep wondering why spammers always (or very often) get called 'trolls' ? I mean fantasy fiction has brought us many hugly beasts (goblin, warlock, orc, dark elf ) The trolls, as I recall, grow back their limns once those have been cut by the nice

Re: Excellent Site for Developers

2005-06-25 Thread Philippe C. Martin
Sorry, limbs (plus I check in a dictionnary first!) Philippe C. Martin wrote: limns -- http://mail.python.org/mailman/listinfo/python-list

Re: Big problem fetching members from dynamically loaded module

2005-06-25 Thread Philippe C. Martin
guess would be just import inspect and after that QUID ? Thanks and regards, Philippe Peter Otten wrote: Philippe C. Martin wrote: l = inspect.getmembers(eval('BC')) #THIS CRASHES - the class exists Care to provide the traceback? In [23]:from SC.CARDS.BC import * In [24

Re: Excellent Site for Developers

2005-06-25 Thread Philippe C. Martin
Woof! And I thought my english was improving ! I'm laughing very hard right now, thanks ! Philippe Skip Montanaro wrote: Philippe Not being from anglo-saxon heritage, I keep wondering why Philippe spammers always (or very often) get called 'trolls' ? Fishing from a boat that

Re: Running Python interpreter in Emacs

2005-06-24 Thread Philippe C. Martin
Hi, Since I'm a Linux user, I went through the following procedure: I installed emacs 20.7.1 and Python 2.4 I installed python-mode 1.0A into site-lisp I added c:\python24 to my path I put this .emacs on c:\ (see further down - I'm sure you don't need half of it) And everyhing is working fine:

Re: Running Python interpreter in Emacs

2005-06-24 Thread Philippe C. Martin
I do not think there is any need to tell emacs where Python is; besides having python.exe in your Windows $PATH. Regards, Philippe Rex Eastbourne wrote: I have the following in my .emacs: (add-to-list 'load-path C:\Program Files\Python24) Is that enough? I didn't see anything similar

Re: Running Python interpreter in Emacs

2005-06-23 Thread Philippe C. Martin
Hi, this is what I have: (autoload 'python-mode python-mode Python mode. t) (setq auto-mode-alist (append '((\\.\\(py\\)$ . python-mode)) auto-mode-alist)) Plus, you can always spawn a shell then call your script (if the point is to have access to the output).

Re: UML to Python/Java code generation

2005-06-21 Thread Philippe C. Martin
Try this: http://uml.sourceforge.net/index.php Regards, Philippe Maurice LING wrote: Hi, Is there any UML tools that is able to take UML and generate Python codes? Cheers Maurice -- http://mail.python.org/mailman/listinfo/python-list

Python choice of database

2005-06-20 Thread Philippe C. Martin
Hi, I am looking for a stand-alone (not client/server) database solution for Python. 1) speed is not an issue 2) I wish to store less than 5000 records 3) each record should not be larger than 16K As I start with Python objects, I thought of using shelve, but looking at the restrictions

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
Well that would be shelve I guess ... with the restrictions I mentioned. Regards, Philippe Erik Max Francis wrote: Philippe C. Martin wrote: I am looking for a stand-alone (not client/server) database solution for Python. 1) speed is not an issue 2) I wish to store less than 5000

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
Thank you all for your answers. A pure Python would have beenmy first choice. yet I now feel I should spend some time looking at PySQLite (I like the fact it's pre-compiled for Windows). Thanks. Philippe Philippe C. Martin wrote: Hi, I am looking for a stand-alone (not client/server

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
You mean pickling a dictionnary of 5000/16K objects ? Erik Max Francis wrote: Philippe C. Martin wrote: Well that would be shelve I guess ... with the restrictions I mentioned. I was talking about pickle, not shelve. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
OK, I'll try that too. Regards, Philippe Erik Max Francis wrote: Philippe C. Martin wrote: You mean pickling a dictionnary of 5000/16K objects ? Yes. You said speed was not an issue; pickling only 5000 objects, each no more than 16 kB, is easily handled by any remotely modern

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
1. 5000 files -- my personal favourite. You got a point William Park wrote: Philippe C. Martin [EMAIL PROTECTED] wrote: Hi, I am looking for a stand-alone (not client/server) database solution for Python. 1) speed is not an issue 2) I wish to store less than 5000 records 3) each

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
Thanks, I'm looking at KirbyBase also but wonder if it can handle bitmaps (I could always pickle it first I guess). Regards, Philippe John Abel wrote: Philippe C. Martin wrote: Thank you all for your answers. A pure Python would have beenmy first choice. yet I now feel I should spend

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
Correct, that's not a constraint right now. Paul Rubin wrote: Philippe C. Martin [EMAIL PROTECTED] writes: 1) speed is not an issue 2) I wish to store less than 5000 records 3) each record should not be larger than 16K You don't mention whether multiple running programs need to use

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
Yes, I agree, but as most of the customer base I target uses the O/S that cannot be named ;-) , file names could become a problem just as 'ln -s' is out of the question. Yet, this might be the best trade-off. Regards, Philippe Oren Tirosh wrote: Philippe C. Martin wrote: Hi, I am

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 imported modules.

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 -

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 don't do this... --

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 statement. I assume there is one and that I just missed it. Can someone please

Re: What is different with Python ?

2005-06-12 Thread Philippe C. Martin
Python if no one were here to implement its VM, I have not looked at the code, but I gather it is fairly complex and does require an amount of low level skills. Regards, Philippe Roy Smith wrote: Philippe C. Martin [EMAIL PROTECTED] wrote: Yet, many issues that a future software engineer

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 evolves

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 example? I

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: RD driven versus Marketing driver. My belief is that none work as the trades do not attempt to reach the same goal: 1) RD should not try to define products 2) Marketing should not try to impose the

Re: What is different with Python ?

2005-06-11 Thread Philippe C. Martin
it here as I am not marketing) would not exist today were it not for Python. 4) Yes I agree a mix (... well spiced soup ...) seems to be the answer but my brain somehow wants to formalize it. Regards, Philippe Philippe C. Martin wrote: I apologize in advance for launching this post but I

Re: What is different with Python ?

2005-06-11 Thread Philippe C. Martin
of Basic. Claudio Philippe C. Martin [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] 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

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 know 1 year ago. Amazing, isn't

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 text messages 2) I can generate html 3) I

Re: Generating HTML from python

2005-06-10 Thread Philippe C. Martin
Thanks Walter Drwald 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, and I don't

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.

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

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

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. I now need

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 --

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: Hi, I

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

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: I need to have a title followed by lines of text

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 # Does not work! def foo():

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 Python RAM structure

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

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 --

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 library

Re: Trying to understand pickle.loads withou class declaration

2005-05-29 Thread Philippe C. Martin
Thanks, Philippe Sbastien Boisgrault 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 to

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 my project, I

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)

Re: Getting value of radiobutton trouble

2005-05-28 Thread Philippe C. Martin
(self.root) d = OneButton() d.root.mainloop() Philippe C. Martin wrote: 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

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() does it: this works

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.

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

Re: Getting value of radiobutton trouble

2005-05-28 Thread Philippe C. Martin
): self.root = Tk() Button(self.root,text=click me,command=self.getvar).pack() def getvar(self): self.mainframe = Toplevel(bg=yellow) a=GetVariant(self.mainframe) d = OneButton() d.root.mainloop() VK wrote: Philippe C. Martin wrote: Sorry, I

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

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

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 on a new machine

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

Re: newbie running IDLE with command line arguments

2005-05-18 Thread Philippe C. Martin
I might be missing it, but I do not see anyway to set command line params in IDLE. You might hage to set the values in your code: host, port, message = 'localhost', 9000, .; crypto wrote: Hi, I am trying to use IDLE in order to test my program. My program is the following:

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/AD/UML_tutorial/ http

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 --

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 to reverse sort l1 and have l2 and l3 follow accordingly. Regards, Philippe Philippe C. Martin wrote: Hi, I'm looking for an easy

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

2005-05-17 Thread Philippe C. Martin
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 accordingly. One way, using a helper list with indices: l1 = ['a','b','c

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 sort list #1 and have all other lists sorted accordingly. One

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 don't. Believe that

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

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 file

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,

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: [...] Right now I'm taking a simple program

Re: hard memory limits

2005-05-07 Thread Philippe C. Martin
Hi, Why don't you catch the exception and print the trace ? Regards, Philippe Maurice LING wrote: John Machin wrote: On Sat, 07 May 2005 02:29:48 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: On Sat, 07 May 2005 11:08:31 +1000, Maurice LING [EMAIL PROTECTED] wrote: It doesn't seems

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/0146218tid=93 Regards, Philippe Philippe C. Martin wrote: I use http://www.amk.ca/python/code

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

<    1   2   3   >