Re: python vs java & eclipse

2006-12-02 Thread Philippe Martin
Amir Michail wrote: > Hi, > > It seems to me that measuring productivity in a programming language > must take into account available tools and libraries. > > Eclipse for example provides such an amazing IDE for java that it is no > longer obvious to me that one would be much more productive in

Re: key not found in dictionary

2006-08-22 Thread Philippe Martin
KraftDiner wrote: > I have a dictionary and sometime the lookup fails... > it seems to raise an exception when this happens. > What should I do to fix/catch this problem? > > desc = self.numericDict[k][2] > KeyError: 589824 < This is the error that is being produced, > because there is

Re: write eof without closing

2006-08-19 Thread Philippe Martin
cage wrote: > hello > > can i write a eof to a file descriptor without closing it? > like: > fd.write(EOF) > or something > > grts, > ruben No but there is an EOF to the file anyway, even if it is open. I recall under MS-DOS, you could create a file of size N without writing to it (some INT21

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Philippe Martin
Philippe Martin wrote: > many_years_after wrote: > >> Hi,everyone: >> >> Have you any ideas? >> >> Say whatever you know about this. >> >> >> thanks. > Hi, > > You mean unicode I assume: > http://www.ri

Re: text editor suggestion?

2006-08-19 Thread Philippe Martin
John Salerno wrote: > Ok, I know it's been asked a million times, but I have a more specific > question so hopefully this won't be just the same old post. I've tried a > few different editors, and I really like UltraEdit, but it's > Windows-only and I'm working more on Linux nowadays. > > Here ar

Re: How to get the ascii code of Chinese characters?

2006-08-19 Thread Philippe Martin
many_years_after wrote: > Hi,everyone: > > Have you any ideas? > > Say whatever you know about this. > > > thanks. Hi, You mean unicode I assume: http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml Regards, Philippe -- http://mail.python.org/mailman/listinfo/pytho

Re: How to fill a form

2006-08-17 Thread Philippe Martin
Sulsa wrote: > On Tue, 15 Aug 2006 03:37:02 - > Grant Edwards <[EMAIL PROTECTED]> wrote: > >> On 2006-08-15, Sulsa <[EMAIL PROTECTED]> wrote: >> >> > I want to fill only one smiple form so i would like not to use >> > any non standard libraries. >> >> Then just send the HTTP "POST" request

Re: The Semicolon Wars as a software industry and human condition

2006-08-17 Thread Philippe Martin
>>It was philosophers that got us out of that Dark Ages mess, and no small >>number of them lost their lives in doing so. And today, the philosophy >>majors are the butts of the most jokes, because after the philosophers >>succeeded in opening our minds, we forgot why we needed them. Look east X

Re: hide python code !

2006-08-15 Thread Philippe Martin
Bayazee wrote: > > Armin Steinhoff wrote: >> Bayazee wrote: >> > hi >> > can we hide a python code ? >> > if i want to write a commercial software can i hide my source code from >> > users access ? >> > we can conver it to pyc but this file can decompiled ... so ...!! >> > do you have any idea ab

Re: Compiling wxPython app for Windows; Single EXE

2006-08-14 Thread Philippe Martin
Vincent Delporte wrote: > Hi > > I browsed the archives, but since some messages date back a bit, I > wanted to make sure that > > - py2exe is still the best tool in town to compile Python scripts to > run on a Windows host that doesn't have Python installed, including > wxWidgets/wxPython > >

Re: hide python code !

2006-08-11 Thread Philippe Martin
Bayazee wrote: > Hi, > ThnaX for Your Answers ... > i am an open source programmer ... ! and i never like to write a closed > source app or hide my codes ! it just a question that i must > answer/solve it! > one of site ( www.python.ir ) users asked this question ! but > unfortunately i have't any

Re: hide python code !

2006-08-11 Thread Philippe Martin
Bayazee wrote: > hi > can we hide a python code ? > if i want to write a commercial software can i hide my source code from > users access ? > we can conver it to pyc but this file can decompiled ... so ...!! > do you have any idea about this ...? > > --- > Fir

Re: Tkinter module not found

2006-08-11 Thread Philippe Martin
Shuaib wrote: > Hey, > > Even though I freshly installed Tcl and Tk, python still seem to have > problems accessing Tkinter module. Here is what says when I do "import > Tkinter" > > == > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No module named Tkinter > == >

Re: New to Python-- Help

2006-08-08 Thread Philippe Martin
John & Mary Cook wrote: > I just installed Python on Windows XP Pro. When I enter 'python' at the > >>> prompt in Pythonwin IDE I get the following: > > Traceback (most recent call last): >File "", line 1, in ? > Name Error: name 'python' is not defined > > Can anyone help? > > Thank you,

Re: why did wxpython MakeActiveXclass stopped working?!?!!?!?

2006-08-06 Thread Philippe Martin
> the embedded windows media player. But Im guessing i made that py2exe > distributable with older pywin32 and older wxpython. > This makes me think that one of the newer versions of pywin32 or > wxpython is giving me that error trouble. > > Any other ideas on how to rectify t

Re: embedding console in wxpython app

2006-08-06 Thread Philippe Martin
Janto Dreijer wrote: > I'm writing a Linux filemanager using wxPython. I'd like to embed a > bash console inside it. I have found the Logilab pyqonsole > (http://www.logilab.org/projects/pyqonsole), but it uses PyQT. > > Does anyone know how to do this from wx? > Is it possible to embed a PyQT wi

Re: why did wxpython MakeActiveXclass stopped working?!?!!?!?

2006-08-06 Thread Philippe Martin
Philippe Martin wrote: > jojoba wrote: > >> HI >> I wrote a little wxpython program with an embedded windows media >> player. >> It worked great. Recently, I reinstalled windows and then wxpython >> (most likely a newer version than i had before). Now when

Re: why did wxpython MakeActiveXclass stopped working?!?!!?!?

2006-08-06 Thread Philippe Martin
jojoba wrote: > HI > I wrote a little wxpython program with an embedded windows media > player. > It worked great. Recently, I reinstalled windows and then wxpython > (most likely a newer version than i had before). Now when i run the > exact same code, i get this error: > > File "C:\Documents

Re: [Linux] What toolkit for a good grid/spreadsheet widget?

2006-08-04 Thread Philippe Martin
jean-michel bain-cornu wrote: > Hi, >> Thx for the two pointers. Are those widgets more than just tables, ie. >> can I edit the contents, including displaying a combo box, can items >> be grouped or hierarchized, or are they just basic, read-only tables >> to display results? >> >> I need this ki

Re: [Linux] What toolkit for a good grid/spreadsheet widget?

2006-08-03 Thread Philippe Martin
Vincent Delporte wrote: > Hello > > I'd like to use Python under Linux to write a business application, > and I'll need a good grid/spreadsheet editable widget, maybe not on > par with eg. ComponentOne's excellent VSFlexGrid > (http://www.componentone.com/newimages/flexgrid_02_lg.gif), but > some

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
John Machin wrote: > > Simon Forman wrote: >> Philippe, please! The suspense is killing me. What's the cpu!? >> >> For the love of God, what's the CPU? >> >> I-can't-take-it-anymore-it's-such-a-simple-question-ingly yours, > > Yes, please . > > I've found a C compiler manual on the web f

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
John Machin wrote: > Have you actually tried it? Do you mean it barfs on the word "long" > [meaning that it's not an ANSI-compliant C compiler], or that "long" is > only 16 bits? :-) if the documentation tells me there is no 32 bit support, why should I not believe it ? > because (1) [like I sa

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Sorry forgot a few answers/comments: John Machin wrote: > SHOULD BE >= >currently add([6, 6], [4, 4] -> [10, 10] True, thanks > *** try - 10 instead of % 10 > If the first operand is > 19, you have a bug! > This might save a few CPU cycles on your smartcard can it ? each array value will be

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
John Machin wrote: > So why don't you get a freely available "bignum" package, throw away > the bits you don' t want, and just compile it and use it, instead of > writing your own bug-ridden (see below) routines? Oh yeah, the bignum > package might use "long" and you think that you don't have acce

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
[EMAIL PROTECTED] wrote: > > Philippe Martin wrote: >> Yes, I came here for the "algorithm" question, not the code result. > > To turn BCD x to binary integer y, > > set y to zero > for each nibble n of x: > y = (((y shifted left 2) + y) shifted

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: > Philippe Martin <[EMAIL PROTECTED]> writes: >> On device #1 no constraint for my purpose. On the smartcard, the tradeoff >> is between using EEPROM (plenty + slow + small life expectancy) for temp >> variables versus RAM (very little) ... but I

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: > Philippe Martin <[EMAIL PROTECTED]> writes: >> Well I am under NDA so I cannot tell you what the application is - I need >> numbers (dec) with up to 24 digits. > > You actually need to represent numbers up to 10**24?? > >> As I said, I w

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: > Philippe Martin <[EMAIL PROTECTED]> writes: >> Well I am under NDA so I cannot tell you what the application is - I need >> numbers (dec) with up to 24 digits. > > You actually need to represent numbers up to 10**24?? > >> As I said, I w

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: > Philippe Martin <[EMAIL PROTECTED]> writes: >> I actually need numbers much larger than 32 bits. > > What is the max size hex number you need? What is the application if > you don't mind my asking? Well I am under NDA so I cannot tell you wha

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
John Machin wrote: > Philippe Martin wrote: > >> >> Yes I had arm in mind (for some reason) while it is the Smc8831 >> (http://www.google.com/url?sa=U&start=1&q=http://www.epsondevice.com/www/PDFS/epdoc_ic.nsf/5388db40b5eee4f949256a9c001d589f/944b7300

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
John Machin wrote: > > Philippe Martin wrote: > >> >> 3. How does the device manage to compute the 8-decimal-digit number >> >> that is your input?? >> >> What device manager ? think about it before being rude >> > > No device man

Re: BCD List to HEX List

2006-07-31 Thread Philippe Martin
Paul Rubin wrote: > Philippe Martin <[EMAIL PROTECTED]> writes: >> > Why are you avoiding naming the chip and its compiler? >> >> I must disagree on that one: There are many threads on this site where >> people just have fun talking algorithm. I'm not an

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: > Philippe Martin wrote: >> John Machin wrote: >> >> > >> > Philippe Martin wrote: >> >> Philippe Martin wrote: >> >> >> >> > Hi, >> >> > >> >> > I'm looking for an algo t

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Philippe Martin wrote: > Grant Edwards wrote: > >> On 2006-07-31, John Machin <[EMAIL PROTECTED]> wrote: >> >>>> but if you >>>> wish ==> >>>> >>>> on one device, the processor in an 8-bit arm and the X-compiler is made

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Grant Edwards wrote: > On 2006-07-31, John Machin <[EMAIL PROTECTED]> wrote: > >>> but if you >>> wish ==> >>> >>> on one device, the processor in an 8-bit arm and the X-compiler is made >>> by epson >> >> 1. You still haven't *NAMED* the CPU and the compiler!! > > He obviously doesn't want to h

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Dennis Lee Bieber wrote: > On Sun, 30 Jul 2006 17:07:57 -0500, Philippe Martin > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> Paul Rubin wrote: >> >> > >> > If you prefer, You can do it all in one line: >> > >&g

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: > > Philippe Martin wrote: >> John Machin wrote: >> >> > Have you considered asking on a newsgroup where your problem might >> > actually be on-topic, like: >> > comp.lang.c >> >> Yes, I came here for the &

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: > > Philippe Martin wrote: >> Philippe Martin wrote: >> >> > Hi, >> > >> > I'm looking for an algo that would convert a list such as: >> > >> > I'm using python to prototype the algo: this will move to

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: > Have you considered asking on a newsgroup where your problem might > actually be on-topic, like: > comp.lang.c Yes, I came here for the "algorithm" question, not the code result. Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Philippe Martin wrote: > Hi, > > I'm looking for an algo that would convert a list such as: > > I'm using python to prototype the algo: this will move to C in an embedded > system where an int has 16 bits - I do not wish to use any python library. > > l1

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: > Philippe Martin wrote: > >> >> Thanks John, I do not have a long available on the device: stuck with 16 >> bits. >> > > What does "available on the device" mean? Having a "long" is a property > of a C complier, n

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Paul Rubin wrote: > Philippe Martin <[EMAIL PROTECTED]> writes: >> I'm just using Python to prototype, so I cannot use any of these great >> features of the language. > > I think when writing a prototype, you should use whatever features you > want, except m

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Dennis Lee Bieber wrote: > On Sun, 30 Jul 2006 16:39:47 -0500, Philippe Martin > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> >> My apologies, I clearly made a mistake with my calculator, yes the >> resulting array I would need is [0

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: > Philippe Martin wrote: >> John Machin wrote: >> >> > Philippe Martin wrote: >> >> Hi, >> >> >> >> I'm looking for an algo that would convert a list such as: >> > >> > Such as what?

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Paul Rubin wrote: > Philippe Martin <[EMAIL PROTECTED]> writes: >> I'm using python to prototype the algo: this will move to C in an >> embedded system where an int has 16 bits - I do not wish to use any >> python library. >> >> l1 = [1,2,3,4,6,

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
John Machin wrote: > Philippe Martin wrote: >> Hi, >> >> I'm looking for an algo that would convert a list such as: > > Such as what? > >> >> I'm using python to prototype the algo: this will move to C in an >> embedded system whe

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Philippe Martin wrote: > >> Marc 'BlackJack' Rintsch wrote: >> >>> And now please describe you problem a little better. ;-) >> >> I'll try. >> >> first

Re: BCD List to HEX List

2006-07-30 Thread Philippe Martin
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Philippe Martin wrote: > >> I'm looking for an algo that would convert a list such as: >> >> I'm using python to prototype the algo: this will move to C in an >> embedded sy

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread Philippe Martin
Grant Edwards wrote: > On 2006-07-30, Philippe Martin <[EMAIL PROTECTED]> wrote: > >> If you get rid of app.MaiLoop(), you basically get rid of all GUI events. >> You need to have you server in a separate thread. > > Isn't there any way to use wxW

BCD List to HEX List

2006-07-30 Thread Philippe Martin
Hi, I'm looking for an algo that would convert a list such as: I'm using python to prototype the algo: this will move to C in an embedded system where an int has 16 bits - I do not wish to use any python library. l1 = [1,2,3,4,6,7,8] #represents the decimal number 12345678 l2 = func (l1) # l2 =

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread Philippe Martin
Philippe Martin wrote: > zxo102 wrote: > >> Hi everyone, >> I am using a python socket server to collect data from a socket >> client and then control a image location ( wxpython) with the data, >> i.e. moving the image around in the wxpython frame. >

Re: how to make python socket server work with the app.MainLoop() in wxpython?

2006-07-30 Thread Philippe Martin
zxo102 wrote: > Hi everyone, > I am using a python socket server to collect data from a socket > client and then control a image location ( wxpython) with the data, > i.e. moving the image around in the wxpython frame. >But the "app.MainLoop()" in wxpython looks like conflicting with > th

Re: simple question

2006-07-26 Thread Philippe Martin
Maxine Weill wrote: > I need to install Python Imaging Library (PIL) - imaging-1.1.5.tar.gz > (source ) onto Suse Linux 10.1 system in order for (latest) Scribus > 1.3.3.2 to install and work. > > Plesae indicate how I perform PIL install (exact commands/procedures) in > manner where files are "

Re: About Embedding PyWin or wxPython

2006-07-25 Thread Philippe Martin
yet another story, for another day. > > Making XRC into a more fully-featured tool (more on par w/ the > aforementioned) is a way nice project unto itself, but not right now. > However, the desk accessory I've mentioned is an excellent 1st step > towards *possibly* doing somet

Re: About Embedding PyWin or wxPython

2006-07-25 Thread Philippe Martin
Mr. Roboto wrote: > > Folks: I want to embark on a project to add Python (actually, wxPython > or PythonWin) to a new Windows app I want to start writing soon. > Essentially, I want to take VB6 (or pos Delphi) and construct the app > framework/core functionality using one of those languages, the

Re: what's wrong with this if statement?

2006-07-21 Thread Philippe Martin
John Salerno wrote: > Here's the full code, but you can probably safely ignore most of it, > especially the wxPython stuff: > > --- > > import wx > > > class MyFrame(wx.Frame): > > def __init__(self): > wx.Frame.__init__(self, parent=None, id=wx.I

Re: first book about python

2006-07-08 Thread Philippe Martin
I don't know, if I were the genious that made up Python I would not believe in any bible (small b) IOANNIS MANOLOUDIS wrote: > I want to learn python. > I plan to buy a book. I always find printed material more convenient than > reading on-line tutorials. > I don't know PERL or any other scri

Re: Icono en wxpython

2006-06-29 Thread Philippe Martin
Try Sourceforge. (si j'ai bien compris) Regards, Philippe Bruno Desthuilliers wrote: > Gabriel wrote: >> Hola: >> He echo un programa en wxpython. Se trata de un programa para >> desarrollos con microcontroladores como PIC's etc. en cuanto a >> transmisión RS232 se refiere. >> >> El program

Web transaction server in Python

2006-06-28 Thread Philippe Martin
Hi, I know a bit Python as application programming, but very little as a web server. I need to get one server to accept connection requests from many devices (not all PC-Based) and then have a bi-lateral "conversation" with those devices prior to closing the connection. The said devices have at

Re: USB and Python

2006-06-25 Thread Philippe Martin
Many thanks, Philippe Philippe Martin wrote: > Hi, > > I need to talk to a USB device (PC or other) from Python - I am not > talking about mounting a file system but sharing information as you would > though a TCP-IP socket layer or an RS232 interface. > > Is there su

USB and Python

2006-06-23 Thread Philippe Martin
Hi, I need to talk to a USB device (PC or other) from Python - I am not talking about mounting a file system but sharing information as you would though a TCP-IP socket layer or an RS232 interface. Is there such "low-level" module available for Windows / Linux ? Thanks, Philippe -- http://mai

Re: Python with Eclipse

2006-06-20 Thread Philippe Martin
Dennis Benzinger wrote: > Philippe Martin wrote: >> Dennis Benzinger wrote: >> >>> Stan Cook wrote: >>>> I've been trying to use Eclipse with Python on Linux for a while and >>>> have noticed something odd. After running the code or debugging

Re: Python with Eclipse

2006-06-19 Thread Philippe Martin
Dennis Benzinger wrote: > Stan Cook wrote: >> I've been trying to use Eclipse with Python on Linux for a while and >> have noticed something odd. After running the code or debugging a few >> times, its responsiveness gets really bad. Upon checking the equivalent >> of the task manager, I find se

Re: Pycrypto

2006-06-16 Thread Philippe Martin
Hi, Look at the bin2ascii module. Philippe luca72 wrote: > > Excuse me again, > If the string is not a sting but hex number how i have to proced : > > look this page: > http://www.cs.eku.edu/faculty/styer/460/Encrypt/JS-AES.html > > Regards Luca -- http://mail.python.org/mailman/listinfo

Re: Software Needs Philosophers

2006-05-21 Thread Philippe Martin
Xah Lee wrote: > Software Needs Philosophers > > by Steve Yegge, 2006-04-15. > > Software needs philosophers. > > This thought has been nagging at me for a year now, and recently it's > been growing like a tumor. One that plenty of folks on the 'net would > love to see kill me. > > People don'

Re: creating a new database with mysqldb

2006-05-17 Thread Philippe Martin
John Salerno wrote: > Since the connect method of mysqldb requires a database name, it seems > like you can't use it without having a database already created. So is > there a way to connect to your mysql server (without a specified > database) in order to create a new database (i.e., the CREATE D

Re: Unable to extract Python source code using Windows

2006-05-17 Thread Philippe Martin
John Machin wrote: >> http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tar.bz2 > > And the reason for posting that would be what? WinZip doesn't support > bzip2 compression. > > http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz (a gzipped tar > file) is what the OP would be better point

Re: Unable to extract Python source code using Windows

2006-05-16 Thread Philippe Martin
[EMAIL PROTECTED] wrote: >>You can get Python sources from python.org > > I'm unable to locate a source file brings that will work with WinZip. > Can anybody please point me to the exact URL that will get me to the > source code? but it it is tar ball format or a gzip format, than that > will wor

Re: nix logon in Python

2006-05-12 Thread Philippe Martin
Philippe Martin wrote: > Hi, > > Are there any (even prototypes/proof of concept) gdm/kdm/xdm.../-style > packages written in Python ? > > Regards, > > Philippe I guess to further define my problem: I am looking for clues as to how to launch an X11 session (remo

nix logon in Python

2006-05-12 Thread Philippe Martin
Hi, Are there any (even prototypes/proof of concept) gdm/kdm/xdm.../-style packages written in Python ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python editor recommendation.

2006-05-11 Thread Philippe Martin
Looking at their flash demo made me want to try it, but after all dependencies installed, I get "Fatal Python error: can't initialise module gtksourceview Aborted (core dumped)" Is it stable ? Philippe mystilleef wrote: > The powerful no-nonsense, no-frills, no-hassle, no-fuzz editor, > S

Re: List Ctrl

2006-05-08 Thread Philippe Martin
[EMAIL PROTECTED] wrote: > > Hello together !! > > I have programmed a List Control and I introduced information in several > rows. What I want to do is, modify this information when i select a row > and press a button. > There two options: > - when i do this, a window appears and asks me to

Re: How can I do this with python ?

2006-05-08 Thread Philippe Martin
Xiao Jianfeng wrote: > Tim N. van der Leeuw wrote: >> Your question is insufficiently clear for me to answer. >> >> Do you want to know how to read from standard-input in a Python >> program? >> >> Do you want to know how to start an external program from Python, and >> then connect something to t

Re: cross platform libraries

2006-05-05 Thread Philippe Martin
Through Wine maybe ? Philippe Dennis Lee Bieber wrote: > On 4 May 2006 09:57:15 -0700, [EMAIL PROTECTED] declaimed the > following in comp.lang.python: > >> I am using python on a linux terminal. >> >> I want to shutdown a remote windows box. I found a script which does >> something like this

Re: Is this a legal / acceptable statement ?

2006-05-05 Thread Philippe Martin
Fredrik Lundh wrote: > Philippe Martin wrote: > >> l_init really is a boolean parameter and l_value a value that _might_ >> exist in a shelve. >> >> So I just want to have a parameter to a method so if the first value >> tested is false (l_init) then the

Re: Is this a legal / acceptable statement ?

2006-05-05 Thread Philippe Martin
bruno at modulix wrote: > Philippe Martin wrote: >> bruno at modulix wrote: >> >> >>>Philippe Martin wrote: >>>(snip) >>> >>>>l_init really is a boolean parameter and l_value a value that _might_ >>>>exist in a shelve.

Re: Active Directory Authentication

2006-05-05 Thread Philippe Martin
Benji York wrote: > D wrote: >> Is it possible to have Python authenticate with Active Directory? >> Specifically what I'd like to do is have a user enter a >> username/password, then have Python check the credentials with AD - if >> what they entered is valid, for example, it returns a 1, otherwi

Re: Is this a legal / acceptable statement ?

2006-05-05 Thread Philippe Martin
bruno at modulix wrote: > Philippe Martin wrote: > (snip) >> >> l_init really is a boolean parameter and l_value a value that _might_ >> exist in a shelve. >> >> So I just want to have a parameter to a method so if the first value >> tested is false (

Re: Is this a legal / acceptable statement ?

2006-05-05 Thread Philippe Martin
Larry Bates wrote: > Philippe Martin wrote: >> Hi, >> >> This code works, but is it "appropriate" ? >> >> l_init = False >> >> if True == l_init and 1234 = l_value: >> print 'l_value is initialized' >> >&

Re: Is this a legal / acceptable statement ?

2006-05-05 Thread Philippe Martin
I'm sorry (typo): l_init = False if True == l_init and 1234 == l_value: print 'l_value is initialized' Note that 1234 == l_value does not get evaluated. Philippe vbgunz wrote: > you don't have to say: > > if True == l_init > > it is suggested you simply say: > > if l_init: > > Reme

Is this a legal / acceptable statement ?

2006-05-05 Thread Philippe Martin
Hi, This code works, but is it "appropriate" ? l_init = False if True == l_init and 1234 = l_value: print 'l_value is initialized' I know I can do this with a try but ... Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Progamming python without a keyboard

2006-05-04 Thread Philippe Martin
That reminds me a session in an R&D lab a long time ago One of the guys kept talking to himself, commenting code, bugs . he drove me nuts Eventually (weeks later) another guy silently stood up, went to the first guy, and without a word attempted to strangle him. He got stopped ... but did no

Re: Gettings subdirectories

2006-05-04 Thread Philippe Martin
Hi, The second edition of "Programming Python - O'REILLY - Mark Lutz" shows how to do that using "os.path.walk" Philippe Florian Lindner wrote: > Hello, > how can I get all subdirectories of a given directories? os.listdir() > gives me all entries and I've found no way to tell if an object

Re: wxPython, wxcombobox opening

2006-05-02 Thread Philippe Martin
Hi, >From the wxPython list: > Hi, > > Which event must I catch to be called when the user clicks on the combo > "button" to make the drop down list to appear ? No, there isn't a specific event for the opening of the drop-down box. Regards, Philippe

Re: OOP techniques in Python

2006-05-01 Thread Philippe Martin
Thanks, Did not know that. Philippe Dennis Lee Bieber wrote: > On Thu, 27 Apr 2006 14:32:15 -0500, Philippe Martin > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> >> What then is the point of the double underscore (if any) ?: > >

Re: wxPython, wxcombobox opening

2006-04-29 Thread Philippe Martin
Hi, I do not have the answer but am very interested in the issue. I tried this: l_ev = wx.MouseEvent(wx.wxEVT_LEFT_DOWN) l_ev.SetEventObject(self.GetCombo()) self.GetEventHandler().ProcessEvent(l_ev) Which did send the event to the combo (which is in a pannel in my case) .. but that is apparentl

Re: OOP techniques in Python

2006-04-27 Thread Philippe Martin
Duncan Booth wrote: > Philippe Martin wrote: >> Steven Bethard wrote: >>> [Please don't top-post] >> >> OK I won't, is that a general rule? (I've been top posting for quite some >> time now and it is the first time I see that warning) > &g

Re: OOP techniques in Python

2006-04-27 Thread Philippe Martin
Edward Elliott wrote: > Philippe Martin wrote: > '' > > On the other hand, foo.__doc__ and foo.__name__ work fine. > > (I was going to quote your post but my reader interprets everything after > the two dashes as your sig and ignores it. And I won't

Re: OOP techniques in Python

2006-04-27 Thread Philippe Martin
Edward Elliott wrote: > Panos Laganakos wrote: >> i.e. we usually define private properties and provide public functions >> to access them, in the form of: >> get { ... } set { ... } >> >> Should we do the same in Python: >> Or there's no point in doing so? >> >> Some other techniques come to mi

Re: OOP techniques in Python

2006-04-27 Thread Philippe Martin
he implementation later if you need > > to. But python allows you to do this with properties: > [snip] > > Which should not be interpreted as saying you should start writing a > > bunch of properties now. ;) Instead, only introduce a property when > > you find that something

Re: OOP techniques in Python

2006-04-27 Thread Philippe Martin
Why is that ? to me it makes sense when I see self.__m_var that I'm dealing with a member variable taht derived classes will not see/access. Philippe Steven Bethard wrote: > Panos Laganakos wrote: >> we usually define private properties and provide public functions >> to access them, in the f

Re: print names of dictionaries

2006-04-27 Thread Philippe Martin
OK, totally dumb ! g_dict[s] = p Philippe Martin wrote: > Hi, > > I do not know if there is a way to overload the instantiation of all > objects in Python but I thought of something like this to fetch any object > with its name: > > g_dict = {} > > > def c

Re: print names of dictionaries

2006-04-27 Thread Philippe Martin
Hi, I do not know if there is a way to overload the instantiation of all objects in Python but I thought of something like this to fetch any object with its name: g_dict = {} def create_object (v,s): p = v g_dict[s] = id(p) return p #ex object = create_object ([1,2,3,4], 'A LIST') Ph

Re: MinGW and Python

2006-04-26 Thread Philippe Martin
This might relevant. http://www.aceshardware.com/read.jsp?id=153 Philippe Robert Kern wrote: > Martin v. Löwis wrote: >> Srijit Kumar Bhadra wrote: >> >>>Is there any specific reason for not using MinGW to build the official >>>distribution of Python for Win32? >> >> What could be the reaso

Re: wxpython warnings

2006-04-26 Thread Philippe Martin
Hi, This is an answer I got from the wxPython NG: """ If it is a wxLog message (I think it is) then you can temporarily disable log messages by creating an instance of wx.LogNull.  Or you can do something like set the log target to some other object than the default wx.LogGui, or set the log l

Re: Events in Python?

2006-04-26 Thread Philippe Martin
Besides the other anwsers, you might want to check the signal module. Regards, Philippe [EMAIL PROTECTED] wrote: > Here is another non-pythonic question from the Java Developer. (I beg > for forgiveness...) > > Does Python have a mechanism for events/event-driven programming? > > I'm not ne

Re: Inherit from array

2006-04-26 Thread Philippe Martin
I think he did from array import * Philippe bruno at modulix wrote: > TG wrote: >> Hi there. >> >> I'm trying to create a simple class called Vector which inherit from >> array. > > Which array ? > > [EMAIL PROTECTED] ~ $ python > Python 2.4.2 (#1, Feb 9 2006, 02:40:32) > [GCC 3.4.5 (Ge

Re: wxpython warnings

2006-04-26 Thread Philippe Martin
I had a similar but simple problem (the file was missing) and had to check by hand before calling wxPython. Can you check the tag by hand before calling wxPython ? Philippe Iain King wrote: > I have a wxpython program that displays TIF images. Sometimes it will > encounter a tag the tiff l

Re: Multiple hierarchie and method overloading

2006-04-25 Thread Philippe Martin
Thanks, I'll try that. Philippe Ben Cartwright wrote: > Philippe Martin wrote: >> I have something like this: >> >> Class A: >> def A_Func(self, p_param): >> . >> Class B: >> def A_Func(self): >>

Re: Multiple hierarchies and method overloading

2006-04-25 Thread Philippe Martin
alling A_Func(self) as it was checked against A_Func(self, p_param). Regards, Philippe Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > "Ben Cartwright" <[EMAIL PROTECTED]> wrote: > >>Philippe Martin wrote: >> >>> I

  1   2   >