Re: any() and all() on empty list?

2006-03-30 Thread Paul McGuire
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Op 2006-03-30, Steven D'Aprano schreef <[EMAIL PROTECTED]>: > > > So, these flying elephants -- are they pink or not? > > They are both. > That would make them Schrödinger elephants! -- Paul -- http://mail.python.or

Re: a hobbyist's dilemma

2006-03-30 Thread Alex Martelli
John Salerno <[EMAIL PROTECTED]> wrote: > Now that I've learned much of Python, I'm sort of stuck with what to do > with it. I'm not a professional programmer, so I don't really have a use > for Python now. But I really want to come up with some neat uses for it > (for fun, and so I don't just sta

Re: Doc suggestions (was: Why "class exceptions" are not deprecated?)

2006-03-30 Thread Fredrik Lundh
Gerard Flanagan wrote: > > I've added some notes to the front-page. feel free to tweak/clarify (or > > post > > comments here or on the site). > > > > for now, I think it's worth trying to keep the text clean and reasonably > > read- > > able at all times, and use the comment function to add qu

Re: does python could support sequence of short or int?

2006-03-30 Thread Alex Martelli
bruno at modulix <[EMAIL PROTECTED]> wrote: > momobear wrote: > > but what about buffer is not be declared in python program, it comes > > from a C function. and what about I want to treat a string as a short > > list? > > > There are no "short" in Python. An integer is an integer is an integer.

Re: a hobbyist's dilemma

2006-03-30 Thread Kent Johnson
John Salerno wrote: > benchline wrote: > >>Since you want to learn to use python with a database you may want to >>try it with SQLite. > > The thing about mysql is that it's also the db used on my website, so I > figure it might be nice to learn that one in case I ever need to use > that db a

newbie: plain old object kernel already built in?

2006-03-30 Thread RK
I'm looking to do something like POJO/AOP in Python. (ref pojo, aspectj for Java, CodeFarms for C++ http://www.codefarms.com/ , esp see two-layer diagram #2 here: http://incode.sourceforge.net/index.html ). The thing with a two-layer design and plain old objects is you need a kernel to manage it,

Re: ANNOUNCE: xlrd 0.5.2 -- extract data from Excel spreadsheets

2006-03-30 Thread curt
the 2nd url seems to be a dead link? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to determine an object is "scriptable"

2006-03-30 Thread Peter Hansen
abcd wrote: > Daniel Evers wrote: > >>Right. You can check this e.g. with >> >>hasattr(x, "__getitem__") >> >>because the __getitem__ method is used for indexing. > > Thanks...that is what I was looking for! Maybe, but it's not a particularly Pythonic way of doing it. Better is probabl

"module pointer files" for import (now and py2.5) ?

2006-03-30 Thread robert
I want to occasionally do a "redirected" import of a python module which is located offside of the legacy sys.path (Windows) - for example a tool is maintained within "cgi-bin" web stuff (while I do not want to add that whole folder's stuff to the sys.path) .pth adds only directories to the pyt

Re: a hobbyist's dilemma

2006-03-30 Thread John Salerno
Alex Martelli wrote: > John Salerno <[EMAIL PROTECTED]> wrote: > >> Now that I've learned much of Python, I'm sort of stuck with what to do >> with it. I'm not a professional programmer, so I don't really have a use >> for Python now. But I really want to come up with some neat uses for it >> (for

Re: a hobbyist's dilemma

2006-03-30 Thread Alex Martelli
John Salerno <[EMAIL PROTECTED]> wrote: ... > > Instead of hacking away on your own, I suggest you look around > > sourceforge and other such repositories of open-source programs: find ... > Great idea. It would be fun to actually contribute something to the > community, but I don't think I'

RE: printing under MS win

2006-03-30 Thread Tim Golden
[Dean Allen Provins] | My Linux-based Python/Tkinter application runs nicely, and printing | works just fine (to a user-selected file, or an "lpr" device specified | in the Entry box). Alas, the user wants to run it under MS | Win, and of | course will want to print the canvas for posterity. |

Re: LDTP 0.4.0 released !!!

2006-03-30 Thread Paul Boddie
Ben Finney wrote: > > Most projects have a consistent "what is this thing and why should you > care" paragraph in every release announcement; this would be the place > to make clear the association with the forum where it's posted. Indeed. There have been a few announcements in comp.lang.python.an

Re: Set Windows Environment Variable

2006-03-30 Thread Fuzzyman
Magnus Lycka wrote: > Duncan Booth wrote: > > Fuzzyman wrote: > >> In the ``win32api`` package there is a ``GetEnvironmentVariable`` > >> function, but no ``SetEnvironmentVariable``. Any options ? > > > > No, your only option is to find a solution which doesn't involve changing > > another process

Re: newbie: plain old object kernel already built in?

2006-03-30 Thread Larry Bates
RK wrote: > I'm looking to do something like POJO/AOP in Python. > > (ref pojo, aspectj for Java, CodeFarms for C++ > http://www.codefarms.com/ , esp see two-layer diagram #2 here: > http://incode.sourceforge.net/index.html ). > > The thing with a two-layer design and plain old objects is you nee

Re: printing under MS win

2006-03-30 Thread Dean Allen Provins
Tim Golden wrote: > [Dean Allen Provins] > > | My Linux-based Python/Tkinter application runs nicely, and printing > | works just fine (to a user-selected file, or an "lpr" device specified > | in the Entry box). Alas, the user wants to run it under MS > | Win, and of > | course will want to pri

Re: Set Windows Environment Variable

2006-03-30 Thread Duncan Booth
Fuzzyman wrote: > > Magnus Lycka wrote: >> Surely there must be a way to programatically set up the >> environment variables for not yet started processes? I.e. >> doing the same as when you manually change things in the >> control panel. I'm pretty sure many Windows installers do >> that, and wh

Re: Convert Word .doc to Acrobat .pdf files

2006-03-30 Thread kbperry
Justin, Your way appeared to work great, but now I just realized that the using the printer way destroys the table of contents and bookmark links. Rune's way would be perfect, but I don't see a macro created like that. I tried to create one from scratch, but it didn't work. I am now trying to se

Very stupid question.

2006-03-30 Thread Sullivan WxPyQtKinter
How to get the length of a file via build-in file object support? In Visual Basic there is len(file) of something like that. But in python, where is this property? Sorry for this stupid question, if it is. Thank you for help. -- http://mail.python.org/mailman/listinfo/python-list

Re: Set Windows Environment Variable

2006-03-30 Thread Fredrik Lundh
Fuzzyman wrote: > I *believe* that ``SetEnvironmentVariable`` exists in the underlying > windows API, but that it isn't wrapped by the win32api extension. SetEnvironmentVariable does the same thing as assignment to os.environ. The only way to set the environment for another process is to create

Re: Very stupid question.

2006-03-30 Thread Sullivan WxPyQtKinter
In addition, f=file('filename','r');len(f.read()) is quite expensive in my point of view, If the file is serveral MB or larger. -- http://mail.python.org/mailman/listinfo/python-list

Re: Very stupid question.

2006-03-30 Thread Fredrik Lundh
"Sullivan WxPyQtKinter" wrote: > How to get the length of a file via build-in file object support? In > Visual Basic there is len(file) of something like that. But in python, > where is this property? import os size = os.path.getsize(filename) -- http://mail.python.org/mailman/listinfo/pyt

Re: Very stupid question.

2006-03-30 Thread Sebastjan Trepca
Check os.stat() function here http://docs.python.org/lib/os-file-dir.html-- Sebastjanhttp://www.trepca.si/blog On 30 Mar 2006 09:34:32 -0800, Sullivan WxPyQtKinter <[EMAIL PROTECTED]> wrote: In addition, f=file('filename','r');len(f.read()) is quite expensive inmy point of view, If the file is serv

Re: Very stupid question.

2006-03-30 Thread Jorge Godoy
"Sullivan WxPyQtKinter" <[EMAIL PROTECTED]> writes: > How to get the length of a file via build-in file object support? In > Visual Basic there is len(file) of something like that. But in python, > where is this property? > > Sorry for this stupid question, if it is. pydoc osand then look for

Re: Very stupid question.

2006-03-30 Thread Sebastjan Trepca
On 3/30/06, Sullivan Zheng <[EMAIL PROTECTED]> wrote: Wow, seems I am not that supid. Why python does not include this function in the file object. It is almost a tradition in other languages...   import os   os.stat(path).st_size   really not elegant or OO.True.-- Sebastjanhttp://www.trepca.si/blo

PIL ImageDraw line not long enough

2006-03-30 Thread Bob Greschke
I've resorted to actually drawing all of the characters of the alphabet on a graph to avoid having to drag around font files. It's mostly just uppercase characters, so it's not too bad. But I noticed that some of the line segments have to be extended one pixel longer than they should be in ord

Re: Very stupid question.

2006-03-30 Thread Benji York
On 3/30/06, *Sullivan Zheng* <[EMAIL PROTECTED]> wrote: > Wow, seems I am not that supid. Why python does not include this > function in the file object. It is almost a tradition in other > languages... > really not elegant or OO. A file isn't an object. You can get a "file

SimpleXMLRPCServer

2006-03-30 Thread Andreas R.
Hello everyone, I'm doing some experiments with the SimpleXMLRPCServer in Python, and I've found it to be an excellent way to do high-level network operations. However, is there a way to enable "two-way" communication using XML-RPC? By that I mean, can the server contact all the clients? Thank

Re: a hobbyist's dilemma

2006-03-30 Thread John Salerno
Alex Martelli wrote: > John Salerno <[EMAIL PROTECTED]> wrote: >... >>> Instead of hacking away on your own, I suggest you look around >>> sourceforge and other such repositories of open-source programs: find >... >> Great idea. It would be fun to actually contribute something to the >> co

Re: Very stupid question.

2006-03-30 Thread Peter Hansen
On 3/30/06, *Sullivan Zheng* <[EMAIL PROTECTED] > wrote: > > Wow, seems I am not that supid. Why python does not include this > function in the file object. It is almost a tradition in other > languages... > > import os > > os.stat(path).st

Re: Quick Question regarding Frames

2006-03-30 Thread Dave Mandelin
I'm glad to have helped. Good luck with your project. -- Want to play tabletop RPGs over the internet? Check out Koboldsoft RPZen:http://www.koboldsoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleXMLRPCServer

2006-03-30 Thread infidel
> I'm doing some experiments with the SimpleXMLRPCServer in Python, > and I've found it to be an excellent way to do high-level network > operations. > > However, is there a way to enable "two-way" communication using XML-RPC? > By that I mean, can the server contact all the clients? To do that yo

Re: Updated: python ctype question about "access violation reading location 0x5a5a5a5a"

2006-03-30 Thread Dave Mandelin
First guess is that you are passing a Python function to something that expects a C function. Try looking at gencb.py in DynWin. -- Want to play tabletop RPGs over the internet? Check out Koboldsoft RPZen:http://www.koboldsoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI in python

2006-03-30 Thread Dave Mandelin
A friend of mine recently used PythonCard and he found it pretty good. I use wxPython, which is what PythonCard is based on, and I think it's very good, but it's more work to get started with than PythonCard. -- Want to play tabletop RPGs over the internet? Check out Koboldsoft RPZen:http:

Re: Set Windows Environment Variable

2006-03-30 Thread Fuzzyman
Fredrik Lundh wrote: > Fuzzyman wrote: > > > I *believe* that ``SetEnvironmentVariable`` exists in the underlying > > windows API, but that it isn't wrapped by the win32api extension. > > SetEnvironmentVariable does the same thing as assignment to os.environ. > > The only way to set the environmen

ANN: htmlbuilder.py - another HTML generator

2006-03-30 Thread Gerard Flanagan
In the hope that it may be useful, a simple Html Generator: http://gflanagan.net/site/python/htmlbuilder/htmlbuilder.py It requires 'elementtree' : http://www.effbot.org/zone/element-index.htm Example: html = HtmlBuilder( doctype='strict') page = html.page('Test Page') page.comm

Re: any() and all() on empty list?

2006-03-30 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > No, all(seq) is true if you can't point to a specific element in seq > > that's false. > > No, all(seq) is true if every element in seq is true. Surely that's a > more intuitive definition than your definition by what you can't do. They are differen

Re: python challenge question (string manipulation)

2006-03-30 Thread Caleb Hattingh
Felipe I get the same results as you. You make a good point about not iterating when it's not needed. I played around with your test code and found some interesting things: 1. enumerate vs. range(len()) has very little overhead (something I have wondered about) In my code, making the change c

Re: ipv6 validation

2006-03-30 Thread jiri . juranek
thanks a lot for this solution. Next thing: how may i find out that that address is multicast one? is there some easy possibility or i have to use regex now? thanks -- http://mail.python.org/mailman/listinfo/python-list

tkinter: not freeing memory like I'd expect

2006-03-30 Thread Benjamin Rutt
I have a bunch (e.g. 40) of tkinter Text objects in a gui on a linux machine, tracking monitoring info per host. They accumulate up to 500MB of text data (according to /bin/top) over time reading from sockets. I want to release this memory first by clearing all the text contents, but keeping the

Re: Non-GUI source code browser with file system tree view

2006-03-30 Thread John J. Lee
bruno at modulix <[EMAIL PROTECTED]> writes: [...] > emacs + emacs code browser. + Tramp. (distributed with emacs, but it's good to know what documentation you need to be looking at) effbot's suggestion of rsync seems good though -- always assuming you can run rsync on the remote machine, of cour

Re: ldap usage

2006-03-30 Thread Jed Parsons
> Which LDAP server are you using? You can switch off this behaviour > with OpenLDAP. See man 5 slapd.conf, allow . I don't have anything other than user access. Good to know about this feature, though. You've been very helpful - I really appreciate it. Can you recommend any favorite books

Matplotlib: How to set number of ticks on an axis?

2006-03-30 Thread Caleb Hattingh
Hi I tried several Google searches to no avail. I read through pretty much most of the online docs at the matplotlib sourceforge site, but didn't find what I was looking for. I went through the axis.py and ticker.py code today, trying to find out how to set the number of points (ticks) on an axi

Re: New Python website, new documentation ?

2006-03-30 Thread John J. Lee
Tim Parkin <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > >Hi, > > > >I was wondering : as there has been a change in python.org website with > >a new design, is it planned for the documentation section to be > >revamped as well ? If yes, would it be just a appearance renewal or > >wo

Re: Convert Word .doc to Acrobat .pdf files

2006-03-30 Thread Caleb Hattingh
If you can find some API documentation for PDFMWord.dll, you can call its methods with the ctypes python module. Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: a hobbyist's dilemma

2006-03-30 Thread Terry Hancock
You may find the attached files of interest. I wrote this PyGame script in order to teach my sons (ages 8 & 10) about some programming concepts. I intentionally avoided any function or class definitions, and tried to use minimal Python concepts. I think it's quite impressive that you can do a

Popen

2006-03-30 Thread david brochu jr
I am trying to write a script that starts a window process and then continues on to do other testing, but have encountered a little problem. When I start the exe (process to run) I cannot move on past that point in my script. Once started, the process is supposed to run in the background continuous

Re: Terminating a subprocess question

2006-03-30 Thread Ernesto
Ernesto wrote: > I'm opening a telnet session with the subprocess call below. I then > wait ten seconds and attempt to terminate the telnet window I created. > Unfortuantely, the telnet window remains after the 'TerminateProcess" > call below. This software works great for opening an executable

Tablelist 4.3

2006-03-30 Thread Arne Meissner
Hello everybody! I have downloaded the Tablelist 4.3 from http://www.nemethi.de/. Now I want to install it on my system Win XP. >From the distribution I have got the following information: " On Windows, use WinZip or some other program capable of unpacking the distribution file tablelist4_3.zi

[ANN] ftputil 2.1 released

2006-03-30 Thread Stefan Schwarzer
ftputil 2.1 is now available from http://ftputil.sschwarzer.net/download . Changes since version 2.0 - - Added new methods to the FTPHost class, namely makedirs, walk, rmtree. - The FTP server directory format ("Unix" vs. "Windows") is now set automatically (thanks to

Re: Matplotlib: How to set number of ticks on an axis?

2006-03-30 Thread John Hunter
> "Caleb" == Caleb Hattingh <[EMAIL PROTECTED]> writes: Caleb> It seems that the locater() classes are where I should Caleb> look, and there seem to be some defaults in ticker.py: Caleb> class AutoLocator(MaxNLocator): def __init__(self): Caleb> MaxNLocator.__init__(self, nbin

Re: ANN: htmlbuilder.py - another HTML generator

2006-03-30 Thread Gerard Flanagan
Gerard Flanagan wrote: > In the hope that it may be useful, a simple Html Generator: > > http://gflanagan.net/site/python/htmlbuilder/htmlbuilder.py > > It requires 'elementtree' : > http://www.effbot.org/zone/element-index.htm > > Example: > > html = HtmlBuilder( doctype='strict') > p

Re: any() and all() on empty list?

2006-03-30 Thread Steven D'Aprano
On Thu, 30 Mar 2006 11:28:54 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> > No, all(seq) is true if you can't point to a specific element in seq >> > that's false. >> >> No, all(seq) is true if every element in seq is true. Surely that's a >> more intuitive definition

Re: tkinter question

2006-03-30 Thread linuxnooby
>If you just create >a Toplevel and populate it with widgets, it will just display once the >control is returned to the Tkinter mainloop and no user input will be >needed. Thanks for explaining that. I borrowed the "after" method that you used in your first reply. It seems to do what I want (excep

Identifying filled circles in a scanned image

2006-03-30 Thread Douglas Douglas
Hi everybody. I have a paper form that I scan into an image. My user fills some circles in this paper form using black ink. Every form has ten rows with five circles each and the user fills only one circle for each row. I was wondering if I could use the Python Imaging Library to process these fo

Re: PIL ImageDraw line not long enough

2006-03-30 Thread nikie
Bob Greschke wrote > I've resorted to actually drawing all of the characters of the alphabet on a > graph to avoid having to drag around font files. It's mostly just uppercase > characters, so it's not too bad. > > But I noticed that some of the line segments have to be extended one pixel > longe

Re: any() and all() on empty list?

2006-03-30 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> No, all(seq) is true if every element in seq is true. Surely that's a > >> more intuitive definition than your definition by what you can't do. > > They are different? > Of course they are different -- they differ in the case of an empty > sequence

how to comment lot of lines in python

2006-03-30 Thread diffuser78
Like in C we comment like /* Bunch of lines of code */ Should we use docstring """ """ Or there is something else too ?? Every help is appreciated. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: how to comment lot of lines in python

2006-03-30 Thread Felipe Almeida Lessa
Em Qui, 2006-03-30 às 15:21 -0800, [EMAIL PROTECTED] escreveu: > Like in C we comment like > /* > Bunch of lines of code > */ > > Should we use docstring """ """ > > Or there is something else too ?? You should use a decent editor that could automatically comment/uncomment code upon your request

proposed proposal: set.values()

2006-03-30 Thread Paul Rubin
I'm thinking of proposing that a values method be added to set objects, analogously with dicts. If x is a set, x.values() would be the same as list(x). This feels logical, and it would allow unified treatment of dicts and sets in some contexts. Any objections? -- http://mail.python.org/mailman/

Re: Identifying filled circles in a scanned image

2006-03-30 Thread Claudio Grondi
Douglas Douglas wrote: > Hi everybody. > > I have a paper form that I scan into an image. My user fills some circles in > this paper form using black ink. Every form has ten rows with five circles > each > and the user fills only one circle for each row. > > I was wondering if I could use the Py

Re: urllib2 through basic auth'ed proxy

2006-03-30 Thread John J. Lee
Alejandro Dubrovsky <[EMAIL PROTECTED]> writes: [...] > How does one connect through a proxy which requires basic authorisation? > The following code, stolen from somewhere, fails with a 407: > [...code involving urllib2.ProxyBasicAuthHandler()...] > Can anyone explain me why this fails, or more i

Re: Identifying filled circles in a scanned image

2006-03-30 Thread nikie
Douglas Douglas schrieb: > Hi everybody. > > I have a paper form that I scan into an image. My user fills some circles in > this paper form using black ink. Every form has ten rows with five circles > each > and the user fills only one circle for each row. > > I was wondering if I could use the P

Re: Doc suggestions (was: Why "class exceptions" are not deprecated?)

2006-03-30 Thread rurpy
"Terry Reedy" wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Fredrik Lundh wrote: > > But the perception I get here, from responses like yours, > > is that such suggestions are unwelcome, and unlikely > > to be acted upon. > > FL is not the main doc maintainer. Even if

Re: Doc suggestions (was: Why "class exceptions" are not deprecated?)

2006-03-30 Thread rurpy
"Terry Reedy" wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Fredrik Lundh wrote: > > But the perception I get here, from responses like yours, > > is that such suggestions are unwelcome, and unlikely > > to be acted upon. > > FL is not the main doc maintainer. Even if

Re: RELEASED Python 2.4.3, final.

2006-03-30 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why would 2.4.4 come out after the final release of 2.5? Code patches are generally applied first to the development branch. Those that merely fix bugs usually get backported to the maintenance branch.* Releasing 2.4

Re: urllib2 through basic auth'ed proxy

2006-03-30 Thread John J. Lee
Alejandro Dubrovsky <[EMAIL PROTECTED]> writes: [...] > The proxy is squid. Python version is 2.3.4 (I read that this version has a > problem in that it introduces an extra return after the authorisation, but > it isn't even getting to that bit). And yes, going through firefox, > everything works

Re: how to comment lot of lines in python

2006-03-30 Thread Tim Chase
>>Or there is something else too ?? > > You should use a decent editor that could automatically > comment/uncomment code upon your request. In Vim, you can map a key to do the following: :s/^/# to comment the highlighted lines, and :s/^# to uncomment them. To map them, you c

Re: Identifying filled circles in a scanned image

2006-03-30 Thread Douglas Douglas
First of all. Thanks Claudio and nikie for your fast answers. What I want to do is process the forms automatically. Each circle match a letter (like in a quiz). So if the user select option A in a row, he fills the first circle. If he select option C in the next row, he fills the third circle of t

Re: proposed proposal: set.values()

2006-03-30 Thread Terry Reedy
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message news:[EMAIL PROTECTED] > I'm thinking of proposing that a values method be added to set > objects, analogously with dicts. If x is a set, x.values() would be > the same as list(x). This feels logical, and it would allow unified > tr

Re: Simple py script to calc folder sizes

2006-03-30 Thread Ben Cartwright
Caleb Hattingh wrote: > Your code works on some folders but not others. For example, it works > on my /usr/lib/python2.4 (the example you gave), but on other folders > it terminates early with StopIteration exception on the > os.walk().next() step. > > I haven't really looked at this closely enou

Re: Identifying filled circles in a scanned image

2006-03-30 Thread Paul McGuire
Douglas Douglas wrote: > The problem is that when the scanner takes the pages it > doesn't put it in the same exact position in its bed. There's not a lot of > difference, but there's a little. Your forms should have some reference registration marks or targets in opposite corners. Find these fi

Re: Content Management System

2006-03-30 Thread John J. Lee
Jeff <[EMAIL PROTECTED]> writes: > Water Cooler v2 wrote: > > I know what it is, and yet the knowledge of what a CMS is, is so vague > > that I find myself asking this question every now and then. I've > > googled and read the resources too. However, the knowledge is still not > > clear. It is so

Re: Doc suggestions (was: Why "class exceptions" are not deprecated?)

2006-03-30 Thread rurpy
"Fredrik Lundh" wrote: > [EMAIL PROTECTED] wrote > > Fredrik Lundh wrote: > > > [EMAIL PROTECTED] wrote: > > > > > > > > The OP points out an ambiguity in the docs, and as usual, > > > > gets told he can't read, etc. How typical. > > > > > > where did anyone tell the OP that he can't read? > > >

Re: embed notepad into a frame widget

2006-03-30 Thread Matt
Diez B. Roggisch wrote: > You are pretty wrong being sure :) Under windows, it is indeed possible to > embed certain applications into others - the related technical term is > conveniently called OLE (Object lining and embedding). Thanks, at least I didnt spend two much time on it :) -Matt --

Re: Find similar images using python

2006-03-30 Thread John J. Lee
Richie Hindle <[EMAIL PROTECTED]> writes: > [Thomas] > > How can I use python to find images that looks quite similar? > > Have you looked at http://www.imgseek.net/ ? It's an Open Source Python photo > collection manager that does exactly what you're asking for. Maybe... I don't recall if it h

logging producing redundant entries

2006-03-30 Thread Jed Parsons
Hi, I'm using the logging module for the first time. I'm using it from within Zope Extensions. My problem is that, for every event logged, the logger is producing multiple identical entries with the timestamp the same down to the millisecond. Is this something I'm doing wrong? Log snippet:

Newbie: splitting dictionary definition across two .py files

2006-03-30 Thread kar1107
Hi, I'm fairly new to python. I like to define a big dictionary in two files and use it my main file, build.py I want the definition to go into build_cfg.py and build_cfg_static.py. build_cfg_static.py: target_db = {} target_db['foo'] = 'bar' build_cfg.py target_db['xyz'] = 'abc' In build.py, I

Re: Identifying filled circles in a scanned image

2006-03-30 Thread Claudio Grondi
Douglas Douglas wrote: > First of all. Thanks Claudio and nikie for your fast answers. > > What I want to do is process the forms automatically. Each circle match a > letter (like in a quiz). So if the user select option A in a row, he fills the > first circle. If he select option C in the next ro

Re: any() and all() on empty list?

2006-03-30 Thread Carl Banks
Steven D'Aprano wrote: > On Thu, 30 Mar 2006 11:28:54 -0800, Paul Rubin wrote: > > > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> > No, all(seq) is true if you can't point to a specific element in seq > >> > that's false. > >> > >> No, all(seq) is true if every element in seq is true. Surely th

Re: Newbie: splitting dictionary definition across two .py files

2006-03-30 Thread Ben Cartwright
[EMAIL PROTECTED] wrote: > I like to define a big dictionary in two > files and use it my main file, build.py > > I want the definition to go into build_cfg.py and build_cfg_static.py. > > build_cfg_static.py: > target_db = {} > target_db['foo'] = 'bar' > > build_cfg.py > target_db['xyz'] = 'abc' >

Re: Newbie: splitting dictionary definition across two .py files

2006-03-30 Thread Ben Finney
[EMAIL PROTECTED] writes: > I'm fairly new to python. I like to define a big dictionary in two > files and use it my main file, build.py > > I want the definition to go into build_cfg.py and build_cfg_static.py. That sounds like a very confusing architecture, and smells very much like some kind o

Re: Tablelist 4.3

2006-03-30 Thread ezd
Arne Meissner wrote: > Hello everybody! > > I have downloaded the Tablelist 4.3 from http://www.nemethi.de/. > > Now I want to install it on my system Win XP. > > From the distribution I have got the following information: > " > On Windows, use WinZip or some other program capable of unpacking the

Credit card API Sol with python interface

2006-03-30 Thread Sakcee
Hi does anybody know of any credit card merchant slution with python API. we used to use cybercash long time ago, but are willing to switch to something good and not pricy. we want to accept credit cards and process them. something with python wrapper will be great , as I would not have to build

Re: urllib2 through basic auth'ed proxy

2006-03-30 Thread Alejandro Dubrovsky
John J. Lee wrote: > FWIW, at a glance, Python 2.3.4 has neither of the bugs I mentioned, > but the code I posted seems to work with 2.3.4. I'm not particularly > interested in what's wrong with 2.3.4's version or your usage of it > (probably both), since bugfix releases for 2.3 are no longer > h

Pylint-like source code reformatter

2006-03-30 Thread Brian L. Troutwine
I've recently developed a need for a python source code re-formatter, ideally conforming to the sort of style that pylint enforces. I don't know of any, and my googling wasn't very productive. Does anyone know of anything? Stand-alone or vim based both work for me, though stand-alone would be prefe

Re: proposed proposal: set.values()

2006-03-30 Thread Paul Rubin
"Terry Reedy" <[EMAIL PROTECTED]> writes: > 1. It is pure duplication that *adds* keystrokes. Nobody says you shouldn't use list(s) if you know you're dealing with a set. The idea of s.values() is so you can duck-type between dicts and sets. > 2. It copies the wrong aspect of dict. A set is lik

Re: does python could support sequence of short or int?

2006-03-30 Thread momobear
thanks for help. formerly I only know to use the struct like bellow: >>> unpack('hhl', '\x00\x01\x00\x02\x00\x00\x00\x03') Great, python can work like this: >>> l = list(struct.unpack('h'*(len(s)/2), s)) I will try to use the numarray also >>>there are some good exensions for Python, >>>numarray an

How to determine COM objects/functions

2006-03-30 Thread Scott Brown
Hi, I'm new to this list. I have looked around the archives for this question but haven't seen an answer for it yet (though there are a lot of messages to sift through). Say I'm operating with win32com.client and I am polling a certain application...Internet Explorer perhaps. Is there a way

Illegal Immigration, the Non-Issue of the Week??????????????

2006-03-30 Thread Expert Humor
The way our politicians rushed to talk about illegal immigration this week, maybe they thought it came with a free lunch. They won't do anything about it, but it will get them some money. The Expert provides the details at: http://www.ExpertHumor.com/ *** Free account sponsored by SecureIX

Another proposed proposal: operator.bool_and / bool_or

2006-03-30 Thread Paul Rubin
The suggestion is to add boolean and/or functions to the operator module, useful with "reduce". For some reason I thought these were already present, but they're not (were they removed?). There are already and_ and or_, but these are bitwise functions, not boolean operations. bool_and and bool_o

Re: Another proposed proposal: operator.bool_and / bool_or

2006-03-30 Thread Klaas
>def any(seq): return reduce(bool_or, seq, False) > def all(seq): return reduce(bool_and, seq, True) Any other use cases? These will be built-in in 2.5 -Mike -- http://mail.python.org/mailman/listinfo/python-list

Will illegal immigrants get deported?.........Of course not.....................

2006-03-30 Thread Expert Humor
Our politicians just wanted to blow us some sunshine. Get the details from The Expert: http://www.ExpertHumor.com/ *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** -- http://mail.python.org/mailman/list

Re: logging producing redundant entries

2006-03-30 Thread alex23
Jed Parsons wrote: > My problem is that, for every event logged, the logger is producing > multiple identical entries with the timestamp the same down to the > millisecond. > import logging > # basicConfig for python 2.3 > logging.basicConfig() [...] > _logger.addHandler(_handl

Amnesty for illegal immigrants will not happen this time.....................

2006-03-30 Thread Expert Humor
Our politicians lead the league in all talk, no action. Is blowing us some sunshine good enough? Read what The Expert thinks: http://www.ExpertHumor.com/ *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***

Re: How to determine COM objects/functions

2006-03-30 Thread Gregor Horvath
Servus, Scott Brown schrieb: > Say I'm operating with win32com.client and I am polling a certain > application...Internet Explorer perhaps. Is there a way to find out all > available objects and associated functions? Using dir() on the COM In PythonWin under Tools Menu there is a COM Browser.

How to debug python code?

2006-03-30 Thread sushant . sirsikar
hi, I am new to Python programming.I am not getting exactly pdb.Can anyone tell me effective way to debug python code? Please give me any example. Looking for responce. Thank You. Sushant -- http://mail.python.org/mailman/listinfo/python-list

>@>@>@>@>GET MORE CHICKS............LEARN GUITAR.............

2006-03-30 Thread Expert Humor
Chicks dig guitar players. So get more chicks! Learn how to play guitar! http://www.ExpertHumor.com/LearnGuitar.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** -- http://mail.python.org/mailma

Re: Connecting to gnuplot with Popen?

2006-03-30 Thread Markus Weihs
> I want to control gnuplot with a python program. Hi Anton, here is a little snippet using os.popen: import os gp = os.popen('gnuplot -persist', 'w') print >> gp, "set yrange [-300:300]" for n in range(300): print >> gp, "plot %i*cos(x)+%i*log(x+10)" % (n,150-n) Rega

Best IDE for Python?

2006-03-30 Thread sushant . sirsikar
hi, I want to know which is the best IDE for python.Please if possible mention the features of the IDE. Thank You. Sushant -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   >