Re: how to interrupt time.sleep ?

2005-02-22 Thread Thomas Heller
BOOGIEMAN <[EMAIL PROTECTED]> writes: > I have line "time.sleep(60)" in my code > > How do I cancel waiting 60 seconds if I want to continue with program > imediately ? Like "Press some button if you don't want to wait" > > If it can't be canceled what's the other solution to > "wait certain

Re: Comm. between Python and PHP

2005-02-22 Thread Tim Roberts
Nils Emil P. Larsen <[EMAIL PROTECTED]> wrote: > >Hello > >I'm building a daemon in Python. It will measure and control some >physical devices on a serial bus. Since it is a daemon, it will never >terminate and I can't interfere with the regulation of the devices by >using command line parameters.

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

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

Re: A few q's on python files.

2005-02-22 Thread Tim Roberts
Joseph Quigley <[EMAIL PROTECTED]> wrote: > >i'm new to python (by a week) but am learning fast (that's what I like >about python--it's simplicity). I got disgusted with C and C++ (i was >learning) probably because of a bad copy of Visual C++ 6.0 that gave me errors. I find that very hard to bel

LC_ALL and os.listdir()

2005-02-22 Thread Kenneth Pronovici
I have some confusion regarding the relationship between locale, os.listdir() and unicode pathnames. I'm running Python 2.3.5 on a Debian system. If it matters, all of the files I'm dealing with are on an ext3 filesystem. The real code this problem comes from takes a configured set of directorie

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

2005-02-22 Thread Mike Brown
This works as expected (this is on an ASCII terminal): >>> unicode('asdf\xff', errors='replace') u'asdf\ufffd' This does not work as I expect it to: >>> class C: ... def __str__(self): ... return 'asdf\xff' ... >>> o = C() >>> unicode(o, errors='replace') Traceback (most recent call last

Re: Comm. between Python and PHP

2005-02-22 Thread Nick Craig-Wood
Peter Hansen <[EMAIL PROTECTED]> wrote: > Nils Emil P. Larsen wrote: > > What is the easiest way to make my threaded Python daemon communicate > > with a PHP-script running from Apache2 on localhost? > > "Easiest" of course depends on lots of things, and mostly on > specifics that you haven't t

Re: basic tkinter/Windows question

2005-02-22 Thread Martin Franklin
Paul Rubin wrote: I find myself having to write some code on Windows :-(. To alleviate the pain, at least I get to use Python for some of it. I'm trying to write a simple application, say "eggs.py". It pops a tkinter gui and lets the user do some stuff. The system has Python installed so I don't

Re: basic tkinter/Windows question

2005-02-22 Thread Vincent Wehren
Paul Rubin wrote: I find myself having to write some code on Windows :-(. To alleviate the pain, at least I get to use Python for some of it. I'm trying to write a simple application, say "eggs.py". It pops a tkinter gui and lets the user do some stuff. The system has Python installed so I don't

Re: PythonCard and Py2Exe

2005-02-22 Thread It's me
It's: from PythonCard.components import radiogroup not just: from PythonCard import radiogroup "PipedreamerGrey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm trying to create a standalone version (.exe) of PythonCard's Custdb > sample using Py2Exe version 0.5.0. E

Re: user interface for python

2005-02-22 Thread helmi03
Yes, wxpython is cross-platform. I also suggest pygtk for another toolkit. -- http://mail.python.org/mailman/listinfo/python-list

Re: On eval and its substitution of globals

2005-02-22 Thread Paddy
I have had no reply so on revisiting this I thought I would re-submit it and point out that there is a question way down at the end :-) Thanks. = Original Post = 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 arou

Re: reading only new messages in imaplib

2005-02-22 Thread Raghul
eceived: from web50 Received: by twmail. Received: from mail. Received: from mail. Received: by twmail. Received: from adams Received: by twmail. Received: by twmail. Received: by twmail. Received: from ns2.T Received: by twmail. Received: by twmail. Received: from chat3 Received: by twmail. Receiv

RE: reading only new messages in imaplib

2005-02-22 Thread Tony Meyer
> Is it posssible to read only the new messages or unread > messages using imaplib in python? If it is possible pls > specify the module or give a sample code. This will print out the first 20 chars of each undeleted message. You should be able to figure out how to do what you want from it. >>

Re: exercise: partition a list by equivalence

2005-02-22 Thread David Eppstein
In article <[EMAIL PROTECTED]>, "John Machin" <[EMAIL PROTECTED]> wrote: > > it would be nice if the two working programs do not use some package. > > This problem shouldn't need to. > > Look at the newsgroup again. By my count there are apparently-working > versions from SIX people: Reinhold, b

reading only new messages in imaplib

2005-02-22 Thread Raghul
Is it posssible to read only the new messages or unread messages using imaplib in python? If it is possible pls specify the module or give a sample code. Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

Weekly Python Patch/Bug Summary

2005-02-22 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 308 open (+10) / 2755 closed ( +1) / 3063 total (+11) Bugs: 838 open (+15) / 4834 closed ( +5) / 5672 total (+20) RFE : 168 open ( +0) / 148 closed ( +4) / 316 total ( +4) New / Reopened Patches __ do not ad

progress bar controls in status.py

2005-02-22 Thread mirandacascade
O/S - Windows XP Home with Service Pack 2 Vsn of Python: 2.4 (from ActiveState) This question is with regard to the progress bar controls that are in the file status.py. On my workstation, status.py is located in the: c:\python24\lib\site-packages\pythonwin\pywin\dialogs\ folder. The only modi

user interface for python

2005-02-22 Thread Raghul
Hi, Which of the UI I can used for my program that I can use both in windows and in Linux. Is it possible for me to use Wxpython for my program so that it can run on both the windows and linux machine? Will it be platform independent? -- http://mail.python.org/mailman/listinfo/python-list

Re: Dealing with config files what's the options

2005-02-22 Thread Tom Willis
Thanks, I'm not too keen on the ini layout. But it's good to know it's there. On Wed, 23 Feb 2005 14:50:27 +1300, Tony Meyer <[EMAIL PROTECTED]> wrote: > > How are the expert pythoneers dealing with config files? > [...] > > You can just "import ConfigParser", or look at the various alternative

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

2005-02-22 Thread Markus Wankus
George Sakkis wrote: "Ilias Lazaridis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Nick Vargish wrote: You can excuse yourself from this one and stop replying to comments, but you don't get to unilaterally declare a discussion over. [...] The discussion is over. At least the in-top

Re: Style guide for subclassing built-in types?

2005-02-22 Thread janeaustine50
Jane Austine wrote: > Please see the following code: > > class rev_wrap(object): > def __init__(self,l): > self.l=l > def __getitem__(self,i): > return self.l[-i-1] > > class rev_subclass(list): > def __getitem__(self,i): > return

Style guide for subclassing built-in types?

2005-02-22 Thread Jane Austine
Please see the following code: class rev_wrap(object): def __init__(self,l): self.l=l def __getitem__(self,i): return self.l[-i-1] class rev_subclass(list): def __getitem__(self,i): return list.__getitem__(self,-i-1) if

Re: compatbility of .pyc files

2005-02-22 Thread Jeremy Bowers
On Wed, 23 Feb 2005 13:31:12 +1300, Blair Hall wrote: > I have a requirement to prevent 'accidental' tampering > with some software written in Python. If I ensure that all > of the modules concerned are compiled into .pyc's, and remove > the .py's to another location, then I should be safe until >

Re: compatbility of .pyc files

2005-02-22 Thread "Martin v. Löwis"
Blair Hall wrote: Are the .pyc's usable without recompilation between 'minor' releases of the interpretter (e.g., 2.3.1 -> 2.3.2 -> etc)? Yes. I presume that the .pyc's are NOT compatible across more major releases (e.g., 2.3.x -> 2.4.x)? Correct. Is there a hard and fast rule about compatibility a

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

2005-02-22 Thread "Martin v. Löwis"
Fuzzyman wrote: ust = 'æøå'.decode('utf-8') Which is now deprecated isn't it ? (including encoded string literals in source without declaring an encoiding). Not having an encoding declaration while having non-ASCII characters in source code is deprecated. Having non-ASCII characters in string liter

RE: Dealing with config files what's the options

2005-02-22 Thread Tony Meyer
> How are the expert pythoneers dealing with config files? [...] You can just "import ConfigParser", or look at the various alternatives: =Tony.Meyer -- http://mail.python.org/mailman/listinfo/python-list

Dealing with config files what's the options

2005-02-22 Thread Tom Willis
How are the expert pythoneers dealing with config files? Is there anything similair to .net's config files or java's .properties? A quick search on google didn't return anything that looked useful, and I almost would expect to see some module that would be for dealing with config information. I

Re: searching pdf files for certain info

2005-02-22 Thread Tom Willis
Ah that makes sense. I only see the behavior in pdftotext. ps2ascii doesn't give me the layout , which for my purposes, I certainly need. Thanks for the info, Looks like I'll keep searching for that silver bullet.:( On Tue, 22 Feb 2005 20:07:50 -0500, rbt <[EMAIL PROTECTED]> wrote: > Tom Willis

basic tkinter/Windows question

2005-02-22 Thread Paul Rubin
I find myself having to write some code on Windows :-(. To alleviate the pain, at least I get to use Python for some of it. I'm trying to write a simple application, say "eggs.py". It pops a tkinter gui and lets the user do some stuff. The system has Python installed so I don't care about wrapp

Re: Comm. between Python and PHP

2005-02-22 Thread Noah
It wasn't quite clear, but I assume that you want a PHP script that can call on the Python daemon and not have the daemon make calls to a PHP script. You could use xml-rpc which is built into Python as of version 2.2: http://docs.python.org/lib/module-xmlrpclib.html On the PHP side xmlrpc is s

Re: searching pdf files for certain info

2005-02-22 Thread rbt
Tom Willis wrote: Well sporadic spaces in strings would cause problems would it not? an example The String: "Patient Face Sheet"--->pdftotext--->"P a tie n t Face Sheet" I'm just curious if you see anything like that, since I really have no clue about ps or pdf etc...but I have a strong desire

Re: searching pdf files for certain info

2005-02-22 Thread Tom Willis
Well sporadic spaces in strings would cause problems would it not? an example The String: "Patient Face Sheet"--->pdftotext--->"P a tie n t Face Sheet" I'm just curious if you see anything like that, since I really have no clue about ps or pdf etc...but I have a strong desire to replace a r

compatbility of .pyc files

2005-02-22 Thread Blair Hall
I have a requirement to prevent 'accidental' tampering with some software written in Python. If I ensure that all of the modules concerned are compiled into .pyc's, and remove the .py's to another location, then I should be safe until the next upgrade of the Python interpretter. My questions: Are t

HTMLgen maintenance.

2005-02-22 Thread C. Titus Brown
Hi all, I spent a little bit of time today working on Robin Friedrich's HTMLgen[0], and made it work more like a modern Python package, with a Python package directory & distutils-based setup.py. I wanted to pass these things on to Robin, but his e-mail address @pythonpros doesn't work any mor

Re: Writting to specific location in a file

2005-02-22 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: My chanllenge is that each field needs to have a exact specific position in the output file. For instance a_field needs to start at position 2 in the line, b_fields at position 18 and so on, for all the fields on each line. You can use string formatting operations: row = (

Re: python tutorial/projects

2005-02-22 Thread Leif B. Kristensen
Danny skrev: > Does anyone know of a good python tutorial? > I was also looking for some non-trivial projects to do in python. There's a lot of projects on Sourceforge that are written in Python, where you're free to study the code and maybe participate, if you've got what it takes. > Basicall

Writting to specific location in a file

2005-02-22 Thread artixan
I have a database result set in a Python list. Each row is a tuple. data = [(a_field,b_field,c_field,d_field,x_field,y_field,z_field)] I need to loop thru this data and write each row to a text file. f = open('out.txt','w') for row in data: f.writelines(row) My chanllenge is that each fiel

Re: python tutorial/projects

2005-02-22 Thread Tom Willis
You know, I hate doing this I just remembered the Bruce Eckel book is a direct transaltion from THinking In Patterns for Java. And as such the example python code within the chapters is not even valid Python. If you're new to the language you'll get confused with the use of private and stat

Re: Can I get message filename from a Maildir mailbox stream?

2005-02-22 Thread Noah
This didn't work. I'm using the standard Python 2.3.4 library mailbox.Maildir. I got an error that message instance has no attribute 'fp'. I ended up not using mailbox.Maildir at all. It occured to me that since Maildir style mailboxes is just a collection of files that it was simpler to write a g

Re: python tutorial/projects

2005-02-22 Thread Andrew Thomson
On Tue, 2005-02-22 at 15:23 -0800, Danny wrote: > Does anyone know of a good python tutorial? I found this one most helpful. http://www.ibiblio.org/obp/thinkCSpy/ ajt. > I was also looking for some non-trivial projects to do in python. > > > Basically I would like to claim on my resume, that

Re: python tutorial/projects

2005-02-22 Thread Tom Willis
I found this one helpful http://diveintopython.org/ and this one http://ibiblio.org/obp/thinkCS/python/english/ Just found this one http://hetland.org/python/instant-python and this page has links to many more. http://www.python.org/doc/Intros.html And because I'm a huge Bruce Eckel fan. T

Re: python tutorial/projects

2005-02-22 Thread Steve Juranich
Oops. The correct URL is http://docs.python.org/tut/tut.html On Tue, 22 Feb 2005 16:48:48 -0700, Steve Juranich <[EMAIL PROTECTED]> wrote: > I think the tutorial offered at www.python.org/tut/tut.html is as good > a starting place as any. > > I wouldn't be able to suggest a "non-trivial" projec

Re: python tutorial/projects

2005-02-22 Thread Steve Juranich
I think the tutorial offered at www.python.org/tut/tut.html is as good a starting place as any. I wouldn't be able to suggest a "non-trivial" project without knowing more about your background. Can you do a flashcard program? recipe organizer? [EMAIL PROTECTED] client? (I think you see where this

Re: newbie help for mod_python

2005-02-22 Thread Brian Beck
Jochen Kaechelin wrote: I run debian sid and apache2 with libapache2-mod-python2.3 and I added these lines AddHandler mod_python .py PythonDebug On in a virtualhost container. Were those the only lines you added? You also should have actually loaded the module somewhere by adding something

Re: searching pdf files for certain info

2005-02-22 Thread Kartic
rbt said the following on 2/22/2005 8:53 AM: Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. Thanks, rbt Hi, Try pdftotext which is part o

Re: intersection of 2 list of pairs

2005-02-22 Thread John Machin
[EMAIL PROTECTED] wrote: > The use of frozenset can okay when sub-sequences are longer, but for > this problem it's slow, and anyway there are situations of repeated > data like this that have to be considered: Not just for frozenset; this has to be considered whatever the representation. > > fr

python tutorial/projects

2005-02-22 Thread Danny
Does anyone know of a good python tutorial? I was also looking for some non-trivial projects to do in python. Basically I would like to claim on my resume, that I know python, with out bad karma. Danny -- http://mail.python.org/mailman/listinfo/python-list

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

2005-02-22 Thread Dr. Colombes
John Hunter wrote: > > "Colombes" == Colombes <[EMAIL PROTECTED]> writes: > > Colombes> matplotlib.matlab deprecated, please import > Colombes> matplotlib.pylab or simply pylab instead. See > Colombes> http://matplotlib.sf.net/matplotlib_to_pylab.py for a > Colombes> script w

Re: lambda closure question

2005-02-22 Thread Karl Anderson
"Ted Lilley" <[EMAIL PROTECTED]> writes: > What I want to do is pre-load functions with arguments by iterating > through a list like so: > > >>>class myclass: > ...pass > >>>def func(self, arg): > ...print arg > >>>mylist = ["my", "sample", "list"] > >>>for item in mylist: > ...setatt

Re: How to write a ping client

2005-02-22 Thread Martin Bless
On 21 Feb 2005 18:35:06 -0800, "Harlin" <[EMAIL PROTECTED]> wrote: >Is there a way to write a ping client? I would like to be able to write >a small ping client so that I dont have to do os.system('ping args') I once followed the same line and used a py module by Jeremy Hylton if I remember corre

newbie help for mod_python

2005-02-22 Thread Jochen Kaechelin
I run debian sid and apache2 with libapache2-mod-python2.3 and I added these lines AddHandler mod_python .py PythonDebug On in a virtualhost container. and I have the following python-file: from mod_python import apache def requesthandler(req): req.content_type = "text/plain" req.writ

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

2005-02-22 Thread Steve Holden
Jonas Meurer wrote: On 22/02/2005 Radovan Garabik wrote: i could write a function to parse the comment and substitute special chars with the relevant html code, but maybe this already exists in some module? just make the page in utf-8, and you'll save you a lot of troubles ok, how do i do this? si

Re: how to interrupt time.sleep ?

2005-02-22 Thread Peter Hansen
BOOGIEMAN wrote: I have line "time.sleep(60)" in my code How do I cancel waiting 60 seconds if I want to continue with program imediately? Like "Press some button if you don't want to wait" You cannot. If it can't be canceled what's the other solution to "wait certain time/or press any button t

Re: how to interrupt time.sleep ?

2005-02-22 Thread Dan Sommers
On Tue, 22 Feb 2005 22:37:28 +0100, BOOGIEMAN <[EMAIL PROTECTED]> wrote: > I have line "time.sleep(60)" in my code > How do I cancel waiting 60 seconds if I want to continue with program > imediately ? Like "Press some button if you don't want to wait" > If it can't be canceled what's the oth

Re: intersection of 2 list of pairs

2005-02-22 Thread bearophileHUGS
The use of frozenset can okay when sub-sequences are longer, but for this problem it's slow, and anyway there are situations of repeated data like this that have to be considered: frozenset( ('a', 'a') ) ==> frozenset(['a']) For Py2.4 the faster and better solution seems Peter Otten one. James St

Py2Exe Import Error

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup( name

PythonCard and Py2Exe

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup( name

Grid issues

2005-02-22 Thread scottmallory
Greetings, I am new to Python...and I am having some difficulty updating a grid (wx.grid.PyGridTableBase). Everything works just fine (adding /deleting/ resizing rows, cols) except updating individual cells. I am using the grids to display data from a database (which is working fine), I am trying

how to interrupt time.sleep ?

2005-02-22 Thread BOOGIEMAN
I have line "time.sleep(60)" in my code How do I cancel waiting 60 seconds if I want to continue with program imediately ? Like "Press some button if you don't want to wait" If it can't be canceled what's the other solution to "wait certain time/or press any button to continue" problem ? --

Re: Problem with the sort() function

2005-02-22 Thread John Machin
clementine wrote: > Thanx Nick...I forgot to mention im using python 2.2 and along with a host > of other things it doesnt seem to have the enumarate built in function > :(:(:(...is it possible to replace it by something else? I dont think > simulating it will be feasible Faced with Nick's on

Re: Mixing Txinter and Pygame

2005-02-22 Thread Tim Knauf
Eric Brunel wrote: Well, since these are just exceptions, a simple try... except block would be fine, and you can even figure out the reason for the exception. Here is what I'd do: - when you create your Tkinter main window, initialize an attribute that you'll use to see if the application has q

PythonCard and Py2Exe

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup( nam

PythonCard and Py2Exe

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup( nam

Re: Problem with minidom and special chars in HTML

2005-02-22 Thread Jarek Zgoda
Horst Gutmann napisał(a): I currently have quite a big problem with minidom and special chars (for example ü) in HTML. Let's say I have following input file: -- http://www.w3.org/TR/html4/strict.dtd";> HTML4 is not an XML application. Even if mini

a wrapper to invoke functions using argument

2005-02-22 Thread les_ander
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" and invoke it as pytho

Re: Problem with the sort() function

2005-02-22 Thread Steven Bethard
Scott David Daniels wrote: or even (if you can't be bothered to look up when features happened): try: test = enumerate except NameError: def enumerate(iterable): ... try: test = sorted except NameError: def sorted(iterable, cmp=None, key=N

Re: Problem with the sort() function

2005-02-22 Thread Steven Bethard
Fuzzyman wrote: Iterators are available in python 2.2 class enumerate: def __init__(self, inlist): self.inlist = inlist self.index = 0 def next(self): if self.index >= len(self.inlist): raise StopIteration thisone = self.inlist[self.index] self.index

Re: 'modal dialogs' with Tkinter

2005-02-22 Thread Birdman
You could try using: EasyGUIhttp://www.ferg.org/easygui/ EasyGUI is different from other GUIs in that EasyGUI is NOT event-driven. It allows you to program in a traditional linear fashion, and to put up dialogs for simple input and output when you need to. If you have not yet learned the even

Re: Problem with minidom and special chars in HTML

2005-02-22 Thread Horst Gutmann
Fredrik Lundh wrote: umm. doesn't that doctype point to an SGML DTD? even if minidom did fetch external DTD's (I don't think it does), it would probably choke on that DTD. running your documents through "tidy -asxml -numeric" before parsing them as XML might be a good idea... http://tidy.sour

Re: Comm. between Python and PHP

2005-02-22 Thread Peter Hansen
Nils Emil P. Larsen wrote: I'm building a daemon in Python. It will measure and control some physical devices on a serial bus. Since it is a daemon, it will never terminate and I can't interfere with the regulation of the devices by using command line parameters. I want to control the regulation by

Comm. between Python and PHP

2005-02-22 Thread Nils Emil P.Larsen
Hello I'm building a daemon in Python. It will measure and control some physical devices on a serial bus. Since it is a daemon, it will never terminate and I can't interfere with the regulation of the devices by using command line parameters. I want to control the regulation by using a Internet br

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

2005-02-22 Thread Jonas Meurer
On 22/02/2005 Radovan Garabik wrote: > > i could write a function to parse the comment and substitute special > > chars with the relevant html code, but maybe this already exists in some > > module? > > just make the page in utf-8, and you'll save you a lot of troubles ok, how do i do this? simpl

Re: Sizers VS window size

2005-02-22 Thread Brian Victor
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 the the docs for Fit(): "Tell the sizer to resize the window to match the size

Re: Problem with minidom and special chars in HTML

2005-02-22 Thread Fredrik Lundh
Horst Gutmann wrote: > I currently have quite a big problem with minidom and special chars (for > example ü) in HTML. > > Let's say I have following input file: > -- > > "http://www.w3.org/TR/html4/strict.dtd";> > > > ü > > >

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

2005-02-22 Thread Serge Orlov
Paul Boddie wrote: > One side-effect of the "big push" to UTF-8 amongst the Linux > distribution vendors/maintainers is the evasion of issues such as > filesystem encodings and "real" Unicode at the system level. In > Python, when you have a Unicode object, you are dealing with > idealised > sequen

Sizers VS window size

2005-02-22 Thread Deltones
Hi, I'm trying to understand one of the wiki wxPython tutorial, and I must admit I`m a bit baffled by sizers. If I run the following relevant piece of code, I get the result I expect, i.e a 800x600 window being opened (sorry for the formatting): objFrame = MainWindow(None, -1, "Small Editor", (80

Re: searching pdf files for certain info

2005-02-22 Thread rbt
Tom Willis wrote: I tried that for something not python related and I was getting sporadic spaces everywhere. I am assuming this is not the case in your experience? On Tue, 22 Feb 2005 10:45:09 -0500, rbt <[EMAIL PROTECTED]> wrote: Andreas Lobinger wrote: Aloha, rbt wrote: Thanks guys... what if I

Re: Python UPS / FedEx Shipping Module

2005-02-22 Thread Aahz
In article <[EMAIL PROTECTED]>, Gabriel Cooper <[EMAIL PROTECTED]> wrote: > >I've made UPS and FedEx shipping rate request modules in python using >XML. Is there an interest in putting this on the web? Yes! My company has some similar software, and I may be able to get permission to combine our

Problem with minidom and special chars in HTML

2005-02-22 Thread Horst Gutmann
Hi :-) I currently have quite a big problem with minidom and special chars (for example ü) in HTML. Let's say I have following input file: -- http://www.w3.org/TR/html4/strict.dtd";> ü -- And fol

Re: Problem with the sort() function

2005-02-22 Thread Duncan Booth
Scott David Daniels wrote: > if sys.version_info < (2, 4): > def sorted(iterable, cmp=None, key=None, reverse=False): > "return a sorted copy of its input" > seq = list(iterable) > if reverse: > seq.reverse()# preserve s

Re: Creating Button arrays with different commands using Tkinter

2005-02-22 Thread Fredrik Lundh
"Harlin" <[EMAIL PROTECTED]> wrote >I have an array of Appnames. Let's say they are 'Monkeys', 'Cats', > 'Birds'. > > I would like create a button array with these: > > ---Start Code--- > # Constructing and displaying buttons > for a in Appnames: > Button(root, text=a, command=lambda:self.OpenFi

Re: searching pdf files for certain info

2005-02-22 Thread Tom Willis
I tried that for something not python related and I was getting sporadic spaces everywhere. I am assuming this is not the case in your experience? On Tue, 22 Feb 2005 10:45:09 -0500, rbt <[EMAIL PROTECTED]> wrote: > Andreas Lobinger wrote: > > Aloha, > > > > rbt wrote: > > > >> Thanks guys... wh

Re: 'modal dialogs' with Tkinter

2005-02-22 Thread Fredrik Lundh
Sean McIlroy wrote: > I'd like to have a function f such that, when f is invoked, a Tk > window w is presented in which a number of variables can be modified, > and f returns the values that are indicated by the relevant > menus/checkbuttons/etc at the time w gets closed. I've tried various > ways

Re: pydoc documentation- referred to Michele answer

2005-02-22 Thread Scott David Daniels
Liat Koski wrote: Hellow Michele, This systax is working only with bulid in modules, like 'sys' for example But not for personal programs. Am i wrong?? Can you please send me some syntax example you have? cause i'm getting syntax error that i don't know how to solve Thanks Liat Consider this: You

Re: imaplib.error: command COPY illegal in state AUTH

2005-02-22 Thread Grant Edwards
On 2005-02-22, Raghul <[EMAIL PROTECTED]> wrote: > I am getting this error while copying n number of messages to the > folder using imaplib.What to do to copy n number of folders in mail > > The error i got is > > imaplib.error: command COPY illegal in state AUTH That means you haven't logged in

Re: searching pdf files for certain info

2005-02-22 Thread rbt
Andreas Lobinger wrote: Aloha, rbt wrote: Thanks guys... what if I convert it to PS via printing it to a file or something? Would that make it easier to work with? Not really... The classical PS Drivers (f.e. Acroread4-Unix print-> ps) simply define the pdf graphics and text operators as PS comma

Re: how can i read a mail using uid?

2005-02-22 Thread Grant Edwards
On 2005-02-22, Raghul <[EMAIL PROTECTED]> wrote: > I want to read the content of the mail and split it words using uid.If > the word is found in my database I want to delete the mail using its > uid. STOP POSTING THE SAME QUESTIONS IN A DOZEN DIFFERENT THREADS! -- Grant Edwards

Re: Copy functio in imaplib

2005-02-22 Thread Grant Edwards
On 2005-02-22, Raghul <[EMAIL PROTECTED]> wrote: > What is message_set in the python documentation for copy in imaplib? It's a list of message numbers. The ones returned by a "SEARCH" command. > Is they referring message set to the particular mail message > in my inbox or something else. ? Ha

Re: Problem with the sort() function

2005-02-22 Thread Scott David Daniels
Nick Coghlan wrote: def mysort(iterable, cmp=None, key=None, reverse=False): "return a sorted copy of its input" if sys.version_info >= (2,4): return sorted(iterable, cmp, key, reverse) seq = list(iterable) if reverse: seq.reverse()# preserve stability if

Re: searching pdf files for certain info

2005-02-22 Thread Andreas Lobinger
Aloha, rbt wrote: Thanks guys... what if I convert it to PS via printing it to a file or something? Would that make it easier to work with? Not really... The classical PS Drivers (f.e. Acroread4-Unix print-> ps) simply define the pdf graphics and text operators as PS commands and copy the pdf cont

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

2005-02-22 Thread Paul Boddie
Mike Dee <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > A very very basic UTF-8 question that's driving me nuts: > > If I have this in the beginning of my Python script in Linux: > > #!/usr/bin/env python > # -*- coding: UTF-8 -*- > > should I - or should I not - be able to u

Re: searching pdf files for certain info

2005-02-22 Thread rbt
Andreas Lobinger wrote: Aloha, rbt wrote: Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. First of all, http://groups.google.de/groups?sel

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

2005-02-22 Thread Fuzzyman
Max M wrote: > Fuzzyman wrote: > > Mike Dee wrote: > > >>#!/usr/bin/env python > >># -*- coding: UTF-8 -*- > > > This will mean string literals in your source code will be encoded as > > UTF8 - if you handle them with normal string operations you might get > > funny results. > > It means that you

Re: searching pdf files for certain info

2005-02-22 Thread Andreas Lobinger
Aloha, rbt wrote: Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. First of all, http://groups.google.de/groups?selm=400CF2E3.29506EAE%40net

Flow chart (function tree) & cross references

2005-02-22 Thread qwweeeit
Hi all, I am developing in Python (as a GUI I choosed Qt). To increase my expertise, besides reading manuals & tutorials, I am studying a big program developed in the language of my choice, and related with my project (to develop a card game). For that reason I choosed PySol (also if the GUI part u

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

2005-02-22 Thread Duncan Booth
Max M wrote: > And this string will automatically be utf-8 encoded: > > st = 'æøå' > > So you should be able to convert it to unicode without giving an > encoding: > > ust = unicode(st) > No. Strings have no knowledge of their encoding. As you describe the string will be utf-8 encoded, but

Re: 'modal dialogs' with Tkinter

2005-02-22 Thread Eric Brunel
On 22 Feb 2005 06:03:14 -0800, Sean McIlroy <[EMAIL PROTECTED]> wrote: I'd like to have a function f such that, when f is invoked, a Tk window w is presented in which a number of variables can be modified, and f returns the values that are indicated by the relevant menus/checkbuttons/etc at the tim

problem with PythonCard -> wxPython -> _core.py -> class point -> __getitem__

2005-02-22 Thread It's me
I've built a Python application using PythonCard 1.9 and Python 2.3 running under Windows XP. Everything works except that when I use the keyboard instead of the mouse to do certain operations in a data entry field (like Shift-Home), the program stops at line 1014 of wx-2.5.3-msw.ansi\wx\_core.py

Re: Flow chart (function tree) & cross references

2005-02-22 Thread Toby Dickenson
On Tuesday 22 February 2005 13:27, qwweeeit wrote: > Does someone knows something about function tree generation and cross > references? for trees of *module* dependencies: http://www.tarind.com/depgraph.html -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >