Re: db access

2006-12-28 Thread Martin P. Hellwig
king kikapu wrote: > Hey Martin, > > thanks for the fast reply! > > I have already seen that link and i just downloaded the pyodbc module > but isn't Python already containing a "built-in" odbc module so to > allow for db communication ?? > Not that I&#x

Re: Why does Python never add itself to the Windows path?

2006-12-29 Thread Martin v. Löwis
, it should be optional, and it should default to "off". 3. Most importantly: it is difficult to implement, and nobody has contributed code to make it work. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: per interpreter storage for C extensions

2006-12-29 Thread Martin v. Löwis
you still holding a pointer to it, and a new interpreter may get allocated at the same address, making you believe it is the same interpreter. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: xml bug?

2006-12-29 Thread Martin v. Löwis
his, it seems hard to believe...) Which lib? "minidom.py"? Well, you are likely importing "xml.dom.minidom", not "minidom". So adding another minidom.py to a directory in sys.path won't help. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: xml bug?

2006-12-29 Thread Martin v. Löwis
ributions are welcome! Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Minor problem with configure (2.4.4)

2006-12-29 Thread Martin v. Löwis
is no AC_UNDEFINE. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: bad marshal data in site.py in fresh 2.5 install win

2006-12-29 Thread Martin v. Löwis
TiNo schrieb: > # G:\Python25\lib\encodings\aliases.pyc matches [...] > File "F:\Python25\lib\encodings\__init__.py", line 32, in > > What can I do about this? Where does F:\Python25 come from? If you have set any PYTHON* environment variables (e.g. PYTHONPATH), unset

Re: per interpreter storage for C extensions

2006-12-30 Thread Martin v. Löwis
shared across interpreters, otherwise, the hierarchical exception matching will break. The builtin exceptions are all "global" (i.e. shared across interpreters) (I believe). In any case, it looks like that the "multiple interpreters" feature of Python is just broken. Regards,

Re: find login name of user?

2006-12-30 Thread Martin P. Hellwig
Uwe Hoffmann wrote: > [EMAIL PROTECTED] schrieb: >> Is there a function/module to find the login name of the user under >> UNIX environment? > > > http://docs.python.org/lib/os-procinfo.html > > http://docs.python.org/lib/module-pwd.html Speaking of that, is there any reason why there isn't any

Re: Why does Python never add itself to the Windows path?

2007-01-03 Thread Martin v. Löwis
ter. Please submit a patch that does so, then. Make sure you add user interface to make it an option. These things are *not* easy, and claiming that they are is misleading. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does Python never add itself to the Windows path?

2007-01-03 Thread Martin v. Löwis
uot;. Please submit a patch to sf.net/projects/python that does so. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Filename encoding on XP

2007-01-03 Thread Martin v. Löwis
pass a Unicode string into walk as the directory; then recursively all results should also be Unicode strings. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: bad marshal data in site.py in fresh 2.5 install win

2007-01-03 Thread Martin v. Löwis
try removing that. If in doubt, remove all .pyc files. If one of them is bad, it's either because the stick wasn't ejected properly at some point, or it suffers from data loss. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: type classobj not defined?

2007-01-03 Thread Martin v. Löwis
named "bar"). That you can also use it for a type test is a side-effect. Some more types are available in the types module. In this case, you can use types. In this case, types.ClassType would do the trick. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does Python never add itself to the Windows path?

2007-01-03 Thread Martin v. Löwis
not only want the directory that contains Python added to the path, but also /scripts. That's again a new requirement, and I think it is the first time that somebody requests it. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: When argparse will be in the python standard installation

2007-01-03 Thread Martin v. Löwis
already have getopt and optparse). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does Python never add itself to the Windows path?

2007-01-03 Thread Martin v. Löwis
t all. I don't even use Windows enough to > complain about it and I thought I'll voice my agreement on it. Ok. So I can answer your (implied) question: much of the fuss is about lack of contributions. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot build 2.5 on FC6 x86

2007-01-03 Thread Martin v. Löwis
hat precisely was the line, and how long did you wait until you thought it hangs? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: When argparse will be in the python standard installation

2007-01-04 Thread Martin v. Löwis
hanges, so that optparse users can review them to find out whether they are affected. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: minidom utf-8 encoding

2007-01-04 Thread Martin v. Löwis
; d = minidom.Document() py> r = d.createElement("root") py> r.appendChild(d.createTextNode(u"\xf6")) py> d.appendChild(r) py> d.toxml() u'\n\xf6' py> print d.toxml() ö Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot build 2.5 on FC6 x86

2007-01-04 Thread Martin v. Löwis
Paul Watson schrieb: > Martin v. Löwis wrote: >> Paul Watson schrieb: >>> ./configure >>> make >>> make test >>> >>> The result appears to hang after the test_tkl... line. I had to kill >>> the 'make test' process which t

Re: minidom utf-8 encoding

2007-01-04 Thread Martin v. Löwis
ml gives to a byte string. So I recommend you pass encoding="utf-8" to the toprettyxml invocation also. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Using External Libraries with python?

2007-01-04 Thread Martin v. Löwis
s a DLL/shared-object with an init function. Other solutions include tools that generate extension modules automatically (such as SWIG or Pyrex), or using libraries on top of the C API (such as Boost.Python). I personally always use the C API directly. Regards, Martin -- http://mail.python.org/ma

Re: Best way to implement a timed queue?

2007-01-04 Thread Martin v. Löwis
lf.older + 1 if now < next: time.sleep(next-now) # really fetch one item; this may block result = threading.Queue.get(self) self.older = self.old # set the last get time to the time when the get completed, # not when it started self.old = time.time()

Re: minidom utf-8 encoding

2007-01-04 Thread Martin v. Löwis
will be ill-formed. What you should do instead is ... encoding_of_csv_file = some_value_that_the_producer_of_the_file_told_you ... ... mainbox.setAttribute("city", b[10].decode(encoding_of_csv_file)) Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: When argparse will be in the python standard installation

2007-01-05 Thread Martin v. Löwis
. > I guess I don't know how to proceed from here. I'm reluctant to start > adding the code necessary to support even the easily solved issues when > the issues that I don't know how to solve seem like they could be deal > breakers. This asks for a PEP. The views above are mine only, others may feel differently. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: PyType_IsSubtype ()

2007-01-05 Thread Martin v. Löwis
, one would run the program in a debugger to analyse it further. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: checking one's type

2007-01-05 Thread Martin v. Löwis
;t need to compare for equality: if type(s) is str - you can do instance tests with isinstance: if isinstance(s, str): - try avoiding instance tests altogether. Instead, just let callers pass anything, and then let the operations fail if they can't handle the types. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a directory to the Python System Path - Edit the registry?

2007-01-05 Thread Martin P. Hellwig
[EMAIL PROTECTED] wrote: > I have been trying to find a way to add a directory to Python's sytem > path on my MS Windows XP computer. I did some searching online, but the > only solution I found involved editing the MS Windows Registry. That > seemed a little to hard core. Is there another easier w

Re: PyType_IsSubtype ()

2007-01-05 Thread Martin v. Löwis
or tail of this? Not yet, although it hints to a bug in Numeric. It now would help if _numpy.so was compiled with debug information enabled. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: File Closing Problem in 2.3 and 2.4, Not in 2.5

2007-01-05 Thread Martin v. Löwis
l's process explorer. Make the program halt (not exit) when the exception occurs (e.g. by having it sleep(1) in a loop), then view all open handles in the process explorer (check the menu if it doesn't display them initially). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie XML SAX Parsing: How do I ignore an invalid token?

2007-01-06 Thread Martin v. Löwis
not something parsing can recover from. I recommend that you filter this character out before passing it to the XML parser. You can use the IncrementalParser interface to do so. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie XML SAX Parsing: How do I ignore an invalid token?

2007-01-07 Thread Martin v. Löwis
ding. To filter out these bytes, I recommend to use str.translate. Make an identity table for the substitution, and put the bytes you want deleted into the delete table. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: OpenBSD, Apache and Python

2007-01-07 Thread Martin v. Löwis
hould I be worried about the stability and security of the python fcgi > interfaces? Is there something better (more mature / battle tested)? Certainly: CGI. Performance does not seem to be an issue, so CGI should work just fine. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: (newbie) Is there a way to prevent "name redundancy" in OOP ?

2007-01-07 Thread Martin v. Löwis
stry() class pin: def __init__(self, name): self.name = name print registry.aap HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Recommendations (or best practices) to define functions (or methods)

2007-01-07 Thread Martin v. Löwis
should correct it. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Module to read svg

2007-01-07 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > Does anyone know if there's an actual free implementation of this? For the dom module in it, xml.dom.minidom should work. Depending on your processing needs, that might be sufficient. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Recommendations (or best practices) to define functions (or methods)

2007-01-08 Thread Martin v. Löwis
uest and return an error to the client". Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Module to read svg

2007-01-08 Thread Martin v. Löwis
erit from SVGLocatableElement needs to inherit from SVGElement needs to inherit from Element. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils and ctypes

2007-01-09 Thread Martin v. Löwis
y (not a python extension!). Under linux, the following > works, under windows xp id doesn't (which I guess is obvious, but the > linux success lead me on). Not sure it's stupid, but I wonder why you want to use ctypes. What's wrong with extension modules? Regards, Martin --

Re: distutils and ctypes

2007-01-09 Thread Martin v. Löwis
he chance for a well-engineered solution, write a compiled wrapper. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python - C# interoperability

2007-01-09 Thread Martin v. Löwis
t kind of thing. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: What does the -O flag do?

2007-01-09 Thread Martin v. Löwis
s in source code - treats __debug__ statically as being 0 - causes the byte code generator to save .pyo files, not .pyc HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Some thoughts on garbage collection

2006-01-23 Thread Martin v. Löwis
sion of Python. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: os.unlink() AND win32api.DeleteFile()

2006-01-23 Thread Martin v. Löwis
rbt wrote: > Can someone detail the differences between these two? On Windows which > is preferred? They do the same thing: unlink calls DeleteFile. The only difference is how errors are reported. For portability, os.unlink is preferred. Regards, Martin -- http://mail.python.org/m

Re: We have zipimport, how about dllimport?

2006-01-28 Thread Martin v. Löwis
orm. So on the plus side, this allows for sharing of code across multiple instances of the same application. On the minus side, each Smalltalk application needs its own image (even if they share a lot of code). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python loading library containing embedded python...

2006-01-29 Thread Martin v. Löwis
ther reference nor expose any Python symbols. Given the different linkers on different systems, this is very tricky to implement. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Authenticating to Kerberos

2006-01-29 Thread Martin v. Löwis
David wrote: > I don't need to do anything except authenticate and gain the correct > credentials. I normally run kinit(1) to determine whether a password is correct. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python loading library containing embedded python...

2006-01-29 Thread Martin v. Löwis
scvrt has its own heap, and releasing memory to the wrong heap might cause memory leaks. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python loading library containing embedded python...

2006-01-29 Thread Martin v. Löwis
e often. For plugins, there is a real problem on Unix, with several strategies to solve it available. Avoiding naming conflicts in the first place is the only one that really works, independently of the plugin host. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python loading library containing embedded python...

2006-01-29 Thread Martin v. Löwis
27;t really build COM-based extensions with cygwin, so if the official compiler would be cygwin, somebody would have to find out how to build PythonWin (in addition, PythonWin also has a strong dependency on MSVCRT). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling

2006-02-05 Thread Martin v. Löwis
change between the time of definition and the actual call. Therefore, the simple function call must go through a table lookup. So while it would be possible to apply the same strategy to Python, it likely wouldn't gain any performance increase over the interpreter. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling

2006-02-06 Thread Martin v. Löwis
fine to call into Python in most cases, no? If not, have you tried the CXX package, or Boost::Python? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.path and unicode folder names

2006-02-07 Thread Martin v. Löwis
full Unicode), using the "mbcs" encoding should work fine. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4.2 using msvcrt71.dll on Win and compatibility issues

2006-02-07 Thread Martin v. Löwis
That might also be tricky to implement, but could work. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4.2 using msvcrt71.dll on Win and compatibility issues

2006-02-07 Thread Martin v. Löwis
happens, but one would have to verify the code to be certain. The other option is to use GetProcAddress to obtain the address of fdopen. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with curses and UTF-8

2006-02-07 Thread Martin v. Löwis
bug ncurses to find out what precisely happens, and why. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.path and unicode folder names

2006-02-08 Thread Martin v. Löwis
Nir Aides wrote: > I can not restrict the name to CP_ACP. > I am interested in the general case of Unicode. So you should implement a patch, and contribute this to sf.net/projects/python. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4.2 using msvcrt71.dll on Win and compatibility issues

2006-02-08 Thread Martin v. Löwis
nyway, I just proposed to have Python 2.5 link against msvcrt.dll on python-dev, and got mixed responses. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with curses and UTF-8

2006-02-08 Thread Martin v. Löwis
Thomas Dickey wrote: > no need for debugging - it's a well-known problem. UTF-8 uses more than > one byte per cell, normal curses uses one byte per cell. To handle UTF-8, > you need ncursesw. I tried that, but it didn't improve anything. Regards, Martin -- http://mail

Re: Problem with curses and UTF-8

2006-02-08 Thread Martin v. Löwis
f > (wchar_t), 77 If that was Python's configure: don't do that. Instead, hack setup.py to make it change the compiler/linker settings, or even edit the compiler/linker line manually at first. Regards. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.path and unicode folder names

2006-02-08 Thread Martin v. Löwis
le names not in their respective CP_ACP (why do you need such filenames?), and virtually nobody wants to put such a file name on Python's sys.path (why do you want to? - just rename the directory and be done). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Hi reliability files, writing,reading,maintaining

2006-02-09 Thread Martin P. Hellwig
John Pote wrote: > So my request: > 1. Are there any python modules 'out there' that might help in securely > writing such files. > 2. Can anyone suggest a book or two on this kind of file management. (These > kind of problems must have been solved in the financial world many times). > I can't a

Re: by reference

2006-02-09 Thread Martin P. Hellwig
Rene Pijlman wrote: > dirvine: >> I would like to create a dictionary based on a variable [...] > > And what seems to be the problem? > I think that this is his problem: >>> 'somename'={} SyntaxError: can't assign to literal But I'm puzzled why he wants that route, while I'm still pretty new t

Re: sys.path and unicode folder names

2006-02-09 Thread Martin v. Löwis
a patch. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: cursesw+setlocale fixes it!

2006-02-09 Thread Martin v. Löwis
support all possible situations (e.g. curses is ncurses, and ncursesw is available, curses is ncurses, and ncursesw is not available, curses is not ncurses), and submit that patch to sf.net/projects/python. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Shortest prime number program

2006-02-11 Thread Martin v. Löwis
You can save two bytes with r=range(2,99) [x for x in r if sum(x%d==0 for d in r)<2] -- http://mail.python.org/mailman/listinfo/python-list

Re: Netstat in python. Does it's possible?

2006-02-11 Thread Martin v. Löwis
th "[socket:", it's a socket. Then search /proc/net/tcp for the ID. The line containing the ID will have the information you want. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Netstat in python. Does it's possible?

2006-02-11 Thread Martin v. Löwis
l system calls involved (or for library routines that use the system calls the right way). In case of /proc, this is easy; if it is a ioctl(2), it might still be doable. If it is something else, you may have to write a Python wrapper for that other system call first. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Single-file executables

2006-02-11 Thread Martin v. Löwis
ol, and truly single-binary executables, I recommend to use freeze itself. It takes a bit more work, but also gives better results. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

PEP 353: Using ssize_t as the index type

2006-02-12 Thread Martin v. Löwis
I've been working on PEP 353 for some time now. Please comment, in particular if you are using 64-bit systems. Regards, Martin PEP: 353 Title: Using ssize_t as the index type Version: $Revision: 42333 $ Last-Modified: $Date: 2006-02-12 10:36:52 +0100 (So, 12 Feb 2006) $ Author: Martin v.

Re: Single-file executables

2006-02-12 Thread Martin v. Löwis
Windows, I guess the answer is no (or: everybody doing that has managed to deal with the build process themselves). I would probably go for a mingw static build if I had to attempt this. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Netstat in python. Does it's possible?

2006-02-12 Thread Martin v. Löwis
ems I'm aware of, there is a certain committment to keeping the proc file system stable for applications (on Solaris more so than on Linux). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 353: Using ssize_t as the index type

2006-02-12 Thread Martin v. Löwis
Tony Nelson wrote: > Minor typo: "too" Thanks, fixed. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: by reference

2006-02-13 Thread Martin P. Hellwig
dirvine wrote: > Yes I did > > I was trying to do something like (pseudo code) > > write: > get files in path > for each filename get size, type > create dic called filename assign size:xx,type:y > pickle to file > > read: > open pickled file > read dict name and contents (hoping unpickling file

Re: Encoding

2006-02-13 Thread Martin v. Löwis
need to recode your data. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Location of Python modules

2006-02-13 Thread Martin v. Löwis
pth ORBit.la pygtk.pyo setuptools.pth cairoFormEncode-0.4-py2.4.egg ORBit.so pygtk.py.python2.4-gtk2 cairo.pthgtk-2.0 pygtk.pthpython-support.pth You mean, on *your* Linux? Give me an SSH account to your machine, and I find out for you. Regards, Mar

Re: hard disk activity

2006-02-13 Thread Martin P. Hellwig
Paul Rubin wrote: > "VSmirk" <[EMAIL PROTECTED]> writes: >> I am needing to synchronize the file on a remote folder, and my current >> solution, which simply copies the file if a date comparison or a >> content comparison, becomes a bit unmanageable for very large files. >> Some of the files I'm wo

Re: how do you pronounce 'tuple'?

2006-02-14 Thread Martin P. Hellwig
Roy Smith wrote: > Erik Max Francis <[EMAIL PROTECTED]> wrote: >> (A 2-tuple is an "ordered pair" in mathematics.) If a 2-tuple is a >> pair, then it would seem to follow that a 1-tuple is a single. > > Yeah, but an *ordered* single :-) > > A more interesting question is what do you call ()? A

Re: file names longer than MAX_PATH under Windows 2003

2006-02-15 Thread Martin v. Löwis
Sergey wrote: > (but now I must have two pieces of code, one for linux and one for windows) > Interesting, why developers of python didn't use here all power of win32 API? It will in Python 2.5. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about xmlrpc and threading

2006-02-15 Thread Martin P. Hellwig
David Hirschfield wrote: > An xmlrpc client/server app I'm writing used to be super-simple, but now > threading has gotten into the mix. > > On the server side, threads are used to process requests from a queue as > they come in. > On the client side, threads are used to wait on the results of r

Re: Question about xmlrpc and threading

2006-02-17 Thread Martin P. Hellwig
David Hirschfield wrote: > My question was whether this is allowed? Can two calls be made via the > same ServerProxy instance while a request is already underway? > > Clearer? > -Dave > Much, and my preliminary answer is, I have no clue :-) But knowing that python will throw an exceptions whe

Re: Open Relay Test

2006-02-17 Thread Martin P. Hellwig
D wrote: > Nope, quite the contrary..I'm looking to write a simple program for a > client of mine that will, among other things, verify that their > clients' email servers do not have open relays. > I usually test it like this: [EMAIL PROTECTED]:~> telnet mail.huygenslyceum.nl smtp Trying 172.16.

Re: Simple question about freeze

2006-02-17 Thread Martin v. Löwis
m-built libpython.a, will that cause problems? My sense is that it > will not, but I want to make sure I think things through. Any thoughts? I don't see a problem with that. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic coin flipper program - logical error help

2006-02-21 Thread Martin P. Hellwig
DannyB wrote: > I'm just learning Python. So am I :-) > I've created a simple coin flipper program - > here is the code: > > [source] > #Coin flipper > import random > > heads = 0 > tails = 0 > counter = 0 > > coin = random.randrange(2) > > while (counter < 100): > if (coin ==

Re: xml.parsers.expat and utf-8

2005-05-03 Thread &quot;Martin v. Löwis"
[EMAIL PROTECTED] wrote: > I think I've tried all variations possible but I always get errors. > Anyone know what I'm doing wrong? You are passing Unicode strings to Parse. Try byte strings instead. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Pydev Refactoring Feature in Eclipse

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

Re: OOP

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

Re: tkinter and threads

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

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

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

SC-Corporate-ID released

2005-05-06 Thread Philippe C. Martin
-ID intends to be a true low cost security solution for Corporations. SC-Corporate-ID will soon be followed by a School/University ID as well as an Health Card ID. You may find information on SC-Corporate-ID at www.snakecard.com. Best regards, Philippe Martin -- http://mail.python.org/mailman

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

Re: Q: The `print' statement over Unicode

2005-05-07 Thread &quot;Martin v. Löwis"
coding will not be set. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

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: Q: The `print' statement over Unicode

2005-05-07 Thread &quot;Martin v. Löwis"
d make it, as is, somewhere > in the documentation But how will that happen? Unless somebody contributes a documentation patch, the documentation will not change magically! Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption with Python?

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

Re: Trouble saving unicode text to file

2005-05-08 Thread &quot;Martin v. Löwis"
of this, write import codecs fil = codecs.open("testfil.txt", "w", "cp1252") fil.write(titel) fil.close() Instead of cp1252, consider using ISO-8859-1. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble saving unicode text to file

2005-05-08 Thread &quot;Martin v. Löwis"
John Machin wrote: > Martin, I can't guess the reason for this last suggestion; why should > a Windows system use iso-8859-1 instead of cp1252? Windows users often think that windows-1252 is the same thing as iso-8859-1, and then exchange data in windows-1252, but declare them as iso

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