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

2006-03-29 Thread Paul Rubin
Ron Adam <[EMAIL PROTECTED]> writes: > In this view and empty set can be True for all(). Is it posible > 'all([])' is undefined? Here, none() and all() return contradicting > values. So maybe the correct version may be... I don't see any contradiction. all([]) and none([]) are both true. Any

urllib2 through basic auth'ed proxy

2006-03-29 Thread Alejandro Dubrovsky
I see from googling around that this is a popular topic, but I haven't seen anyone saying "ah, yes, that works", so here it goes. How does one connect through a proxy which requires basic authorisation? The following code, stolen from somewhere, fails with a 407: proxy_handler = urllib2.ProxyHand

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread mbukhin
Thanks for the 'debug mode' tip. My file is only 24k (a photo) and the whole thing makes it to the FTP server. It's just the command never returns so my program cannot continue execution. When I do turn debugging on, the last command I see is: *resp* '150 Connection accepted' Could it be my FT

Re: Multiplying sequences with floats

2006-03-29 Thread Caleb Hattingh
Hi Dennis Sure, I get it. I do most of my work in Delphi, which is, shall we say, not lax about floating-point types. Thinking about this more, I realise my initial interest was in looking at the // operator as something new, whereas I now see it probably just wraps math.floor(); obviously then

Re: pySerial: write in a blocking mode

2006-03-29 Thread pdalet
Hi I have developped a python script to control a rs232c rs485 converter, named pyRS485 with pythoncard on windows. ftp-champo.ac-toulouse.fr/pub/btseo/pdalet/python/ python 2.4 Electronics Applications 20050902.exe The best solution is to send the last character with interrupt. when the TDR is

Re: CGI redirection: let us discuss it further

2006-03-29 Thread Sullivan WxPyQtKinter
Well, in that case, the internal direction is just what I need. Thank you so much for help. -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a language/framework

2006-03-29 Thread bruno at modulix
walterbyrd wrote: >>You can bet it'll be plain old cgi - possibly with an outdated Pyton version. > > I think you are right. In practical terms, what does that mean? Will I > not be able to use modules? Will I not be able to use frameworks? It means that you will be limited to what can run with

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

2006-03-29 Thread Ed Singleton
On 29/03/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote > > write a tutorial as good as what is already there. But what I can > > do is report problems I find when using it, and make suggestions > > about how to avoid those problems. > > There's no shortage of ideas -- nor

Re: No Cookie: how to implement session?

2006-03-29 Thread bruno at modulix
Sullivan WxPyQtKinter wrote: > I do not want to use Cookies in my site since not all web browser > support it well and sometimes people close cookie functioning for > security reasons. Too bad for them. The only other way to support session is by encoding the session id in the request, and it's m

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

2006-03-29 Thread vdrab
> I'm completely on board with the semantics for any(). But all() bothers > me. If all() receives an empty list, it will return True, and I don't > like that. To me, all() should be a more restrictive function than any(), > and it bothers me to see a case where any() returns False but all() > re

Re: Difference between 'is' and '=='

2006-03-29 Thread Joel Hedlund
> There's no requirement that the socket module or > anything else return values using the same object that the > socket.AF_UNIX constant uses. Ouch. That's certainly an eyeopener. For me, this means several things, and I'd really like to hear people's thoughts about them. It basically boils do

Re: tips for this exercise?

2006-03-29 Thread bruno at modulix
John Salerno wrote: > I'm working on another exercise now about generating random numbers for > the lottery. What I want to do is write a function that picks 5 random > numbers from 1-53 and returns them. Here's what I have so far: > > numbers = range(1, 54) > > def genNumbers(): > for x in ra

Re: tips for this exercise?

2006-03-29 Thread bruno at modulix
Paul Rubin wrote: (snip) > Why is everyone using shuffle? > > >>> import random > >>> random.sample(xrange(1,41), 5) > [24, 15, 9, 39, 19] Great. Didn't know that one. -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTEC

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

2006-03-29 Thread Fredrik Lundh
Ed Singleton wrote: > This would be a perfect situation for a wiki. I think it would be a > good experiment to have a wiki containing the documentation (separate > from the main documentation and clearly marked experimental for the > moment), and to see if it did self-organise as wikis often do.

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > I'm using the ftp library (layer on top of sockets) to transfer files > from a series 60 to an ftp site. everything works fine, the whole > file gets uploaded but the command never returns! so > i call: > > ftp.storbinary('STOR ' + filename,F,1024) # store the image >

Re: Difference between 'is' and '=='

2006-03-29 Thread Fredrik Lundh
Joel Hedlund wrote: > For me, this means several things, and I'd really like to hear people's > thoughts about them. > > It basically boils down to "don't ever use 'is' unless pushed into a corner, > and nevermind what PEP8 says about it". nonsense. > Identity checks can only be done safely to c

Re: Difference between 'is' and '=='

2006-03-29 Thread Joel Hedlund
sorry > You compare a module.CONSTANT to the result of an expression s/an expression/a binary operation/ /joel Joel Hedlund wrote: >>If it weren't for the current CPython optimization (caching small >>integers) > > > This has already been covered elsewhere in this thread. Read up on it. >

mod_python bytecompiling

2006-03-29 Thread mneagul
Hello! I am writing a small program using mod_python publisher extension. I have created several python files and imported them in a `main' file. How can I stop mod_python to byte compile the files? I want to make changes to the files and see result imediately! In the current setup only

Re: mod_python bytecompiling

2006-03-29 Thread Fredrik Lundh
"mneagul" wrote: >I am writing a small program using mod_python publisher extension. I > have created several python files and imported them in a `main' file. >How can I stop mod_python to byte compile the files? I want to make > changes to the files and see result imediately! > >In th

Re: Difference between 'is' and '=='

2006-03-29 Thread Max M
Joel Hedlund wrote: >> There's no requirement that the socket module or >> anything else return values using the same object that the >> socket.AF_UNIX constant uses. > > > Ouch. That's certainly an eyeopener. > > For me, this means several things, and I'd really like to hear people's > thought

Re: mod_python bytecompiling

2006-03-29 Thread grahamd
Fredrik Lundh wrote: > "mneagul" wrote: > > >I am writing a small program using mod_python publisher extension. I > > have created several python files and imported them in a `main' file. > >How can I stop mod_python to byte compile the files? I want to make > > changes to the files and se

Re: detecting drives for windows and linux

2006-03-29 Thread Florian Diesch
[EMAIL PROTECTED] (Alex Martelli) wrote: > Florian Diesch <[EMAIL PROTECTED]> wrote: >... >> >> are and want to do it anyway?) Linux puts the whole file system >> >> (including mounted iPods, ISOs and NTFS drives) in one hierarchy. >> > >> > Yes, but you may still want to distinguish (because

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

2006-03-29 Thread Ron Adam
Paul Rubin wrote: > Ron Adam <[EMAIL PROTECTED]> writes: >> In this view and empty set can be True for all(). Is it posible >> 'all([])' is undefined? Here, none() and all() return contradicting >> values. So maybe the correct version may be... > > I don't see any contradiction. all([]) and n

Re: mod_python bytecompiling

2006-03-29 Thread mneagul
Problem solved!!! Thank You! -- http://mail.python.org/mailman/listinfo/python-list

Content Management System

2006-03-29 Thread Water Cooler v2
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 vague. Me: Just what is a content management system? Myself: A place whe

Re: No Cookie: how to implement session?

2006-03-29 Thread Paul Rubin
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > Do we have the same dictionary? > > Ephemeral, as in "mayflies are ephemeral", means "of short life"... > A cookie with a built-in expiration would, to my mind, be "ephemeral" Ephemeral cookies in web-head jargon are cookies with no spec

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

2006-03-29 Thread Paul Rubin
Ron Adam <[EMAIL PROTECTED]> writes: > Just thinking about things. I really just want what is best for > Python in the long term and am not trying to be difficult. I'm sorry, maybe it's the math geek in me, but I just see all those suggestions about "not not S" as being contorted. It's obvious t

Re: doctest, unittest, or if __name__='__main__'

2006-03-29 Thread Ben Finney
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > http://ianbicking.org/docs/pytest-presentation/pytest-slides.html > (see the "why not unittest" slide for a list of issues with > unittest) To see many of these points rebutted, see this post: http://dirtsimple.org/2005/08/ruby-gems-python-eggs-a

Re: 1.090516455488E9 / 1000000.000 ???

2006-03-29 Thread Ben Finney
Tim Roberts <[EMAIL PROTECTED]> writes: > "Math" <[EMAIL PROTECTED]> wrote: >>And yes, I really need this accuracy.. > > Then you need to understand that you don't really HAVE this accuracy. With the Decimal type, you do. >>> import decimal >>> decimal.getcontext().prec = 5 >>> deci

Re: Difference between 'is' and '=='

2006-03-29 Thread Joel Hedlund
>> For me, this means several things, and I'd really like to hear people's >> thoughts about them. > you need to spend more time relaxing, and less time making up arbitrary > rules for others to follow. I'm very relaxed, thank you. I do not make up rules for others to follow. I ask for other peo

Re: tips for this exercise?

2006-03-29 Thread Steven D'Aprano
On Tue, 28 Mar 2006 15:18:03 -0800, Paul Rubin wrote: > Why is everyone using shuffle? That's a good question. I don't have a good answer. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

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

2006-03-29 Thread Carl Banks
Steve R. Hastings wrote: > I'm completely on board with the semantics for any(). But all() bothers > me. If all() receives an empty list, it will return True, and I don't > like that. To me, all() should be a more restrictive function than any(), > and it bothers me to see a case where any() ret

Re: Content Management System

2006-03-29 Thread J2be
> Me: You can have a file-system on a common network server. I can even > have a network server and give remote access to people over a VPN. I > can host content on a terminal server, I can give them VNC clients, or > an RDP client, and let them browse what they want to. No, because the contents a

Re: tips for this exercise?

2006-03-29 Thread Fredrik Lundh
Paul Rubin wrote: > Why is everyone using shuffle? maybe they're all stuck on 2.2 ? $ python2.2 >>> import random >>> random.shuffle > >>> random.sample Traceback (most recent call last): File "", line 1, in ? AttributeError: 'module' object has no attribute 'sample' >>> -- http://mail.

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

2006-03-29 Thread Fredrik Lundh
>> (I'm actually tempted to just copy and paste each page from the >> tutorial into the current wiki but I'd hate for it all to be deleted >> after doing that). > > just do it! btw, one alternative could be to use an infogame site for this purpose: http://infogami.com this gives you revision

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

2006-03-29 Thread Steven D'Aprano
At risk of flogging a dead horse... On Wed, 29 Mar 2006 01:01:00 -0800, vdrab wrote: >> I'm completely on board with the semantics for any(). But all() bothers >> me. If all() receives an empty list, it will return True, and I don't >> like that. To me, all() should be a more restrictive funct

Re: UML from py sources

2006-03-29 Thread Ravi Teja
No! That's Python from UML. OP asked for the opposite. -- http://mail.python.org/mailman/listinfo/python-list

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

2006-03-29 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > While the implemented behaviour might be more practical than the > alternatives, it is still worrying paradoxical. If "All sheep are woolly", > then obviously it must also be true that "Any sheep is woolly". More > formally, if all(X), then any(X) -- ex

Python and TSAPI / TAPI

2006-03-29 Thread loguser
Hello, I'm now trying to get our PBX working with our Python application, but I have no success so far. I have searched for both tsapi and tapi python wrappers, but with no luck, I only found ruby (incompleted) one for tsapi. No problem, I decided to write my own, using pythonwin and ctypes. Howe

Re: Content Management System

2006-03-29 Thread William Tasso
[Follow-ups suggested] Fleeing from the madness of the J2be - IT Services jungle J2be <[EMAIL PROTECTED]> stumbled into news:comp.lang.python,comp.lang.php,alt.www.webmaster,comp.infosystems.www.authoring.misc,microsoft.public.sharepoint.portalserver and said: [attribution lost] >> You will ju

telnet session

2006-03-29 Thread eight02645999
hi i am using a telnet session to simulate an authentication mechanism USER = "user" PASSWORD = "password" try: telnet = telnetlib.Telnet(HOST) telnet.set_debuglevel(5) telnet.read_until("login: ") telnet.write(USER + "\n") telnet.read_until("Password: ")

telnet session

2006-03-29 Thread eight02645999
hi i am using a telnet session to simulate an authentication mechanism USER = "user" PASSWORD = "password" try: telnet = telnetlib.Telnet(HOST) telnet.set_debuglevel(5) telnet.read_until("login: ") telnet.write(USER + "\n") telnet.read_until("Password: ")

Re: telnet session

2006-03-29 Thread Paul Rubin
[EMAIL PROTECTED] writes: > When i purposely input a wrong password, it "hangs" at the login prompt > waiting for > login and Password. The host i am telnetting to is a unix server. > How can i "exit" this login prompt if the user keys in wrong password > in my script? It looks to me like after y

Re: sending ctrl C to a program

2006-03-29 Thread Dale Strickland-Clark
[EMAIL PROTECTED] wrote: > hi > i have a program that works very similar to tail -f in Unix > It will need a Ctrl-C in order to break out of the program. > I wish to run this program using python (either thru os.system() or > some other subprocess modules) and how can i pass Ctrl-C to this > progr

Re: pySerial: write in a blocking mode

2006-03-29 Thread Peter Hansen
Alejandro wrote: > Peter Hansen wrote: > >>Alejandro wrote: >> >>>I'm using pySerial to talk to a RS232 to RS485 converter. In order to >>>control the converter, I need to control the DTR line to enable/disable >>>de RS485 driver. >> >>This seems a little odd to me. We've used several RS232-RS485

Re: telnet session

2006-03-29 Thread Eddie Corns
[EMAIL PROTECTED] writes: >hi >i am using a telnet session to simulate an authentication mechanism >USER = "user" >PASSWORD = "password" >try: >telnet = telnetlib.Telnet(HOST) >telnet.set_debuglevel(5) >telnet.read_until("login: ") >telnet.write(USER + "\n") >

Re: Difference between 'is' and '=='

2006-03-29 Thread Duncan Booth
Joel Hedlund wrote: > It basically boils down to "don't ever use 'is' unless pushed into a > corner, and nevermind what PEP8 says about it". A quick grep[*] of the Python library shows the following common use-cases for 'is'. The library isn't usually a good indicator of current style though: a

Re: Content Management System

2006-03-29 Thread Kimmo Laine
"Water Cooler v2" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >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

Re: SEEK_SET defined?

2006-03-29 Thread Peter Hansen
Roger Miller wrote: > I see that the posixfile module is deprecated. Have the SEEK_SET, etc. > constants moved somewhere else, or do I need to define them myself? In Python 2.5 they have been added to the os module, but for now I think you are probably expected to just continue using posixfile o

Re: Difference between 'is' and '=='

2006-03-29 Thread Joel Hedlund
> [*] I discovered a neat feature I didn't know my editor had: grepping for > "<[c:python-keyword>is" Neat indeed. Which editor is that? Thanks for a quick and comprehensive answer, btw. Cheers! /Joel -- http://mail.python.org/mailman/listinfo/python-list

Validating Syntax only with PyParser_SimpleParseString ?

2006-03-29 Thread gaston . gloesener
I am seeking for a method to parse single lines of Python code (infact they are only formulas, so I generate a line like RESULT=). I do only want to know if the syntax is correct and if there is an error best would be to know where. I did find PyParser_SimpleParseString which does return a node s

Find similar images using python

2006-03-29 Thread Thomas W
How can I use python to find images that looks quite similar? Thought I'd scale the images down to 32x32 and convert it to use a standard palette of 256 colors then compare the result pixel for pixel etc, but it seems as if this would take a very long time to do when processing lots of images. Any

Re: Difference between 'is' and '=='

2006-03-29 Thread Duncan Booth
Joel Hedlund wrote: >> [*] I discovered a neat feature I didn't know my editor had: grepping >> for "<[c:python-keyword>is" > > Neat indeed. Which editor is that? Epsilon from www.lugaru.com. The drawback is that it costs real money although you can try the beta for the next version until it i

Re: Python plug-in

2006-03-29 Thread bruno at modulix
toto wrote: > Hi, > > I'm trying to find some howto, tutorial in order to create a python program > that will allow plug-in programming. I've found various tutos on how to > write a plug-in for soft A or soft B but none telling me how to do it in my > own programs. Do you have any bookmarks ?? Tr

Re: Seems like I want a pre-processor, but...

2006-03-29 Thread Carl Banks
Russell Warren wrote: > > the collections module was added in 2.4 > > Ah... sorry about that. I should have checked my example more closely. > What I'm actually doing is rebinding some Queue.Queue behaviour in a > "safe" location like this: > > def _get(self): > ret = self.queue.popleft() > D

C++ to python with boost.python: Exposing virtual bool operator()(int )=0

2006-03-29 Thread Pedro
Hello pythonians! ;-D , I have a little problem when I expose (assisted by boost.python) classes with virtual functions, specially with operator(). In the C++ code below I test two different implementations of a member function of A that takes as an argument the abstract class Base (see Option 1

Tkinter and fixed-size frames

2006-03-29 Thread msoulier
Hello, A friend is having an issue with Tkinter that I'm not able to help him with, so I'm posting here. He'd like to put something inside of a frame without the frame automagickally resizing. Example: from Tkinter import * root = Tk() # with these 2 frames by themselves, they are the # size

Re: Tkinter and fixed-size frames

2006-03-29 Thread Fredrik Lundh
"msoulier" <[EMAIL PROTECTED]> wrote: > Any suggestions on how to maintain the size of the frame when you pack > a label into it like this? calling pack_propagate(0) on the parent widget should work: http://effbot.org/tkinterbook/pack.htm#Tkinter.Pack.pack_propagate-method -- http://mail.

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

2006-03-29 Thread Tim Peters
[Steven D'Aprano] > ... > While the implemented behaviour might be more practical than the > alternatives, it is still worrying paradoxical. If "All sheep are woolly", > then obviously it must also be true that "Any sheep is woolly". More > formally, if all(X), then any(X) -- except for the case of

Re: Content Management System

2006-03-29 Thread Michael Ekstrand
Water Cooler v2 wrote: > So, again, where are the boundaries? What about non-public content? > What about access rights? Do you have seperate users on CMS's having > their seperate folders as well, where they could put their own private > content? Or, is the idea behind CMS about "sharing" and so t

Re: Find similar images using python

2006-03-29 Thread [EMAIL PROTECTED]
Use PIL..of course.. Sudharshan S -- http://mail.python.org/mailman/listinfo/python-list

Re: Find similar images using python

2006-03-29 Thread Scott David Daniels
Thomas W wrote: > How can I use python to find images that looks quite similar? Thought > I'd scale the images down to 32x32 and convert it to use a standard > palette of 256 colors then compare the result pixel for pixel etc, but > it seems as if this would take a very long time to do when process

Re: Find similar images using python

2006-03-29 Thread Diez B. Roggisch
Thomas W wrote: > How can I use python to find images that looks quite similar? Thought > I'd scale the images down to 32x32 and convert it to use a standard > palette of 256 colors then compare the result pixel for pixel etc, but > it seems as if this would take a very long time to do when proces

Re: Find similar images using python

2006-03-29 Thread [EMAIL PROTECTED]
I dont get it..cant the matching take place efficiently with PIL, only that you need to have a condition i.e if the mismatch exceeds a certain threshold, they are not similar, http://gumuz.looze.net/wordpress/index.php/archives/2005/06/06/python-webcam-fun-motion-detection/ Check the above link,

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

2006-03-29 Thread Fredrik Lundh
> btw, one alternative could be to use an infogame site for this purpose: > >http://infogami.com > > this gives you revision history, a permissions system (limiting editing to > registered users might be a good idea), comments, an associated blog, > voting, feeds, change logs, etc. alright, I

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread mbukhin
Thanks, but that didn't help either. Since storbinary is being called from the main script, I can't see where else it could be getting hung up. Are there any other debugging techniques I could explore? I'm sending a 24k image and it is viewable on the destination server, so it's making it over.

Re: Find similar images using python

2006-03-29 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I dont get it..cant the matching take place efficiently with PIL, only > that you need to have a condition i.e if the mismatch exceeds a certain > threshold, they are not similar, > > http://gumuz.looze.net/wordpress/index.php/archives/2005/06/06/python-webcam-fun-motio

Re: Parsing csh scripts with python

2006-03-29 Thread Steve Juranich
David Hirschfield wrote: > Is there a module out there that would be able to parse a csh script and > give me back a parse tree? > > I need to be able to parse the script, modify some variable settings and > then write the script back out so that the only changes are the > variables I've modified

Re: Content Management System

2006-03-29 Thread David Cary Hart
On Wed, 29 Mar 2006 15:19:05 +0300 "Kimmo Laine" <[EMAIL PROTECTED]> opined: > "Water Cooler v2" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >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

Re: pySerial: write in a blocking mode

2006-03-29 Thread Alejandro
Peter Hansen wrote: > Alejandro wrote: > > > > Yes. The device is very simple (I made it). > > Perhaps a very simple change to it would make it as convenient as the > commercial products. I vaguely recall (not having checked for over a > decade) that all they do is set the outgoing DTR line wh

Reminder: Bug Day this Friday, 31st of March

2006-03-29 Thread Georg Brandl
Hello, it's time for the 7th Python Bug Day, just before 2.5 alpha 1 is released. The aim of the bug day is to close as many bugs, patches and feature requests as possible, this time with a focus on small feature additions that can still go into the upcoming 2.5 alpha release. When? ^ The bu

excel application

2006-03-29 Thread luca72
Hello here is the code: from win32com.client import Dispatch packing = Dispatch("Excel.Application") packing.Visible = 1 packing.Workbooks.Add() #packing.Worksheets.Add() packing.ActiveSheet.Range("A1").ColumnWidth = 8 packing.ActiveSheet.Ran

Re: Find similar images using python

2006-03-29 Thread Richie Hindle
[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. -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/pyt

Re: pySerial: write in a blocking mode

2006-03-29 Thread Grant Edwards
On 2006-03-29, pdalet <[EMAIL PROTECTED]> wrote: > The best solution is to send the last character with > interrupt. when the TDR is empty an interrupt is generated. An > interrupt program is executed to change the state of dtr. No. That doesn't work. You have to wait until the transmit _shift_r

Re: pySerial: write in a blocking mode

2006-03-29 Thread Grant Edwards
On 2006-03-29, Peter Hansen <[EMAIL PROTECTED]> wrote: >>>This seems a little odd to me. We've used several RS232-RS485 >>>converters without needing to do that. Maybe a more sophisticated >>>device would eliminate this need? >> >> Yes. The device is very simple (I made it). > > Perhaps a very

Re: sending ctrl C to a program

2006-03-29 Thread Grant Edwards
On 2006-03-29, Dale Strickland-Clark <[EMAIL PROTECTED]> wrote: >> i have a program that works very similar to tail -f in Unix It >> will need a Ctrl-C in order to break out of the program. I >> wish to run this program using python (either thru os.system() >> or some other subprocess modules) and

Re: Validating Syntax only with PyParser_SimpleParseString ?

2006-03-29 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > I am seeking for a method to parse single lines of Python code (infact > they are only formulas, so I generate a line like RESULT=). I > do only want to know if the syntax is correct and if there is an error > best would be to know where. > > I did find PyParser_SimplePa

Re: Find similar images using python

2006-03-29 Thread Andrew
I did this once for a motion dection algorithm. I used luminescence calculations to determine this. I basically broke the image into a grid of nine (3x3) areas and calculated the luminescene for each section and if it changed signficantly enough then there has been motions. The more sections, th

Re: Parsing csh scripts with python

2006-03-29 Thread gene tani
Dave Benjamin wrote: > On Tue, 28 Mar 2006, David Hirschfield wrote: > > > I need to be able to parse the script, modify some variable settings and > > then write the script back out so that the only changes are the > > variables I've modified (comments, ordering of statements, etc. must > > remai

logging module, multiple handlers

2006-03-29 Thread [EMAIL PROTECTED]
hello, I use the logging module include in Python 2.4 distribution, and I 'd like to have a logger witth several Handlers . I know how to do this by coding in python, but could I specify this directly in the logger configuration file? Thanks in advance! bertrand -- http://mail.python.org/mailm

Re: Looking for a language/framework

2006-03-29 Thread [EMAIL PROTECTED]
ocssolutions.com offers hosting solutions and will host Zope -- http://mail.python.org/mailman/listinfo/python-list

ctypes/libffi for Intel based Macintosh

2006-03-29 Thread philip . kania
Can someone tell me where I can download a version of ctypes/libffi that will work on a Intel based Macintosh? I'm running Mac OS X 10.4.5 and the ActiveState Python 2.4.2 distribution. I've tried building libffi 1.20 which came with ctypes 0.9.9.3 and got a message from the libffi configure scr

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > Thanks, but that didn't help either. Since storbinary is being called > from the main script, I can't see where else it could be getting hung > up. Are there any other debugging techniques I could explore? > > I'm sending a 24k image and it is viewable on the destinatio

zipfile module

2006-03-29 Thread Rajesh Sathyamoorthy
Hi,I know how to write files to a zip file but i was wondering if there was a way to add a empty folder to the zip file using the zipfile module? I can only write files and not directories to a zip file.Thank You. -- http://mail.python.org/mailman/listinfo/python-list

pythonw doesn't work!

2006-03-29 Thread Peter Cai
I can't open IDEL or any .pyw file. When I click on IDEL.pyw, nothing happens! But python itself is ok. Has anybody met this problem? -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a language/framework

2006-03-29 Thread Jeffrey Froman
Alex Martelli wrote: > I've never seen an "object-relational mapping" (technical > term for cruft that tries to avoid people having to learn and use SQL) > which doesn't drive me into a murderous, foam-at-mouth rage in a very > short time -- I WANT my SQL, I LOVE SQL, it's WAY more powerful > and

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread mbukhin
Right. You know I took your suggestion for more print statements and found the offending line. [SNIP] print "close start" conn.close() print "close end" #return self.voidresp() print "end of everything" self.voidresp() was hanging! Do I need it? The file

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

2006-03-29 Thread Ed Singleton
On 29/03/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > btw, one alternative could be to use an infogame site for this purpose: > > > >http://infogami.com > > > > this gives you revision history, a permissions system (limiting editing to > > registered users might be a good idea), comments, a

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

2006-03-29 Thread Ed Singleton
On 29/03/06, Ed Singleton <[EMAIL PROTECTED]> wrote: > On 29/03/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > > btw, one alternative could be to use an infogame site for this purpose: > > > > > >http://infogami.com > > > > > > this gives you revision history, a permissions system (limiting e

New Python website, new documentation ?

2006-03-29 Thread 1024nospam
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 would there also be changes in the doc itself ? Martin. -- http://mail.python.org/mailm

Re: excel application

2006-03-29 Thread [EMAIL PROTECTED]
Hi Luca, The words xlDiagonalDown e xlNone are Excel constants and don't are in the Local NameSpace use these values: xlNone = -4142 xlDiagonalDown = 5 Then the last line stay like that """ packing.ActiveSheet.Selection.Borders(5).LineStyle = -4142 # Excel Constants: xlNone = -4142 xl

Central Arkansas Python Users Group

2006-03-29 Thread Greg Lindstrom
At PyCon I met a handful of programmers from the Little Rock area.  Are there enough of us with any interest in forming a Central Arkansas Python Users Group?For others of you that have started user groups, how do you get the word out, especially in an area where Python coders are difficult to find

Re: Looking for a language/framework

2006-03-29 Thread Alex Martelli
Jeffrey Froman <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > > I've never seen an "object-relational mapping" (technical > > term for cruft that tries to avoid people having to learn and use SQL) > > which doesn't drive me into a murderous, foam-at-mouth rage in a very > > short time -- I

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > Right. You know I took your suggestion for more print statements and > found the offending line. > > [SNIP] > print "close start" > conn.close() > print "close end" > #return self.voidresp() > print "end of everything" > > self.voi

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

2006-03-29 Thread Fredrik Lundh
Ed Singleton wrote: > > alright, I got bored and uploaded a copy of the current Python tutorial to > > > > http://pytut.infogami.com > > Damn. You beat me to it by an hour. > > http://singletoned.infogami.com/_special/index oops. sorry for that. > > I had a nightmare with character encoding

Re: FTP not Returning (Python on Series 60 Nokia)

2006-03-29 Thread mbukhin
Got it. Thanks for your help. :) -- http://mail.python.org/mailman/listinfo/python-list

Terminating a subprocess question

2006-03-29 Thread Ernesto
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 directly (i.e. Handle =

Re: Content Management System

2006-03-29 Thread Adrienne Boswell
Gazing into my crystal ball I observed "Water Cooler v2" <[EMAIL PROTECTED]> writing in news:1143627824.174540.13710 @z34g2000cwc.googlegroups.com: > 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

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

2006-03-29 Thread Ed Singleton
On 29/03/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Ed Singleton wrote: > > > > alright, I got bored and uploaded a copy of the current Python tutorial to > > > > > > http://pytut.infogami.com > > > > Damn. You beat me to it by an hour. > > > > http://singletoned.infogami.com/_special/inde

Re: Terminating a subprocess question

2006-03-29 Thread Diez B. Roggisch
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

  1   2   3   >