Re: Q: The `print' statement over Unicode

2005-05-08 Thread "Martin v. Löwis"
specific case) that the documentation is imprecise/incomplete. More precisely, he is correct that *his* contribution is not welcome, contrary to my broad statement "contributions are welcome". The more narrower statement "contributions that follow the guidelines are welcome&q

Re: Calling a python function from C++

2005-05-08 Thread "Martin v. Löwis"
odes. See the "Embedding and Extending" tutorial. In short, you write resultObj = PyObject_CallMethod(selfObj, "doMath", ""); if (resultObj == NULL) return NULL; Py_DECREF(resultObj); // resultObj should be Py_None How you get hold of self depends on your appli

Re: Trouble saving unicode text to file

2005-05-09 Thread "Martin v. Löwis"
used without that thought, causing moji-bake later. If representation of the euro sign is an issue, the choices are iso-8859-15, cp1252, and UTF-8. Of those three, I would pick cp1252 last if at all possible, because it is specific to a vendor (i.e. non-standard) Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Question: Threading and embedding python in an application

2005-05-09 Thread "Martin v. Löwis"
s this expected? No. Most likely, the code in the thread raises an exception that is never caught. Can you see stderr of the application? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble saving unicode text to file

2005-05-10 Thread "Martin v. Löwis"
em, but it also has the endianness problem. So for exchanging Unicode between systems, I can see no reason to use anything but UTF-8 (unless, of course, one end, or the protocol, already dictates a different encoding). Regards, Martin -- 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 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

Re: Extracting pickle from Python

2005-05-16 Thread &quot;Martin v. Löwis"
Philippe C. Martin wrote: > How would one go about extracting the pickle module from Python (ex: to make > a .a or a .dll) ? Pickle relies heavily on Python, so you most likely have to take the rest of Python as well when trying to integrate pickle elsewhere? Are you looking for pic

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: Windows distribution suggestions?

2005-05-17 Thread &quot;Martin v. Löwis"
that have changed on the target machine, through a patch MSI. The tricky part is to find a good authoring tool for .msi. I would personally use my own Python library, but that requires to dig into the MSI details. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: reference counting and file objects

2005-05-17 Thread &quot;Martin v. Löwis"
on terminates through an exception, the file stays open as long as the traceback is available, which exists until the next exception is raised (and thus replaces this traceback). If the function terminates normally (i.e. through return), it is as you say. Regards, Martin -- http://mail.python.org

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: SSL (HTTPS) with 2.4

2005-05-17 Thread &quot;Martin v. Löwis"
ython 2.4 comes with SSL included (IIRC, you didn't need these libraries in Python 2.2, either). Just use httplib.HTTPS or httplib.HTTPSConnection instead. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

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
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/A&D/UM

Re: SSL (HTTPS) with 2.4

2005-05-18 Thread &quot;Martin v. Löwis"
Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: iso_8859_1 mystery/tkinter

2005-05-18 Thread &quot;Martin v. Löwis"
s it as a little circle)? Or do you use the numeric code? Can you show a small program that demonstrates this effect? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: NaN support etc.

2005-05-18 Thread &quot;Martin v. Löwis"
ding documentation because there is none) > Is there an 'official' handle for obtaining this information? No. > Similar: How do I get the maximum/minimum double for current machine? By experimentation, and/or reading vendor documentation. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python24.zip

2005-05-20 Thread &quot;Martin v. Löwis"
This can only work if python24.zip is already on the path (and I believe it will always be sought in the directory where python24.dll lives). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: circular imports

2005-05-20 Thread &quot;Martin v. Löwis"
right way" chokes. One reason is that there could be duplicate module names, e.g. overlaps with the standard library. When you fully-qualified the modules, you actually changed the program, which would now import the user-provided modules instead of the predefined ones. Regards, Martin

Re: circular imports

2005-05-20 Thread &quot;Martin v. Löwis"
] from aaa import z2 # z2.py if __name__ != '__main__': import sys, aaa aaa.z2 = sys.modules['aaa.z2'] from aaa import z1 HTH, Martin P.S. Notice that running a module as __main__ *and* importing it circularly is also a problem (and is already in the non-package

Re: processing a large utf-8 file

2005-05-20 Thread &quot;Martin v. Löwis"
Ivan Voras wrote: > Since the .encoding attribute of file objects are read-only, what is the > proper way to process large utf-8 text files? You should use codecs.open, or codecs.getreader to get a StreamReader for UTF-8. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python24.zip

2005-05-21 Thread &quot;Martin v. Löwis"
allation, I only get 154 open calls, and 63 stat calls on an empty Python file. So somebody must have messed with sys.path really badly if you saw thoughsands of file operations (although I wonder what operating system you use so that failing open operations are costly; most operating systems should

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 Mich

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: python24.zip

2005-05-22 Thread &quot;Martin v. Löwis"
ch startup time was saved when sys.path was explicitly stripped to only contain these two zip files? I would expect that importing 2500 modules takes *way* more time than doing 10.000 failed opens. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: install python 2.4.1

2005-05-22 Thread &quot;Martin v. Löwis"
on. Installing 2.4.1 should not cause problems. 2.4.x is designed to be compatible with 2.4, so all applications should continue to run. The only exception would be an application that relies on the presence of a bug that was fixed. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: minidom and DTD

2005-05-23 Thread &quot;Martin v. Löwis"
Laszlo Zsolt Nagy wrote: > How can I put the > > > > thing into an XML created by xml.dom.minidom? You should put a DocumentType node into your DocumentNode, and pass a qualifiedName of "collection" and a systemId of "recipes.dtd" to the createDocumentT

Re: python24.zip

2005-05-23 Thread &quot;Martin v. Löwis"
have to be directory or file names at all, and importing from them may still succeed if though stat fails. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: No encodings after freezing

2005-05-23 Thread &quot;Martin v. Löwis"
codings you want to freeze. Most likely, there is some explicit command line argument, but alternatively, you could also put if 0: import encodings.utf_8 import encodings.iso8859_1 # etc into some source file. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python24.zip

2005-05-23 Thread &quot;Martin v. Löwis"
aviour rather results from the different type of modules: each path item may carry .py, .pyc, .so, module.so, etc. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

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

Re: python24.zip

2005-05-24 Thread &quot;Martin v. Löwis"
think (but see the code yourself) that only the successful importers are cached. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: reference counting and file objects

2005-05-24 Thread &quot;Martin v. Löwis"
whether through a return or through an exception). In addition, the object is released as soon as readlines returns. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python24.zip

2005-05-24 Thread &quot;Martin v. Löwis"
interned strings, gives more speedup (and indeed, 2.4 changed the marshal format to accommodate shared interned strings). So I would agree that IO makes a significant part of startup, but I doubt it is directory reading (unless perhaps you have an absent NFS server or some such). Regards, Marti

Re: reference counting and file objects

2005-05-24 Thread &quot;Martin v. Löwis"
ine 1, in len2 Exception >>> raise "" released Traceback (most recent call last): File "", line 1, in ? However, this analysis also shows that it is quite delicate to rely on this pattern. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

SCF Bundle released

2005-05-26 Thread Philippe C. Martin
develop our own Smart Cards solutions. You may find information on SCFB by following the links: www.snakecard.com/html_bundle www.snakecard.com/scfb.pdf Best regards, Philippe Martin -- http://mail.python.org/mailman/listinfo/python-list

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
Toplevel(bg="yellow") a=GetVariant(self.mainframe) d = OneButton() d.root.mainloop() VK wrote: > Philippe C. Martin wrote: >> Sorry, >> >> I still had your code in my clipboard :-) here goes: > > So, your code works, but I need, that first window

Re: UTF16 codec doesn't round-trip?

2005-05-28 Thread &quot;Martin v. Löwis"
to > have raw surrogate escape sequences (paired or otherwise) in unicode > literals? Python accepts such literals. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

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: write html-headers (utf-8)

2005-05-30 Thread &quot;Martin v. Löwis"
hen finds invalid byte sequences (your latin-9 characters), and then knows that the page *can't* be UTF-8. It then guesses that the page must be latin-something. That guess is wrong, of course, also, because some characters in the page are utf-8, and others latin-9. This is invalid HTML.

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:

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
Python than C/C++ just as I know my product (I will not describe 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 Phili

Re: What is different with Python ?

2005-06-11 Thread Philippe C. Martin
I can mention here, that > from my experience, Python seems not to be > the language of choice for the very beginners, > who prefere another approaches which are > mostly variants of Basic. > > Claudio > > "Philippe C. Martin" <[EMAIL PROTECTED]> schrieb im

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

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 don't do this... -- http://mail.python.org

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: non standard path characters

2007-05-31 Thread Martin v. Löwis
ys expect encoding errors; if they occur, chose to either skip the file name, or report an error to the user. Notice that listdir may return a byte string if decoding fails (this may only happen on Unix). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5.1 broken os.stat module

2007-05-31 Thread Martin v. Löwis
ucable, it is a bug. Please create a zip file containing this file, and submit a bug report to sf.net/projects/python. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread-safety of dict

2007-06-01 Thread Martin v. Löwis
That could be fixed by adding a generation counter to the dictionary, right? Then an adversary would have to arrange for the generation counter to roll over for lookdict to not notice that the dictionary was modified. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5.1 broken os.stat module

2007-06-02 Thread Martin v. Löwis
%H:%M:%S', > time.localtime(file_stats[stat.ST_ATIME])) > print 'Last Write Time: %s' % time.strftime('%m/%d/%Y %H:%M:%S', > time.localtime(file_stats[stat.ST_MTIME])) It's not clear whether it's an error, however, localtime() does something different from what dir does. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5.1 broken os.stat module

2007-06-02 Thread Martin v. Löwis
ause what Windows reports is > what is expected. If Python reports something different (even if it was > correct) the information is not useful if it differs from what everything > else is reporting. For the cases where there is a 1h difference, Python reports *exactly* what Windows reports. Python 2.4 didn't. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5.1 broken os.stat module

2007-06-02 Thread Martin v. Löwis
, and access the file again - if the file hasn't been accessed for more than one hour, the first access will always update the time stamp right away). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5.1 broken os.stat module

2007-06-03 Thread Martin v. Löwis
fficult > to write code that depends on those values being in sync. No. Just write a windows_localtime function, and be done. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5.1 broken os.stat module

2007-06-03 Thread Martin v. Löwis
now fixed with NTFS. > You mixed up my tests, in that case as shown above the timezone did *not* > change, the only thing that changed was that DST started and the file was > created during a time when DST was not in effect. Right, so the timezone did change. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5.1 broken os.stat module

2007-06-04 Thread Martin v. Löwis
use localtime(), but windows_localtime(). Both consider the current timezone, but in a different way. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting mount stats for filesystems

2007-06-05 Thread Martin v. Löwis
remotely (say, from machine C)? How do you answer that question with mount(8)? Also, what is a tcp filesystem? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting mount stats for filesystems

2007-06-05 Thread Martin v. Löwis
> I am on machine A, which has a NFS mounted filesystem hosted on machine > B. All I need to find out is whether the NFS filesystem is mounted > using tcp or udp. Ah, ok. I recommend to parse /proc/mounts. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting mount stats for filesystems

2007-06-05 Thread Martin v. Löwis
Mitko Haralanov schrieb: > On Tue, 05 Jun 2007 20:14:01 +0200 > "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >> Ah, ok. I recommend to parse /proc/mounts. > > I was looking for something that reminded me less of Perl and more of C > but haven't be

Re: Getting mount stats for filesystems

2007-06-05 Thread Martin v. Löwis
ained from setmntent (likely asking for read-only access). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

<    21   22   23   24   25   26   27   28   29   30   >