pickle: 32bit vs 64bit

2006-03-28 Thread seb . haase
Hi, I have ordered a new Athlon64 PC running linux x86_64. I'm using Pyro to communicate between python programs running on different machines. I know that, because Pyro's communication is based on pickle, that the different machines have to run the same Python (major) version: that is, it did not

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-28 Thread funkyj
Chris F Clark wrote: Yes, there is literature on the generating side of the regular expression/FSM model. In fact, the matching problem and the generating problems are exactly equivalent. A slight variation of the definition of how a matcher works, turns it into a generator and vice versa.

No Cookie: how to implement session?

2006-03-28 Thread Sullivan WxPyQtKinter
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. I tried to add hidden field with a sessionID in every python CGI script generated web pages, so everytime my client POST a request, the server

Re: Perforce p4c.run(print error - AttributeError: OutputBinary

2006-03-28 Thread kbperry
I received a response from Robert Cowham ( the author of the API): The problem is that something like print was only expected to be done for text files not binary. You could try editing p4.py and add a method similar to: def OutputText(self, text): Adds text lines to the output

Re: freeze.py and GTK apps

2006-03-28 Thread Kristian Hermansen
On 3/28/06, Adam DePrince [EMAIL PROTECTED] wrote: When your Python installation uses shared library modules such as _tkinter.pyd, these will not be incorporated in the frozen program. Again, the frozen program will work when you test it, but it won't work when you ship it to a site without

Re: 1.090516455488E9 / 1000000.000 ???

2006-03-28 Thread Math
Thanks this does the job And yes, I really need this accuracy.. Many Thanks - Original Message - From: Felipe Almeida Lessa [EMAIL PROTECTED] To: Fredrik Lundh [EMAIL PROTECTED] Cc: python-list@python.org Sent: Tuesday, March 28, 2006 6:00 PM Subject: Re: 1.090516455488E9 / 100.000

trying to use popen2() to communicate with C program

2006-03-28 Thread I. Myself
I can't get this to work: # commer.py - to test communication with other process from popen2 import popen2 (child_stdout, child_stdin) = popen2(commer.exe) print Got here 1 line = child_stdout.readline() print Got here 2 child_stdin.write(line) child_stdin.close child_stdout.close The compile

[wxPython-users] ANNOUNCE: wxPython 2.6.3.0

2006-03-28 Thread Robin Dunn
Announcing -- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this version, many of which are listed below and at http://wxpython.org/recentchanges.php. What is wxPython?

dir_util.copy_tree call

2006-03-28 Thread Phoe6
Hi all. I am using IDLE when I am on the python shell, I do: import os os.mkdir('newdir') from dirutils import dir_util #copy a big directory tree dir_util.copy_tree('big_directory','newdir') This works properly, but I find a huge Resource Comsumption of my PC. 100% of CPU and Memory. Now, when

Re: CGI redirection: let us discuss it further

2006-03-28 Thread Sullivan WxPyQtKinter
Just read the name of the server (os.environ['SERVER_NAME']) to work out what absolute URL to redirect to, whist still being portable. Here's some code I dug up that should also cope with non-default ports and SSL, if that's of any use: ssl= os.environ.get('HTTPS', 'off') not in ('',

Re: Looking for a language/framework

2006-03-28 Thread walterbyrd
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? Which frameworks have you looked at ? django, turbogears, cheetah, cherrypy, .

web

2006-03-28 Thread support
Hello, 2ExtremeStudios.com would like to offer you a great deal on a brand new website for your business. We invite you to visit www.2ExtremeStudios.com, we offer business information site design and e-store integration, as well as other services. Thanks for your time, Daniel N. Phone.

Re: trying to use popen2() to communicate with C program

2006-03-28 Thread Rene Pijlman
I. Myself: I can't get this to work With what versions of what software on what platform? -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Redirect output

2006-03-28 Thread abcd
I have a program which is written in C and interfaced with python via Swig. However, the function I call prints stuff out to the console. I would like to capture what it is printing out. I tried: [code] import MyCProg, sys f = open(tmp.txt, wb) sys.stdout = f MyCProg.getData() f.close()

Re: Quick Question regarding Frames

2006-03-28 Thread Dave Mandelin
Chris S wrote: Hello All, Just starting out with Python and wxPython. I have two Frames, FrameA and FrameB. FrameA opens FrameB when a button on FrameA is clicked. I can get this. Now I want a button on FrameB to update a control on FrameA. I am having an issue with this. Can anyone

Re: Why are so many built-in types inheritable?

2006-03-28 Thread Fabiano Sidler
I really wanted to learn the reason for this, nothing else! ;) Greetings, F. Sidler -- http://mail.python.org/mailman/listinfo/python-list

Re: dir_util.copy_tree call

2006-03-28 Thread Dave Mandelin
In IDLE, by default the working directory for the interactive prompt is the working directory for IDLE itself. The working directory for running a module is the directory the module is stored in. In your script, use absolute paths or set the -- Want to play tabletop RPGs over the internet?

Re: problems with looping, i suppose

2006-03-28 Thread John Salerno
Sion Arrowsmith wrote: John Salerno [EMAIL PROTECTED] wrote: Does what I originally pasted in my message look incorrect? To me, it all seems indented properly. Yes. Somewhere or other you've got your tabstop set to 4, and python treats literal tabs as being of equivalent indent to 8

Re: Looking for a language/framework

2006-03-28 Thread [EMAIL PROTECTED]
As far as languages go, Python seems a far better choice than php or perl based solutions. I haven't tried Ruby - so I can't comment. The Zope framework for python has been remarkably productive for me both with and wtihout plone(CMF modules and a look and feel on top of Zope). The

Re: trying to use popen2() to communicate with C program

2006-03-28 Thread I. Myself
Rene Pijlman wrote: I. Myself: I can't get this to work With what versions of what software on what platform? I'm glad you asked. really! Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Windows 2000. AMD processor. mingw compiler. Mitchell Timin

Re: No Cookie: how to implement session?

2006-03-28 Thread Paul Rubin
Dennis Lee Bieber [EMAIL PROTECTED] writes: Yes... And watch them flounder on sites that use cookies /for/ a form of security (ie, those sites that require logins...) Cookies can be set to expire, so the session can time-out... whereas... Sites should never rely on cookies timing out.

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

2006-03-28 Thread rurpy
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? it could be that the tutorial author expected you to read chapter 8 before you read

Re: Why are so many built-in types inheritable?

2006-03-28 Thread Georg Brandl
Fabiano Sidler wrote: I really wanted to learn the reason for this, nothing else! ;) I suspect performance reasons. Can't give you details but function is used so often that it deserves special treatment. Georg -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to use popen2() to communicate with C program

2006-03-28 Thread I. Myself
Dennis Lee Bieber wrote: On Tue, 28 Mar 2006 18:02:46 GMT, I. Myself [EMAIL PROTECTED] declaimed the following in comp.lang.python: The compile C program, commer.exe, writes a line of text to its stdout. The python program does not receive it; it never gets to print Got here 2.

tips for this exercise?

2006-03-28 Thread John Salerno
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 range(5): fiveNumbers =

Problem w/Tkinter on 2.5 (Panther)

2006-03-28 Thread w chun
i've built a Python 2.5a0 interpreter on my iBook using gcc 3.3-1666 using the tarball from last nite... $ uname -a Darwin myMac.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc $ $ python Python 2.5a0 (trunk,

Re: Redirect output

2006-03-28 Thread Donn Cave
In article [EMAIL PROTECTED], abcd [EMAIL PROTECTED] wrote: I have a program which is written in C and interfaced with python via Swig. However, the function I call prints stuff out to the console. I would like to capture what it is printing out. I tried: [code] import MyCProg, sys f

Re: tips for this exercise?

2006-03-28 Thread Brian Quinlan
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

Re: Looking for a language/framework

2006-03-28 Thread Steve Juranich
[EMAIL PROTECTED] wrote: As far as hosting, I also know where Zope/Plone hosting from 7.95 a month - although the host doesn't list it on their ads, they do use and host it. Which host would this be? I'm currently exploring some options for getting a Zope site hosted. Thanks much. -- Steve

Re: Quick Question regarding Frames

2006-03-28 Thread Chris S
HI Dave, Thanks for the reply. I am a bit confused by this piece of code: class FrameB(wx.Frame): def __init__(self, frameA, ...): self.frameA = frameA What is frameA in the __init__ definition? Do I need to create something called frameA in order to pass it to that __init__

Re: tips for this exercise?

2006-03-28 Thread John Salerno
Brian Quinlan wrote: I would just write the function like this: def genNumbers(): shuffle_nums = numbers[:]# copy the list to preserve the orginal # order (if it matters) random.shuffle(shuffle_nums) # shuffle the entire list return

Re: Perforce p4c.run(print error - AttributeError: OutputBinary

2006-03-28 Thread kbperry
This seemed to fix my problem. Keith www.301labs.com -- http://mail.python.org/mailman/listinfo/python-list

Re: tips for this exercise?

2006-03-28 Thread Larry Bates
Not a lot wrong with your code except that your return fiveNumbers will execute the first time through the loop because it is indented inside the loop. Also, append does its work in place, it doesn't return a new list. You also might want to pass the maximum number and return count, into the

Re: tips for this exercise?

2006-03-28 Thread Paul Rubin
John Salerno [EMAIL PROTECTED] writes: Is there a better way to extract a certain number of items from a list (so maybe I don't need the for loop)? Is a list even the right type to use, since it gets edited in place? Perhaps a set? See the doc for random.sample. --

Re: Convert Word .doc to Acrobat .pdf files

2006-03-28 Thread kbperry
Justin, While I was salivating when reading your post, it doesn't work for me, but I am not sure why. I keep getting an error: Titled: Adobe PDF When you create a PostScript file you have to send the host fonts. Please go to the printer properties, Adboe PDF Settings page and turn OFF the

Python plug-in

2006-03-28 Thread toto
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 ?? Regards, Laurent. --

Re: tips for this exercise?

2006-03-28 Thread Steve M
You have two lines inside the loop that ought to be outside the loop - the initial assignment to fiveNumbers and the return statement. Also, the line that appends new numbers to fiveNumbers is not quite correct - the append() method modifies the list in place, rather than return a new list.

pySerial: write in a blocking mode

2006-03-28 Thread Alejandro
Hi: 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. In particular, I need to : write a character to the serial port set the DTR line to level 1 _after_ the last bit of the character is

Re: Simple py script to calc folder sizes

2006-03-28 Thread Caleb Hattingh
Thanks John I will use your code :) 30% improvement is not insignificant, and that's what I was looking for. I find the log function a little harder to read, but I guess that is a limitation of me, not your code. Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: tips for this exercise?

2006-03-28 Thread Kent Johnson
John Salerno wrote: Brian Quinlan wrote: I would just write the function like this: def genNumbers(): shuffle_nums = numbers[:]# copy the list to preserve the orginal # order (if it matters) random.shuffle(shuffle_nums) # shuffle the entire list

Re: Multiplying sequences with floats

2006-03-28 Thread Caleb Hattingh
Hi Fredrik Fair enough; I wasn't precise. Upon further reflection, I actually meant floor division, via the // operator. In the following snippet: 4/2 2 4//2 2 4.0/2.0 2.0 4.0//2 2.0 4.0//2.0 2.0 We know the last two operations can only return what are effectively integer numbers (or

Re: Python plug-in

2006-03-28 Thread Jean-Paul Calderone
On Tue, 28 Mar 2006 22:42:46 +0200, toto [EMAIL PROTECTED] 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

Re: CGI redirection: let us discuss it further

2006-03-28 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: What's wrong with the redirection page? If there's really a necessary reason for not using an HTTP redirect (for example, needing to set a cookie, which doesn't work cross-browser on redirects), the best bet is a page containing a plain link and

Re: CGI redirection: let us discuss it further

2006-03-28 Thread Sybren Stuvel
Sullivan WxPyQtKinter enlightened us with: Sorry I do not quite understand what is the difference between an internal redirection and an external one? External: - Browser requests URL A - Server responds Go to URL B - Browser requests URL B - Server responds with contents of B

Re: Multiplying sequences with floats

2006-03-28 Thread Caleb Hattingh
Christoph I understand the explanation regarding the underlying math.floor() call. Were I using this functionality in my code, int(a//b)* some_list would not be something I consider a big deal. However, I see what you're saying: The multiplcation by list can only work with an int, and you

Re: instantiate a class with a variable

2006-03-28 Thread John
Thanks for the help, this was exactly what I needed. Working Great bruno at modulix wrote: John wrote: Hi, is it possible to instantiate a class with a variable. example class foo: def method(self): pass x='foo' Can I use variable x value to create an instance of

Parsing csh scripts with python

2006-03-28 Thread David Hirschfield
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 (comments, ordering of

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

2006-03-28 Thread Steven D'Aprano
On Tue, 28 Mar 2006 12:12:52 +0200, Joel Hedlund wrote: I try to stay away from speed microoptimisations as much as possible since it generally results in less readable code, which in turn often results in an overall speed loss because code maintenance will be harder. +1 QOTW -- Steven.

Re: Command line option -Q (floor division)

2006-03-28 Thread Christoph Zwerschke
Just for the records, Anthony Baxter explained that this is by intent, because it would be still too disruptive a change. The testsuite does not even run completely with -Qnew yet. So it will be probably only changed with Python 3.0. -- Christoph --

Re: Obtaining the remote ip address

2006-03-28 Thread Peter Hansen
EP wrote: While on the subject of network identity, does anyone have a scheme to get the MAC address of the end device? I've never come up with a way to do it, but I haven't had it proven to me that it is impossible (yet). Which end? I'll assume you mean _not_ the server end. :-) The MAC

Re: tips for this exercise?

2006-03-28 Thread Steven D'Aprano
On Tue, 28 Mar 2006 20:32:32 +, John Salerno wrote: Brian Quinlan wrote: I would just write the function like this: def genNumbers(): shuffle_nums = numbers[:]# copy the list to preserve the orginal # order (if it matters)

Re: pySerial: write in a blocking mode

2006-03-28 Thread Peter Hansen
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 converters without needing to do that. Maybe a more

Re: Parsing csh scripts with python

2006-03-28 Thread Dave Benjamin
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 remain the same). I looked at shlex,

Re: tips for this exercise?

2006-03-28 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: Generally, lottery numbers are selected from a range, e.g. one to forty. So rather than passing a global list, just pass the maximum number: def getNumbers(maxn=40): L = range(1, maxn+1) random.shuffle(L) return L[0:5] Why is everyone

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

2006-03-28 Thread Ross Ridge
Felipe Almeida Lessa wrote: That said, you can do thinks like: import socket a = socket.AF_UNIX a is socket.AF_UNIX True That kind of constants can be used with is. But if don't want to be prone to errors as I do, use is only when you really know for sure that you're dealing with

A SANE scanner backend written in Python?

2006-03-28 Thread dwelch
I've read many times on this newsgroup over the years that you can write just about anything in Python, except perhaps a full operating system (maybe even that...?). So, with this spirit in mind, I would like to try to write a SANE scanner backend that I need to write, in Python rather than C.

Re: Convert Word .doc to Acrobat .pdf files

2006-03-28 Thread Rune Strand
kbperry wrote: Questions: Does Acrobat Pro, have some way to interface with it command-line (I tried searching, but couldn't find anything)? Is there any other good way to script word to pdf conversion? Note: The word documents do contain images, and lots of stuff besides just text. The

Re: pySerial: write in a blocking mode

2006-03-28 Thread Alejandro
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 converters without needing

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

2006-03-28 Thread Felipe Almeida Lessa
Em Ter, 2006-03-28 às 15:18 -0800, Ross Ridge escreveu: [snip] Consider this example using the socket.IPPROTO_RAW constant: socket.getaddrinfo(localhost, None, socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW)[0][2] is socket.IPPROTO_RAW False socket.getaddrinfo(localhost, None,

Re: pySerial: write in a blocking mode

2006-03-28 Thread Grant Edwards
On 2006-03-28, Alejandro [EMAIL PROTECTED] wrote: Hi: 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. In particular, I need to : write a character to the serial port set the DTR

Re: tips for this exercise?

2006-03-28 Thread John Salerno
Paul Rubin wrote: John Salerno [EMAIL PROTECTED] writes: Is there a better way to extract a certain number of items from a list (so maybe I don't need the for loop)? Is a list even the right type to use, since it gets edited in place? Perhaps a set? See the doc for random.sample. Thanks,

Re: A SANE scanner backend written in Python?

2006-03-28 Thread Lonnie Princehouse
Recompile Python and SANE with debugging enabled, if you haven't already. That should allow you to trace back to the source of the error using gdb (or your favorite gdb front-end). AFAIK there's no inherent reason that embedding Python in a shared library wouldn't work.Did you try compiling

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

2006-03-28 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Fredrik Lundh wrote: [EMAIL PROTECTED] wrote: where did anyone tell the OP that he can't read? it could be that the tutorial author expected you to read chapter 8 before you read chapter 9,... This actually acknowledges an

python ctype question about access violation reading location 0x5a5a5a5a

2006-03-28 Thread Yanping Zhang
Hi All, I need to use this C routine in python and there is a void pointer parameter in it: (this routine was written by someone else): myfunc(int a, (void *)userdata, bool b) I saw someone in his C++ wrapper used this routine in this way: myfunc(a, (void *)0x5a5a5a5a, b) In my python

Re: Convert Word .doc to Acrobat .pdf files

2006-03-28 Thread Justin Ezequiel
When you create a PostScript file you have to send the host fonts. Please go to the printer properties, Adboe PDF Settings page and turn OFF the option Do not send fonts to Distiller. kbperry, sorry about that. go to Printers and Faxes go to properties for the Adobe PDF printer go to the General

Re: tips for this exercise?

2006-03-28 Thread Duncan Smith
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

ldap usage

2006-03-28 Thread Jed Parsons
Hi, authenticates a user against our ldap server.: User types in name and password, and module sees if name and password check out right with the ldap server. I see that it's pretty straightforward to do this with: import ldap l = ldap.open('our.ldap.server') try:

sending ctrl C to a process

2006-03-28 Thread s99999999s2003
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 program to terminate it in python? thanks

sending ctrl C to a program

2006-03-28 Thread s99999999s2003
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 program to terminate it in python? thanks

Re: Problem with httplib and HEAD request

2006-03-28 Thread Mitch . Garnaat
For what it's worth, I made the following change to httplib.py and it seems to have solved my problems: c455 if self.chunked: --- if self.chunked and self._method != 'HEAD': I'm using Python 2.4.1 on MacOS. Mitch -- http://mail.python.org/mailman/listinfo/python-list

Re: sending ctrl C to a process

2006-03-28 Thread Felipe Almeida Lessa
Em Ter, 2006-03-28 às 18:14 -0800, [EMAIL PROTECTED] escreveu: 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 program to terminate it in python? $

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

2006-03-28 Thread Chris Mellon
On 3/28/06, Yanping Zhang [EMAIL PROTECTED] wrote: Hi All, I need to use this C routine in python and there is a void pointer parameter in it: (this routine was written by someone else): myfunc(int a, (void *)userdata, bool b) I saw someone in his C++ wrapper used this routine in this

SEEK_SET defined?

2006-03-28 Thread Roger Miller
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? -- http://mail.python.org/mailman/listinfo/python-list

Re: sending ctrl C to a process

2006-03-28 Thread s99999999s2003
hi thanks for the reply.Actually, i should clarify what i am doing. the program's output will be displayed to a web browser using cgi, so there is no keyboard interrupt. The backend cgi script (python script) will have to send Ctrl-C to break the program. thanks --

Re: sending ctrl C to a process

2006-03-28 Thread Grant Edwards
On 2006-03-29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hi thanks for the reply. Please properly quote the article to which you're replying so that we can tell who/what your talking to/about. Actually, i should clarify what i am doing. the program's output will be displayed to a web

RE: ldap usage

2006-03-28 Thread Jed Parsons
Title: RE: ldap usage Looks like the top of my message got garbled I was trying to say that I'm using ldap for the first time, trying to write a script that authenticates a user against our ldap server. etc. The rest came through. Hope that makes more sense now :) j -Original

Weekly Python Patch/Bug Summary

2006-03-28 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 389 open ( -3) / 3117 closed (+23) / 3506 total (+20) Bugs: 901 open ( -6) / 5687 closed (+41) / 6588 total (+35) RFE : 214 open ( +1) / 206 closed ( +4) / 420 total ( +5) New / Reopened Patches __

Re: String To Dict Problem

2006-03-28 Thread [EMAIL PROTECTED]
def default(self, node, **kw): for child in node.getChildNodes(): return self.visit(child, **kw) visitExpression = default I'm not sure I grok this part. It leads to unexpected results: safe_dict(gid = 'FPS', type = 'Label', pos = [0, 20], text = 'FPS', text2 =

Re: Looking for a language/framework

2006-03-28 Thread Nick Craig-Wood
walterbyrd [EMAIL PROTECTED] wrote: Ideally, I would like to be able to develop a database driven web-app, in much the same manner as I could develop an ms-access app. As much as I dislike msft, I have to admit, an ms-access app can be put together quickly, without any steep learning

any() and all() on empty list?

2006-03-28 Thread Steve R. Hastings
So, Python 2.5 will have new any() and all() functions. http://www.python.org/dev/peps/pep-0356/ any(seq) returns True if any value in seq evaluates true, False otherwise. all(seq) returns True if all values in seq evaluate true, False otherwise. I have a question: what should these functions

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

2006-03-28 Thread Paul Rubin
Steve R. Hastings [EMAIL PROTECTED] writes: In the all() example, if there *are* no values in S, then none of the values can be != 0, and IMHO all() should return False. That goes against the usual meaning of all in, say, mathematical logic. Usually, for all X in S, PRED(x) is true means:

Re: No Cookie: how to implement session?

2006-03-28 Thread Sullivan WxPyQtKinter
As you said, There is no solution? I mean, tracing a real session without using tricks like hidden field and cookies in CGI script? Dennis Lee Bieber 写道: On 28 Mar 2006 09:40:24 -0800, Sullivan WxPyQtKinter [EMAIL PROTECTED] declaimed the following in comp.lang.python: I do not want to

Re: No Cookie: how to implement session?

2006-03-28 Thread Alex Martelli
Sullivan WxPyQtKinter [EMAIL PROTECTED] wrote: As you said, There is no solution? I mean, tracing a real session without using tricks like hidden field and cookies in CGI script? Cookies aren't tricks -- they are THE standard, architected solution for session persistence in HTTP 1.1 --

Re: Graphs from Python

2006-03-28 Thread Philippe Bouige
In article [EMAIL PROTECTED], DurumDara wrote: Hi ! I want to create graphs (edges, nodes) from python. NetworkX https://networkx.lanl.gov/ Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: No Cookie: how to implement session?

2006-03-28 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: Cookies aren't tricks -- they are THE standard, architected solution for session persistence in HTTP 1.1 -- people who disable them are saying they do not *WANT* persistent sessions... on their heads be it. That so many people do this is partly the

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

2006-03-28 Thread Tim Peters
[Steve R. Hastings] So, Python 2.5 will have new any() and all() functions. http://www.python.org/dev/peps/pep-0356/ any(seq) returns True if any value in seq evaluates true, False otherwise. all(seq) returns True if all values in seq evaluate true, False otherwise. I have a question:

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

2006-03-28 Thread Paul McGuire
Paul Rubin http://[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Steve R. Hastings [EMAIL PROTECTED] writes: In the all() example, if there *are* no values in S, then none of the values can be != 0, and IMHO all() should return False. That goes against the usual meaning of all

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

2006-03-28 Thread Ben Finney
Steve R. Hastings [EMAIL PROTECTED] writes: So, Python 2.5 will have new any() and all() functions. http://www.python.org/dev/peps/pep-0356/ And there was much rejoicing. any(seq) returns True if any value in seq evaluates true, False otherwise. Yep. all(seq) returns True if all values in

Re: Nevow LivePage tutorial

2006-03-28 Thread Mir Nazim
Tim Parkin wrote: Mir Nazim wrote: I really appriciate the help a lot, the but the problems is that i have already real those. What i was looking for was some kind of detailed tutorial, that explains the basic ideas about live page and formhandling etc. (my be it the time some nevow

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

2006-03-28 Thread Paul McGuire
Steve R. Hastings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] So, Python 2.5 will have new any() and all() functions. http://www.python.org/dev/peps/pep-0356/ any(seq) returns True if any value in seq evaluates true, False otherwise. all(seq) returns True if all values in seq

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

2006-03-28 Thread Steve R. Hastings
Thank you very much for explaining this. And so thoroughly! Of course I withdraw all objections. :-) -- Steve R. HastingsVita est [EMAIL PROTECTED]http://www.blarg.net/~steveha -- http://mail.python.org/mailman/listinfo/python-list

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

2006-03-28 Thread Fredrik Lundh
[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? it could be that the tutorial author expected you to

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

2006-03-28 Thread Paul Rubin
Paul McGuire [EMAIL PROTECTED] writes: Usually, for all X in S, PRED(x) is true means: there does not exist X in S so that PRED(x) is false. How do you get this usually stuff? I would agree that this is usually implemented as a short-circuited loop through the list, that breaks out at

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

2006-03-28 Thread Sybren Stuvel
Paul McGuire enlightened us with: That goes against the usual meaning of all in, say, mathematical logic. Usually, for all X in S, PRED(x) is true means: there does not exist X in S so that PRED(x) is false. How do you get this usually stuff? From its mathematical definition. I would

Re: 1.090516455488E9 / 1000000.000 ???

2006-03-28 Thread Tim Roberts
Math [EMAIL PROTECTED] wrote: Thanks this does the job And yes, I really need this accuracy.. Then you need to understand that you don't really HAVE this accuracy. You are fooling yourself. 1090.516455488 cannot be represented exactly in binary, just like 1/3 cannot be represented exactly in

Re: web

2006-03-28 Thread Tim Roberts
[EMAIL PROTECTED] wrote: Hello, 2ExtremeStudios.com would like to offer you a great deal on a brand new website for your business. We invite you to visit www.2ExtremeStupids.com, we offer business information site design and e-store integration, as well as other services. Thanks for your time,

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

2006-03-28 Thread Ron Adam
Paul McGuire wrote: Paul Rubin http://[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] To my mind, the *meaning* of all() is that every element in the list asserts True. But this is with an initial assumption that all() is False, unless I test every value and find them to be True.

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

2006-03-28 Thread Fredrik Lundh
Christoph Zwerschke wrote: Is this 'consensus opinion' or mainly your own opinion? It is just a consequence from the fact that unittest is actually a port from JUnit (Java) to Python, i.e. a consequence of trying to emulate a standard framework that many programmers are already familiar

FTP not Returning (Python on Series 60 Nokia)

2006-03-28 Thread mbukhin
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 which does this: def

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

2006-03-28 Thread Joel Hedlund
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. this code which it appears you would support writing if (flags os.R_OK) is os.R_OK: I do not. You compare a module.CONSTANT to the

<    1   2   3   >