Re: display VARCHAR(mysql) and special chars in html

2005-02-23 Thread Wolfram Kraus
Jonas Meurer wrote: hello, my script selects a comment saved as VARCHAR in MySQL and displays it inside an html page. the problem is, that the comment contains several special characters, as mysterious utf-8 hyphens, german umlauts, etc. i could write a function to parse the comment and substitute

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-23 Thread Paul Boddie
Serge Orlov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Paul Boddie wrote: Anyone who has needed to expose filesystems created by Linux distributions before the UTF-8 big push to later distributions can attest to the fact that the see no evil brass monkey is wearing a

Re: a wrapper to invoke functions using argument

2005-02-23 Thread Joe Francia
[EMAIL PROTECTED] wrote: Hi, support I have a library of function, called mylib.py, in which there are 2 functions 'f1' and 'f2' (1 arguments in either one); Now I want to write a wrapper that will invoke f1 or f2 using the command line argument. So for example, I want to write a function call.py

Re: which parser to use

2005-02-23 Thread Paul McGuire
[EMAIL PROTECTED] wrote: I'm building something that requires parsing a rather complex language. I'd like to do the whole application, including the lex/parse phase, in Python (for development/debug speed), and only move parts of it to a compiled language if execution speed absolutely

Re: exercise: partition a list by equivalence

2005-02-23 Thread Xah Lee
I started to collect i believe the 4 or so solutions by different people... but seems it's gonna take some an hour or more... So far the only other one i've run and find alright is Reinhold Birkenfeld's original. Others worth noting i'm aware of is David Epsteinn, improved versions from Reinhold

Re: Dealing with config files what's the options

2005-02-23 Thread Fuzzyman
Hello Tom, Tom Willis wrote: How are the expert pythoneers dealing with config files? Is there anything similair to .net's config files or java's .properties? I'm not familiar with those config file formats - but ConfigObj certainly makes handling config files easy. It uses the ini type

Re: Mixing Txinter and Pygame

2005-02-23 Thread Eric Brunel
On Wed, 23 Feb 2005 10:23:09 +1300, Tim Knauf [EMAIL PROTECTED] wrote: [snip] (When I'm starting on a language feature, though, I usually find I learn a lot more from worked examples than from straight command information. You may be interested in Tkinter best kept secret: the example scripts in

Re: display VARCHAR(mysql) and special chars in html

2005-02-23 Thread Radovan Garabik
Wolfram Kraus [EMAIL PROTECTED] wrote: Jonas Meurer wrote: hello, my script selects a comment saved as VARCHAR in MySQL and displays it inside an html page. the problem is, that the comment contains several special characters, as mysterious utf-8 hyphens, german umlauts, etc. i could

Re: Style guide for subclassing built-in types?

2005-02-23 Thread Fuzzyman
I guess print is using the __repr__ (or __str__ ?) methods of lsit - which you will need to override as well. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: user interface for python

2005-02-23 Thread Fuzzyman
wax is a nice layer on top of wx - it maintains cross-platform-ability and is easier to learn ! See http://zephyrfalcon.org Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating Button arrays with different commands using Tkinter

2005-02-23 Thread Harlin Seritt
Thanks Frederik. I knew it was not binding the way I intended to, but just had no idea why or how to make it do so... thanks for the quick lambda lesson :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: user interface for python

2005-02-23 Thread Harlin Seritt
Tkinter! Ease* Well-documented? Easy to Learn? Functionality * Can I get it to do what I need it to do? Looks *** Does it look good? Well, beauty is after all in the eye of the beholder. Anything I can get to work on either platform with minimum

Re: Style guide for subclassing built-in types?

2005-02-23 Thread janeaustine50
Fuzzyman wrote: I guess print is using the __repr__ (or __str__ ?) methods of lsit - which you will need to override as well. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml Thank you but the problem is that I have to express my intention in duplicate places -- __iter__(along

Working FTP server based on Twisted framework.

2005-02-23 Thread Mateusz Sotysek
Hi call, Does anybody know, if there is any opensource, working FTP server implementation based on Twisted framework? Greetings -- http://mail.python.org/mailman/listinfo/python-list

Re: display VARCHAR(mysql) and special chars in html

2005-02-23 Thread deelan
Jonas Meurer wrote: (...) i've changed my plans, and now will transform the comments to html before saving them in mysql. this way, the comment never contains special chars except they weren't filtered out when safed in mysql. do any filters exist, to transform plain text to html? otherwise i

assert 0, foo vs. assert(0, foo)

2005-02-23 Thread Thomas Guettler
Hi, Python 2.3.3 (#1, Feb 5 2005, 16:22:10) [GCC 3.3.3 (SuSE Linux)] on linux2 assert 0, foo Traceback (most recent call last): File stdin, line 1, in ? AssertionError: foo assert(0, foo) If you use parenthesis for the assert statement, it never raises an exception. Up to now I raised

Re: how can I make this script shorter?

2005-02-23 Thread Lowell Kirsh
Good idea about hashing part of the file before comparing entire files. It will make the script longer but the speed increase will most likely make it worth it. Lowell Christos TZOTZIOY Georgiou wrote: On Tue, 22 Feb 2005 00:34:39 -0800, rumours say that Lowell Kirsh [EMAIL PROTECTED] might

Re: how can I make this script shorter?

2005-02-23 Thread Lowell Kirsh
Thanks for the advice. There are definitely some performance issues I hadn't thought of before. I guess it's time to go lengthen, not shorten, the script. Lowell John Machin wrote: Lowell Kirsh wrote: I have a script which I use to find all duplicates of files within a given directory and all

Re: Problem with minidom and special chars in HTML

2005-02-23 Thread Horst Gutmann
Jarek Zgoda wrote: Horst Gutmann napisa(a): I currently have quite a big problem with minidom and special chars (for example uuml;) in HTML. Let's say I have following input file: -- ?xml version=1.0? !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN

Re: assert 0, foo vs. assert(0, foo)

2005-02-23 Thread Daniel Fackrell
Thomas Guettler [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Python 2.3.3 (#1, Feb 5 2005, 16:22:10) [GCC 3.3.3 (SuSE Linux)] on linux2 assert 0, foo Assert that 0 is true. If that fails, raise AssertionError(foo). Traceback (most recent call last): File stdin, line

Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread DE
Hello, Some long time ago, I used to use Tcl/Tk. I had an tcl embedded into my app. The coolest thing was however, I was able to attach to the interpreter (built in to my app) via a tcl shell in which I could type in regular tcl code which would be interpreted by the interpreter of my

Re: Style guide for subclassing built-in types?

2005-02-23 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: p.s. the reason I'm not sticking to reversed or even reverse : suppose the size of the list is huge. Reversed is an iterator - it does NOT copy the list. In other words, reversed already does pretty much what you want. Cheers, Nick. -- Nick Coghlan | [EMAIL

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread Peter Maas
Fredrik Lundh schrieb: +00: googled for the mingw home page +00: found the mingw download page +02: finally figured out what to download +03: noticed that my usual SF site only offered 1K/s; aborted download +07: finished downloading the mingw kit from another SF site +17:

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Robin Becker
DE wrote: Hello, Some long time ago, I used to use Tcl/Tk. I had an tcl embedded into my app. The coolest thing was however, I was able to attach to the interpreter (built in to my app) via a tcl shell in which I could type in regular tcl code which would be interpreted by the interpreter of my

Re: Making pygopherd working with Mac OS X

2005-02-23 Thread mattabat
Sorry, can anyone tell me whether the complete.org mailing list is still alive or not? I believe I tried subscribing but nothing came back :) Been a while since I looked at getting pygopherd going, but it appeared to be a non-trivial task.. Anyone with the time to look at it might be interested :)

Re: Style guide for subclassing built-in types?

2005-02-23 Thread Fuzzyman
[EMAIL PROTECTED] wrote: Fuzzyman wrote: I guess print is using the __repr__ (or __str__ ?) methods of lsit - which you will need to override as well. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml Thank you but the problem is that I have to express my intention in

Re: On eval and its substitution of globals

2005-02-23 Thread Kent Johnson
Paddy wrote: Hi, I got tripped up on the way eval works with respect to modules and so wrote a test. It seems that a function carries around knowledge of the globals() present when it was defined. (The .func_globals attribute)? When evaluated using eval(...) the embedded globals can be overridden

Re: Style guide for subclassing built-in types?

2005-02-23 Thread Kent Johnson
[EMAIL PROTECTED] wrote: p.s. the reason I'm not sticking to reversed or even reverse : suppose the size of the list is huge. reversed() returns an iterator so list size shouldn't be an issue. What problem are you actually trying to solve? Kent --

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Fuzzyman
Do you mean making the interpreter available from within a Python app ? There are various ways of doing that - you can see the SPE editor which uses pycrust as one example. http://spe.pycs.net You could also embed IPython for a good interface to the interpreter. http://ipython.scipy.net

Re: unicode(obj, errors='foo') raises TypeError - bug?

2005-02-23 Thread Kent Johnson
Steven Bethard wrote: Mike Brown wrote: class C: ... def __str__(self): ... return 'asdf\xff' ... o = C() unicode(o, errors='replace') Traceback (most recent call last): File stdin, line 1, in ? TypeError: coercing to Unicode: need string or buffer, instance found [snip] What am I doing

How new Check 21 legislation is affecting you...

2005-02-23 Thread Cathleen Baer
Good Afternoon! Recenty intrdocuced legislation requires business and home users to print personal and business checks with security blank check stock and magnetic ink. Please find qualified suppliers at Google by clicking on the followingl link.

Re: Style guide for subclassing built-in types?

2005-02-23 Thread janeaustine50
Kent Johnson wrote: [EMAIL PROTECTED] wrote: p.s. the reason I'm not sticking to reversed or even reverse : suppose the size of the list is huge. reversed() returns an iterator so list size shouldn't be an issue. What problem are you actually trying to solve? Kent Oh, you are right.

File/Directory hacks - is there a better way to do this?

2005-02-23 Thread Fitzgerald Steele
I had a software package screw up a directory tree by placing all the files in a directory of the same name. So I wound up with: Root file1.txt (dir) file1.txt (file) file2.txt (dir) file2.txt (file) Annoying. So I wrote the following script, which fixed the problem by renaming

Re: newbie help for mod_python

2005-02-23 Thread Jochen Kaechelin
Am Mittwoch, 23. Februar 2005 00:29 schrieb Brian Beck: Jochen Kaechelin wrote: I run debian sid and apache2 with libapache2-mod-python2.3 and I added these lines Directory /var/www AddHandler mod_python .py PythonDebug On /Directory in a virtualhost container. Were

Fonts and PIL

2005-02-23 Thread Greg Lindstrom
Hello- I'm running Python 2.3 on a windows box and would like to use PIL to superimpose text over an existing pgn image. I have no problem getting the text on the image but can not figure out how to manage fonts. How to set the font style and size. From reading the archives I surmise that I

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Ville Vainio
fuzzyman == Fuzzyman [EMAIL PROTECTED] writes: fuzzyman Do you mean making the interpreter available from within fuzzyman a Python app ? There are various ways of doing that - fuzzyman you can see the SPE editor which uses pycrust as one fuzzyman example. http://spe.pycs.net I

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread Ilias Lazaridis
Markus Wankus wrote: George Sakkis wrote: Ilias Lazaridis [EMAIL PROTECTED] wrote in message [...] The Essence is this one, as stated before: [huge copy paste of previous post] The Essence is irrelevant. - - - All your thread are belong to us. - - - For great justice! ;o) [EVALUATION] - E02 -

Re: Sizers VS window size

2005-02-23 Thread Deltones
Brian Victor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Deltones wrote: However, if I add this part from the tutorial, I get a much smaller window. Why is there an interference with the result I want when adding the sizer code? [snip] self.sizer.Fit(self) As noted in

kill a process in XP

2005-02-23 Thread Tor Erik Sønvisen
Hi. From my Python-program I spawn a new process. When using P_NOWAIT spawnl returns the pid but in windows it returns a process handle. Later I want to kill this process. How can I do this when I only have the process handle? -tores- -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread Grant Edwards
On 2005-02-23, Ilias Lazaridis [EMAIL PROTECTED] wrote: The Essence is this one, as stated before: [huge copy paste of previous post] The Essence is irrelevant. - All your thread are belong to us. - For great justice! ;o) [EVALUATION] - E02 - Support for MinGW Open Source Compiler

Re: user interface for python

2005-02-23 Thread Scott David Daniels
Thomas Guettler wrote: Am Tue, 22 Feb 2005 20:09:50 -0800 schrieb Raghul: Which of the UI I can used for my program that I can use both in windows and in Linux. Several. Tkinter and wxPython are good choices -- they run on the three major platforms: Linux/unix, Windows, and Mac OS X. I like

Selective HTML doc generation

2005-02-23 Thread Graham
Hi. I'm looking for a documentation generation tool (such as pydoc, epydoc, happydoc, etc.) that will allow me to filter what it includes in it's output. I only want the reader to know about classes and methods in my package if if the classes have docstrings. I've got a large package that is used

Re: assert 0, foo vs. assert(0, foo)

2005-02-23 Thread Scott David Daniels
Thomas Guettler wrote: Hi, Python 2.3.3 (#1, Feb 5 2005, 16:22:10) [GCC 3.3.3 (SuSE Linux)] on linux2 assert 0, foo Traceback (most recent call last): File stdin, line 1, in ? AssertionError: foo assert(0, foo) If you use parenthesis for the assert statement, it never raises an exception. Up

A Question about SQLBuilder

2005-02-23 Thread Evrim Ozcelik
Hi, We are going to make an database application integrated development environment with python, zope and cmf. I am searching for an sql builder class for generating sql sentences. This class must run over different sql relational databases. But i want to use zope database adapters for db

running a shell command from a python program

2005-02-23 Thread Sandman
Hi, I'm a newbie, so please be gentle :-) How would I run a shell command in Python? Here is what I want to do: I want to run a shell command that outputs some stuff, save it into a list and do stuff with the contents of that list. I started with a BASH script actually, until I realized I

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread Ilias Lazaridis
Grant Edwards wrote: [...] Um, you realize that nobody in this thread takes you the least bit seriously and people are just poking you with a stick to watch you jump? jump: [EVALUATION] - E02 - Support for MinGW Open Source Compiler Essence:

Re: running a shell command from a python program

2005-02-23 Thread Thomas Guettler
Am Wed, 23 Feb 2005 07:00:31 -0800 schrieb Sandman: Hi, I'm a newbie, so please be gentle :-) How would I run a shell command in Python? [cut] Is popen the answer? Also, where online would I get access to good sample code that I could peruse? Yes, popen is the answer. I recommend

Re: running a shell command from a python program

2005-02-23 Thread Sandman
Doh, use the search Luke: http://www.wellho.net/forum/Programming-in-Python-and-Ruby/Running-shell-commands-from-Python.html Seems like popen is the way to go. S -- http://mail.python.org/mailman/listinfo/python-list

Socks-4 Client Example in Twisted

2005-02-23 Thread Daniel Chandran
I am looking for examples on how to write a Socks-4 client example using the Twisted framework. Has anybody attempted this or aware of examples? Thanks, Daniel -- http://mail.python.org/mailman/listinfo/python-list

[OT] [Job] Open Python/Zope/Plone Positions in Ireland

2005-02-23 Thread Darragh Sherwin
Propylon is looking to recruit people with Python or Zope experience for several projects that we are involved in. We are seeking candidates with varying amount of experience in Python and all who are interested in learning in Python are encouraged to apply for the positions. Experience with

Re: running a shell command from a python program

2005-02-23 Thread Leif B. Kristensen
Sandman wrote: How would I run a shell command in Python? Here is what I want to do: I want to run a shell command that outputs some stuff, save it into a list and do stuff with the contents of that list. There's a Python Cookbook example that should fit nicely with what you're trying to

print and str subclass with tab in value

2005-02-23 Thread David Bolen
I ran into this strange behavior when noticing some missing spaces in some debugging output. It seems that somewhere in the print processing, there is special handling for string contents that isn't affected by changing how a string is represented when printed (overriding __str__). For example,

Re: user interface for python

2005-02-23 Thread Fuzzyman
Yeah.. Tkinter is nice. Wzx is just as easy though, but scales better because it's built on wx. Regards, Fuzzy http://www.voidsapce.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Can somebody help compiling 'mssqldb.pyd' for Python24 [win]?

2005-02-23 Thread Martin Bless
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html Unfortunately the binary for Python-2.4 isn't available yet and I'd hate to step back to a previous

Re: Fonts and PIL

2005-02-23 Thread Ulf Göransson
Greg Lindstrom wrote: I'm running Python 2.3 on a windows box and would like to use PIL to superimpose text over an existing pgn image. I have no problem getting the text on the image but can not figure out how to manage fonts. How to set the font style and size. From reading the archives I

Re: unicode(obj, errors='foo') raises TypeError - bug?

2005-02-23 Thread Steven Bethard
Kent Johnson wrote: Steven Bethard wrote: No, this is documented behavior[1]: unicode([object[, encoding [, errors]]]) ... For objects which provide a __unicode__() method, it will call this method without arguments to create a Unicode string. For all other objects, the 8-bit string

Vexira ALERT [your mail: Hi]

2005-02-23 Thread VaMailArmor
* * * * * * * * * * * * * * * Vexira ALERT * * * * * * * * * * * * * * * This version of Vexira MailArmor is licensed and full featured. Vexira has detected the following in a mail from your address: Worm/NetSky.Z worm The mail was not delivered. Your computer may be infected

Re: MatPlotLib.MatLab troubles (how to install/run matplotlib.PyLab?)

2005-02-23 Thread John Hunter
Colombes == Colombes [EMAIL PROTECTED] writes: ColombesNow I only need to figure out how to install the Colombes correct Numeric module(s). I'm making progress, Colombes almost have my home laptop fully capable with the Colombes MatLab-like (PyLab) graphs, plots. You can

Re: [perl-python] exercise: partition a list by equivalence

2005-02-23 Thread Paul McGuire
Please consider my submission also (Python 2.3-compatible). -- Paul McGuire .import sets . .input = [[1, 2], [3, 4], [2, 3], [4, 5]] .input = [[1, 2], [3, 4], [4, 5]] .input = [[1, 2],[2,1], [3, 4], [4, 5],[2,2],[2,3],[6,6]] . .def merge(pairings): .ret = [] .

Pythoncard - Mistake in walkthrough?

2005-02-23 Thread Deltones
Hi all, I'm just getting into Python/wxPython/Pythoncard and I'm trying the tutorial from this page: http://pythoncard.sourceforge.net/walkthrough1.html Is it me who's totally dense or there's some sort of confusion with this tutorial? Here's what is said in the tutorial: Open the file

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread George Sakkis
Ilias Lazaridis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Grant Edwards wrote: [...] Um, you realize that nobody in this thread takes you the least bit seriously and people are just poking you with a stick to watch you jump? jump: [EVALUATION] - E02 - Support for MinGW

Re: kill a process in XP

2005-02-23 Thread Dave Brueck
Tor Erik Sønvisen wrote: From my Python-program I spawn a new process. When using P_NOWAIT spawnl returns the pid but in windows it returns a process handle. Later I want to kill this process. How can I do this when I only have the process handle? Try ctypes - if it's really a Windows handle,

PyEphem on Win32 -- 2nd try

2005-02-23 Thread Flory
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A second request for help... Has anyone run the PyEphem ephemeris application under WinXP? http://rhodesmill.org/brandon/projects/pyephem.html I have compiled it with Visual Studio 6 and it crashes Python with a simple import ephem

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread Stephen Kellett
In message [EMAIL PROTECTED], George Sakkis [EMAIL PROTECTED] writes Ilias Lazaridis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Grant Edwards wrote: [...] Um, you realize that nobody in this thread takes you the least bit seriously and people are just poking you with a stick to

Arrow-keys bug.

2005-02-23 Thread Daniel Alexandre
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there. I'm making a talker's base in python and i'm with a serious bug in it. Everytime a client connects to the talker and presses for ex. the arrow key lets say twice, the following characters appears in it's screen: [[A[[A, if he presses enter

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread Ilias Lazaridis
Stephen Kellett wrote: [...] Who's Guido? Guido is the one, who should care by time about the status of the python-community. - I've send an addition CC of this message to the python-foundation, which will hopefully take some steps to improve the build-system. [EVALUATION] - E02 - Support for

Re: Comm. between Python and PHP

2005-02-23 Thread Nils Emil P.Larsen
Hello Python is perfectly capable of generating HTML. You don't have to demean yourself by working in PHP. Thanks for the tip about using Python instead of PHP to generate web pages. I may follow it. Nils Emil -- My reply-address is valid. www.bios-flash.dk Min svar-adresse er

Re: Comm. between Python and PHP

2005-02-23 Thread Nils Emil P.Larsen
Hello Sorry for not being too exact in my request! If the data you want to pass is structured then you might consider XML-RPC which is a cross platform way of passing structured data XML-RPC looks like something very suitable for my needs. It seems Python handles the remote procedure calls very

Re: LC_ALL and os.listdir()

2005-02-23 Thread Kenneth Pronovici
On Wed, Feb 23, 2005 at 01:03:56AM -0600, Kenneth Pronovici wrote: [snip] Today, I accidentally ran across a directory containing three normal files (with ASCII filenames) and one file with a two-character unicode filename. My code, which was doing something like this: for entry in

Re: Selective HTML doc generation

2005-02-23 Thread Brian van den Broek
Graham said unto the world upon 2005-02-23 09:42: Hi. I'm looking for a documentation generation tool (such as pydoc, epydoc, happydoc, etc.) that will allow me to filter what it includes in it's output. I only want the reader to know about classes and methods in my package if if the classes have

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-23 Thread Eric Jardim
Simon John - Feb 10, 11:51 am: I've just read the Qt4 GPL for Windows will only support gcc (and maybe MinGW) anyway, not BCC or VisualC++ (or it's free equivalents), so it looks like it would be a daunting task to actually build PyQt Why? I think that it is fair. Why a Free Software

Re: Style guide for subclassing built-in types?

2005-02-23 Thread Michael Spencer
[EMAIL PROTECTED] wrote: Kent Johnson wrote: [EMAIL PROTECTED] wrote: p.s. the reason I'm not sticking to reversed or even reverse : suppose the size of the list is huge. reversed() returns an iterator so list size shouldn't be an issue. What problem are you actually trying to solve? Kent Oh, you

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-23 Thread Eric Jardim
Simon John - Feb 13, 4:24 pm: After building with MSVC6 (Python 2.3.5 and 2.4 versions) I've noticed that the ToolTips don't seem to work in the GPL version. Free (GPL) Qt3 port to Windows is not complete. They indeed need help to conclude their job. And as Trolltech is not going to release

Re: running a shell command from a python program

2005-02-23 Thread aurora
In Python 2.4, use the new subprocess module for this. It subsume the popen* methods. Hi, I'm a newbie, so please be gentle :-) How would I run a shell command in Python? Here is what I want to do: I want to run a shell command that outputs some stuff, save it into a list and do stuff with

Re: PyEphem on Win32 -- 2nd try

2005-02-23 Thread John Roth
A quick look at the site, and following the link to the XEphem site reveals that the Windows port of XEphem uses Cygwin. AFAIK, that's not compatible with the usual CPython implementation. Again, AFAIK, you'll either have to use a Python port compiled under Cygwin, or you'll have to find a Windows

Re: Don't understand global variables between modules

2005-02-23 Thread Bart van Deenen
Fredrik Lundh [EMAIL PROTECTED] wrote: because running a script isn't the same thing as importing it. try adding print __name__ lines before your other print statements so you can see who's printing what. Is there more than one global space? in this case, there are more module

Re: user interface for python

2005-02-23 Thread Mike Meyer
Scott David Daniels [EMAIL PROTECTED] writes: Thomas Guettler wrote: You can write portable programs (if you test across platforms). The only truly portable programs in any language are abstract. Once you start dealing with I/O and the real world, you inevitably have to face issues one

select + ssl

2005-02-23 Thread Ktm
Hello, I don't have the same behaviour with two codes who are quite the same, one using SSL, the other not. I tested the programs with stunnel and telnet , respectively. Here are the first code :

Re: On eval and its substitution of globals

2005-02-23 Thread Paddy
Thanks Kent for your reply. I had to do as you suggest but I was thinking either it was a kludge, and there should be a 'deep' substitution of globals, or that there was a good reason for it to work as it does and some magician would tell me. Oh, the third reason could be that it was first

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread Nick Vargish
Ilias Lazaridis [EMAIL PROTECTED] writes: Guido is the one, who should care by time about the status of the python-community. That one crashed my parser. Thank's for every bit of contribution, which has made this thread an worthfull insight into the python-community. To really get a sense

Re: assert 0, foo vs. assert(0, foo)

2005-02-23 Thread Carl Banks
Thomas Guettler wrote: Is it possible to change future python versions, that assert accept parenthesis? It's possible, but extremely unlikely that it will ever happen. assert is not a function, but a statement (like print). Statements don't use parentheses; when you use parentheses, it

Re: Dealing with config files what's the options

2005-02-23 Thread Phil Jackson
Tom Willis [EMAIL PROTECTED] writes: How are the expert pythoneers dealing with config files? You could use the cPickle module if you don't mind your config files being unreadable by humans. There is also the shlex module for more powerful config file needs:

Communication between JAVA and python

2005-02-23 Thread Jacques Daussy
Hello How can I transfert information between a JAVA application and a python script application. I can't use jython because, I must use python interpreter.I think to socket or semaphore, but can I use it on Windows plateform ? thanks a lot jack --

Re: Problem with minidom and special chars in HTML

2005-02-23 Thread Jarek Zgoda
Horst Gutmann napisa(a): Don't use minidom or convert HTML4 to XHTML and change declaration of doctype. This was just a bad example :-) I get the same problem with XHTML in the doctype. The funny thing here IMO is, that the special chars are simply removed. No warning, no nothing :-( As

Re: Pythoncard - Mistake in walkthrough?

2005-02-23 Thread It's me
As stated in the on-line WalkThrough, the information there was written for an older version of the program. Deltones [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I'm just getting into Python/wxPython/Pythoncard and I'm trying the tutorial from this page:

Yahoo! Auto Response

2005-02-23 Thread ben#45;fuzzybear
Hi - This is the vacation program; I'm working for my owner, Ben. The account to which you have sent your mail is going to be discontinued at at the end of July (Yahoo's mail service has deteriorated well past abysmal into nightmarishly bad, and the trend shows no sign of stopping). Please

Re: On eval and its substitution of globals

2005-02-23 Thread Leif K-Brooks
Paddy wrote: I had to do as you suggest but I was thinking either it was a kludge, and there should be a 'deep' substitution of globals, or that there was a good reason for it to work as it does and some magician would tell me. If there was deep substitution of globals, how would functions

Re: unicode(obj, errors='foo') raises TypeError - bug?

2005-02-23 Thread Martin v. Lwis
Steven Bethard wrote: Yeah, I agree it's weird. I suspect if someone supplied a patch for this behavior it would be accepted -- I don't think this should break backwards compatibility (much). Notice that the right thing to do would be to pass encoding and errors to __unicode__. If the string

Re: LC_ALL and os.listdir()

2005-02-23 Thread Martin v. Löwis
Kenneth Pronovici wrote: I think that I can solve my problem by just converting any unicode strings from configuration into utf-8 simple strings using encode(). Using this solution, all of my existing regression tests still pass, and my code seems to make it past the unusual directory. See my

Re: LC_ALL and os.listdir()

2005-02-23 Thread Martin v. Löwis
Kenneth Pronovici wrote: 1) Why LC_ALL has any effect on the os.listdir() result? The operating system (POSIX) does not have the inherent notion that file names are character strings. Instead, in POSIX, file names are primarily byte strings. There are some bytes which are interpreted as

Python and Ajax technology collaboration

2005-02-23 Thread John Willems
Interesting GUI developments, it seems. Anyone developed a Ajax application using Python? Very curious thx (Ajax stands for: XHTML and CSS; dynamic display and interaction using the Document Object Model; data interchange and manipulation using XML and XSLT; asynchronous data retrieval

Re: LC_ALL and os.listdir()

2005-02-23 Thread Serge Orlov
Martin v. Löwis wrote: My goal is to build generalized code that consistently works with all kinds of filenames. Then it is best to drop the notion that file names are character strings (because some file names aren't). You do so by converting your path variable into a byte string. To do

msnp group chats

2005-02-23 Thread sparda713
I'm currently using the msnp.py module in a project. We are trying to implement a group chats feature. Has anyone had any success in doing this or know how to do this? We have it doing single chats, but we can't figure out how MSN is adding the multiple invites. Any help would be greatly

Re: LC_ALL and os.listdir()

2005-02-23 Thread Martin v. Löwis
Serge Orlov wrote: Shouldn't os.path.join do that? If you pass a unicode string and a byte string it currently tries to convert bytes to characters but it makes more sense to convert the unicode string to bytes and return two byte strings concatenated. Sounds reasonable. OTOH, this would be the

Re: Python and Ajax technology collaboration

2005-02-23 Thread aurora
It was discussed in the last Bay Area Python Interest Group meeting. Thursday, February 10, 2005 Agenda: Developing Responsive GUI Applications Using HTML and HTTP Speakers: Donovan Preston http://www.baypiggies.net/ The author has a component LivePage for this. You may find it from

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-23 Thread Stephen Kellett
In message [EMAIL PROTECTED], Ilias Lazaridis [EMAIL PROTECTED] writes Stephen Kellett wrote: [...] Who's Guido? Guido is the one, who should care by time about the status of the python-community. Who is care by time? -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk RSI

Re: Python and Ajax technology collaboration

2005-02-23 Thread Dave Brueck
John Willems wrote: Interesting GUI developments, it seems. Anyone developed a Ajax application using Python? Very curious thx (Ajax stands for: XHTML and CSS; dynamic display and interaction using the Document Object Model; data interchange and manipulation using XML and XSLT; asynchronous

Re: unicode(obj, errors='foo') raises TypeError - bug?

2005-02-23 Thread Kent Johnson
Martin v. Lwis wrote: Steven Bethard wrote: Yeah, I agree it's weird. I suspect if someone supplied a patch for this behavior it would be accepted -- I don't think this should break backwards compatibility (much). Notice that the right thing to do would be to pass encoding and errors to

Re: Dealing with config files what's the options

2005-02-23 Thread Tom Willis
On Wed, 23 Feb 2005 20:15:47 +, Phil Jackson [EMAIL PROTECTED] wrote: Tom Willis [EMAIL PROTECTED] writes: How are the expert pythoneers dealing with config files? You could use the cPickle module if you don't mind your config files being unreadable by humans. There is also the shlex

Re: LC_ALL and os.listdir()

2005-02-23 Thread Kenneth Pronovici
On Wed, Feb 23, 2005 at 10:07:19PM +0100, Martin v. Löwis wrote: So we have three options: 1. skip this string, only return the ones that can be converted to Unicode. Give the user the impression the file does not exist. 2. return the string as a byte string 3. refuse to listdir

  1   2   >