Re: [Python-Dev] RELEASED Python 2.6.2

2009-04-17 Thread Ronald Oussoren
On 16 Apr, 2009, at 20:58, Russell Owen wrote: I installed the Mac binary on my Intel 10.5.6 system and it works, except it still uses Apple's system Tcl/Tk 8.4.7 instead of my ActiveState 8.4.19 (which is in /Library/Frameworks where one would expect). That's very string. I had

Re: How do I change the behavior of the 'python-docs' action in IDLE?

2009-04-17 Thread Raymond Hettinger
On Apr 16, 12:02 pm, samwyse samw...@gmail.com wrote: In the Windows version of Python 2.5, pressing F1 brought up the python.chm file.  I've just installed 2.6, and the same action openshttp://www.python.org/doc/current/.  I'd prefer the former behavior. I know how to change the key bindings

Re: polar plots, clockwise, north

2009-04-17 Thread Tim Roberts
enric...@gmail.com wrote: I've been trying to figure out how to do this for a while with matplotlib. I need to make polar plots which go around clockwise and have 0deg on top (north) instead of on the side (east). How can this be done? Is it really that hard? def compass( theta, r,

Re: Question to python C API

2009-04-17 Thread Andreas Otto
Hi, just my first step in Cython 1. download Cython-0.11.1 2. read INSTALL.txt (1) Run the setup.py script in this directory as follows: python setup.py install This will install the Pyrex package into your Python system. Question 1: Why you wall it Pyrex

howto submit documentation bugs on python V3 web-site ?

2009-04-17 Thread Andreas Otto
Hi, is an email or something else available ? -- http://mail.python.org/mailman/listinfo/python-list

Re: howto submit documentation bugs on python V3 web-site ?

2009-04-17 Thread alex23
On Apr 17, 4:36 pm, Andreas Otto aotto1...@onlinehome.de wrote: Hi,   is an email or something else available ? http://docs.python.org/3.0/bugs.html -- http://mail.python.org/mailman/listinfo/python-list

Non-secure execution environment

2009-04-17 Thread rogeeff
Hi, I am C++ guy for the most part and don't know much of Python, so, please, bear with me if I am asking errrm..idiotic question. Old rexec module provided kinda 'secure' execution environment. I am not looking for security at this point. What I need an execution environment which almost like

Re: Create standalone Windows program with simple graphics?

2009-04-17 Thread edexter
On Apr 16, 8:12 am, Poster28 usen...@anton.e4ward.com wrote: Hi, I'd like to program and compile a simple graphics program (showing something like a chess board, some numbers and buttons, mouse support) and provide it as a standalone binary for Windows users. What is the easiest way to do

Re: Domain Driven Design and Python

2009-04-17 Thread José María
On Apr 16, 7:11 pm, Stef Mientki stef.mien...@gmail.com wrote: José María wrote: Hi, I've been searching for information about the application of DDD principles in Python and I did'nt found anything! Is DDD obvious in Python or is DDD inherent to static languages like Java or C#?

Re: Create standalone Windows program with simple graphics?

2009-04-17 Thread edexter
On Apr 17, 1:48 am, edexter eric_dex...@msn.com wrote: On Apr 16, 8:12 am, Poster28 usen...@anton.e4ward.com wrote: Hi, I'd like to program and compile a simple graphics program (showing something like a chess board, some numbers and buttons, mouse support) and provide it as a

Re: Question to python C API

2009-04-17 Thread alex23
On Apr 17, 4:22 pm, Andreas Otto aotto1...@onlinehome.de wrote:         Question 1: Why you wall it Pyrex package ? From the first paragraph on the Cython site: Cython is based on the well-known Pyrex, but supports more cutting edge functionality and optimizations. python ./setup.py install

Re: ANN: PyGUI 2.0.1

2009-04-17 Thread Thomas Heller
greg schrieb: Suraj Barkale wrote: I installed this and tried out the tests on Python 2.6.1 and Windows XP SP3. Following are my observations. Thanks, I'll look into these. Test 33-mouse-events.py: 1. mouse-enter and mouse-leave events are not reported. That's actually expected

script question

2009-04-17 Thread Stefano
I have a script like this myscript.py def func01() def func02() def func03() def funcnn() How can i execute my func in the code ? import myscript for i in range(1,n): myscript.func?? many thanks stefano -- http://mail.python.org/mailman/listinfo/python-list

Re: script question

2009-04-17 Thread Chris Rebert
On Fri, Apr 17, 2009 at 12:00 AM, Stefano stef...@vulcanos.it wrote: I have a script like this myscript.py   def func01()   def func02()   def func03()     def funcnn() How can i execute my func in the code ? import myscript for i in range(1,n):   myscript.func??

Re: Create standalone Windows program with simple graphics?

2009-04-17 Thread Paul Rudin
Poster28 usen...@anton.e4ward.com writes: I'd like to program and compile a simple graphics program (showing something like a chess board, some numbers and buttons, mouse support) ... 2d or 3d graphics? You could start by looking at pygame and pyopengl. ... and provide it as a standalone

Re: script question

2009-04-17 Thread Peter Otten
Stefano wrote: I have a script like this myscript.py def func01() def func02() def func03() def funcnn() How can i execute my func in the code ? import myscript for i in range(1,n): getattr(myscript, func%02d % i)() --

Re: script question

2009-04-17 Thread alex23
On Apr 17, 5:00 pm, Stefano stef...@vulcanos.it wrote: How can i execute my func in the code ? import myscript for i in range(1,n):     myscript.func?? for i in range(1,n): getattr(myscript, 'func%d' % i)() -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-secure execution environment

2009-04-17 Thread Ken Seehart
roge...@gmail.com wrote: Hi, I am C++ guy for the most part and don't know much of Python, so, please, bear with me if I am asking errrm..idiotic question. Old rexec module provided kinda 'secure' execution environment. I am not looking for security at this point. What I need an execution

Re: How to access C structures

2009-04-17 Thread Stefan Behnel
Chris Helck wrote: I have a couple dozen C structures that define binary file records. I need to read the file and access the records. I need to do this very efficiantly. I am aware of the Python struct class, but the C structures contain arrays of nested structures and I'm not sure if

JSON Template: Minimal but powerful templating language implemented in Python and 3 other languages

2009-04-17 Thread Andy Chu
I'm looking for some feedback based on real usage. There have been a few small features added here and there since it was made public 3 weeks ago, but more comments are appreciated. A big selling point is that it's implemented in JavaScript too, so you can use the same templates on the client

Re: Question to python C API

2009-04-17 Thread Andreas Otto
alex23 wrote: On Apr 17, 4:22 pm, Andreas Otto aotto1...@onlinehome.de wrote: Question 1: Why you wall it Pyrex package ? From the first paragraph on the Cython site: Cython is based on the well-known Pyrex, but supports more cutting edge functionality and optimizations. python

Re: Question to python C API

2009-04-17 Thread Andreas Otto
Andreas Otto wrote: alex23 wrote: Did you unpack the Cython archive correctly? Is there a Shadow.py in your src/Cython-0.11.1/Cython/ folder? yes dev1...@linux02:~/ext/x86_64-suse-linux/thread/bin/Cython-0.11.1 ls -al Cython/Shadow.py -rw-r--r-- 1 dev1usr users 4130 3. Apr 10:52

Re: JSON Template: Minimal but powerful templating language implemented in Python and 3 other languages

2009-04-17 Thread Paul Rubin
Andy Chu a...@chubot.org writes: I'm looking for some feedback based on real usage. There have been a few small features added here and there since it was made public 3 weeks ago, but more comments are appreciated. It looks cute, but very limited, and lacking in documentation unless I wasn't

Re: Man Bites Python

2009-04-17 Thread Vito De Tullio
Mikael Olofsson wrote: I don't think the guy in question finds it that funny. I don't think the python in question finds it that funny. -- By ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing a parse tree

2009-04-17 Thread Clarendon
Thank you very much for this information. It seems to point me to the right direction. However, I do not fully understand the flatten function and its output. Some indices seem to be inaccurate. I tried to find this function at nltk.tree.Tree.flatten, but it returns a flattened tree, not a tuple.

Re: get text from rogramms runn by subprocess.Popen immediatetly

2009-04-17 Thread Piet van Oostrum
Rüdiger Ranft _r...@web.de (RR) wrote: RR Hi all, RR I need to call some programms and catch their stdout and stderr streams. RR While the Popen class from subprocess handles the call, I get the RR results of the programm not until the programm finishes. Since the RR output of the programm is

Re: [OT] large db question about no joins

2009-04-17 Thread Martin P. Hellwig
Daniel Fetchinson wrote: cut Well, I gave the concrete example of zoo/cage/animal/leg because this *is* the business logic. I need to know for example the total number of animals, this is pretty understandable if you have a zoo. Or you mean that I should give another example? It might be the

Re: Choose: class with static methods or module with functions

2009-04-17 Thread Dan Sommers
On Thu, 16 Apr 2009 09:55:40 -0700, bearophileHUGS wrote: But there can be a situation where you want to keep functions even closer, for example because in a module you have two classes and two groups of functions related to each class. In such situation staticmethods seem better. In order

Re: [Python-Dev] RELEASED Python 2.6.2

2009-04-17 Thread Piet van Oostrum
Barry Warsaw ba...@python.org (BW) wrote: BW On behalf of the Python community, I'm happy to announce the availability BW of Python 2.6.2. This is the latest production-ready version in the BW Python 2.6 series. Dozens of issues have been fixed since Python 2.6.1 BW was released back in

Re: script question

2009-04-17 Thread Piet van Oostrum
Stefano stef...@vulcanos.it (S) wrote: S I have a script like this S myscript.py Sdef func01() Sdef func02() Sdef func03() S Sdef funcnn() S How can i execute my func in the code ? S import myscript S for i in range(1,n): Smyscript.func?? Others have suggested

Re: script question

2009-04-17 Thread Marco Mariani
Piet van Oostrum wrote: funclist = [func01, func02, func03, ... ] for i in range(1,n): funclist[i]() Or myscript.funclist[i]() from another module. Ehm, calling a bazillion things in the right order should be a responsibility of the myscript module anyway. --

QT , Wxwidgets are not just UI framework ?

2009-04-17 Thread Deep_Feelings
qt include many libraries : network , threading,database ..etc while Wxwidgets seem similar but with less scope my question is : does these frameworks replace python's (or any other language for that matter) built-in libraries ? or python does not include that sort of libraries ? thankx --

Re: binary file compare...

2009-04-17 Thread Nigel Rantor
Adam Olsen wrote: On Apr 16, 11:15 am, SpreadTooThin bjobrie...@gmail.com wrote: And yes he is right CRCs hashing all have a probability of saying that the files are identical when in fact they are not. Here's the bottom line. It is either: A) Several hundred years of mathematics and

Re: QT , Wxwidgets are not just UI framework ?

2009-04-17 Thread Diez B. Roggisch
Deep_Feelings wrote: qt include many libraries : network , threading,database ..etc while Wxwidgets seem similar but with less scope my question is : does these frameworks replace python's (or any other language for that matter) built-in libraries ? or python does not include that sort of

Re: Non-secure execution environment

2009-04-17 Thread Aaron Brady
On Apr 17, 1:47 am, roge...@gmail.com wrote: Hi, I am C++ guy for the most part and don't know much of Python, so, please, bear with me if I am asking errrm..idiotic question. Old rexec module provided kinda 'secure' execution environment. I am not looking for security at this point. What I

Re: Man Bites Python

2009-04-17 Thread Aaron Brady
On Apr 17, 3:33 am, Vito De Tullio zak.mc.kra...@libero.it wrote: Mikael Olofsson wrote: I don't think the guy in question finds it that funny. I don't think the python in question finds it that funny. -- By ZeD Man bites python. Python bites dog. Dog bites man. The end. --

how to know the importing file name from an imported file?

2009-04-17 Thread Visco Shaun
Hi Is there a way to know the name of the script(say A), which is importing a module(say B), from B? ie in above situation i should be able to get name 'A' through some way in B, when A contains an 'import B' statement. -- Thanks Regards visco --

Re: binary file compare...

2009-04-17 Thread Nigel Rantor
Adam Olsen wrote: On Apr 16, 4:27 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Thu, 16 Apr 2009 10:44:06 +0100, Adam Olsen rha...@gmail.com wrote: On Apr 16, 3:16 am, Nigel Rantor wig...@wiggly.org wrote: Okay, before I tell you about the empirical, real-world evidence I have could

Re: Accessing a parse tree

2009-04-17 Thread Aaron Brady
On Apr 17, 4:03 am, Clarendon jine...@hotmail.com wrote: Thank you very much for this information. It seems to point me to the right direction. However, I do not fully understand the flatten function and its output. Some indices seem to be inaccurate. I tried to find this function at

Re: binary file compare...

2009-04-17 Thread Tim Wintle
On Thu, 2009-04-16 at 21:44 -0700, Adam Olsen wrote: The Wayback Machine has 150 billion pages, so 2**37. Google's index is a bit larger at over a trillion pages, so 2**40. A little closer than I'd like, but that's still 56294995000 to 1 odds of having *any* collisions between *any* of

Re: how to know the importing file name from an imported file?

2009-04-17 Thread Peter Otten
Visco Shaun wrote: Is there a way to know the name of the script(say A), which is importing a module(say B), from B? ie in above situation i should be able to get name 'A' through some way in B, when A contains an 'import B' statement. While import sys print I'm imported by %r %

Re: compiler package vs parser

2009-04-17 Thread Robin Becker
Kay Schluehr wrote: On 16 Apr., 11:41, Robin Becker ro...@reportlab.com wrote: Is the compiler package actually supposed to be equivalent to the parser module? No. The parser module creates a concrete parse tree ( CST ) whereas the compiler package transforms this CST into an AST for

how to know the importing file name from an imported file?

2009-04-17 Thread R. David Murray
Visco Shaun visc...@gmail.com wrote: Hi Is there a way to know the name of the script(say A), which is importing a module(say B), from B? ie in above situation i should be able to get name 'A' through some way in B, when A contains an 'import B' statement. Suppose module C imports module B

sys.setcheckinterval() never gets updated second time. Bug?

2009-04-17 Thread k3xji
Hi all, Yesterday I opened a thread for this issue where I was calling sys.setcheckinterval() with sys.maxint and then try to set it to a lower value but did not succeed with that. Here it is:

Re: Help improve program for parsing simple rules

2009-04-17 Thread pruebauno
On Apr 16, 3:59 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 16, 10:57 am, prueba...@latinmail.com wrote: Another interesting task for those that are looking for some interesting problem: I inherited some rule system that checks for programmers program outputs that to be ported:

Re: [OT] large db question about no joins

2009-04-17 Thread andrew cooke
on the more general point about exactly how to handle large data sets, i found this article interesting - http://highscalability.com/unorthodox-approach-database-design-coming-shard andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: how to know the importing file name from an imported file?

2009-04-17 Thread Duncan Booth
Visco Shaun visc...@gmail.com wrote: Hi Is there a way to know the name of the script(say A), which is importing a module(say B), from B? ie in above situation i should be able to get name 'A' through some way in B, when A contains an 'import B' statement. The script always runs in module

Re: Help improve program for parsing simple rules

2009-04-17 Thread pruebauno
On Apr 16, 9:29 pm, John Machin sjmac...@lexicon.net wrote: On Apr 17, 1:57 am, prueba...@latinmail.com wrote: COMP_REPLACERS={'LT':'', 'GT':'', 'LE':'=', 'GE':'=', '=':'==', '=':'=', '=':'='} What do the '=' and '=' represent? Why are you replacing each by itself? because of this:

Re: [Python-Dev] RELEASED Python 2.6.2

2009-04-17 Thread Barry Warsaw
On Apr 17, 2009, at 5:42 AM, Piet van Oostrum wrote: Maybe a link to the MacOSX image can also be added to http://www.python.org/download Done. -Barry PGP.sig Description: This is a digitally signed message part -- http://mail.python.org/mailman/listinfo/python-list

Re: how to know the importing file name from an imported file?

2009-04-17 Thread Dave Angel
Visco Shaun wrote: Hi Is there a way to know the name of the script(say A), which is importing a module(say B), from B? ie in above situation i should be able to get name 'A' through some way in B, when A contains an 'import B' statement. The full path to the script is stored in

Re: Accessing a parse tree

2009-04-17 Thread John Machin
On 17/04/2009 7:32 PM, Clarendon wrote: Dear John Machin I presume that you replied to me instead of the list accidentally. So sorry about the typo. It should be: the program should *see* that the designated *words* are... a long way has two parentheses to the left -- (VP (DT -- before it

Re: Unpreempted behavior with sys.setcheckinterval

2009-04-17 Thread Aahz
In article c982207b-388d-4608-a1c1-7a1a84293...@u8g2000yqn.googlegroups.com, k3xji sum...@gmail.com wrote: I want unpreempted behavior for some application and do some testing as below. Well the unpreemption behavior is working fine with sys.setcheckinterval(sys.maxint). However, when I set the

OpenGL win32 Python

2009-04-17 Thread gintare statkute
Hello, i found an example for OpenGL in windows. It is incredibly helpful, but how to rewrite it to be useful in Python. How to give address of pfd in Python?: iFormat = ChoosePixelFormat( hDC, pfd ); SetPixelFormat( hDC, iFormat, pfd ); I found syntax for sizeof and pfd: #!

Re: compiler package vs parser

2009-04-17 Thread Aahz
In article mailman.4042.1239964684.11746.python-l...@python.org, Robin Becker ro...@reportlab.com wrote: My analysis of the problem is that in start p.py def func(D): for k in D: exec '%s=D[%r]' % (k,k) print i, j, k print locals() print i, j, k if

Re: how to know the importing file name from an imported file?

2009-04-17 Thread John Machin
On Apr 17, 9:17 pm, Visco Shaun visc...@gmail.com wrote: Hi Is there a way to know the name of the script(say A), which is importing a module(say B), from B? ie in above situation i should be able to get name 'A' through some way in B, when A contains an 'import B' statement. I find it

Re: OpenGL win32 Python

2009-04-17 Thread Maxim Khitrov
On Fri, Apr 17, 2009 at 9:27 AM, gintare statkute g.statk...@gmail.com wrote: Hello, i found an example for OpenGL in windows. It is incredibly helpful, but how to rewrite it to be useful in Python. How to give address of pfd in Python?: iFormat = ChoosePixelFormat( hDC, pfd );

Registering Cron using CronTab

2009-04-17 Thread gurcharan . saini
Hi I'm developing a Django application which is running on Apache. We need to add crontab from the Python script and we are using Python CronTab package http://pypi.python.org/pypi/python-crontab/0.7 for this. I'm stuck with the issue - if we execute the code from Apache the crontab is not

Re: compiler package vs parser

2009-04-17 Thread Scott David Daniels
Robin Becker wrote: If I have messed that up then there should be some easy fix, otherwise if pycodegen is somehow not getting the semantics of the the variables i,j correct is there some way I can fix that def func(D): for k in D: exec '%s=D[%r]' % (k,k) print i, j,

Re: Registering Cron using CronTab

2009-04-17 Thread Philip Semanchuk
On Apr 17, 2009, at 9:51 AM, gurcharan.sa...@gmail.com wrote: Hi I'm developing a Django application which is running on Apache. We need to add crontab from the Python script and we are using Python CronTab package http://pypi.python.org/pypi/python-crontab/0.7 for this. I'm stuck with the

Re: script question

2009-04-17 Thread Aahz
In article m263h3vadt@cs.uu.nl, Piet van Oostrum p...@cs.uu.nl wrote: Others have suggested getattr. I think a cleaner (more pythonic) way would be: funclist = [func01, func02, func03, ... ] for i in range(1,n): funclist[i]() Go to all that trouble, you might as well make it easier:

Re: QT , Wxwidgets are not just UI framework ?

2009-04-17 Thread Deep_Feelings
On Apr 17, 1:52 pm, Diez B. Roggisch de...@nospam.web.de wrote: Deep_Feelings wrote: qt include many libraries : network , threading,database ..etc while Wxwidgets seem similar but with less scope my question is : does these frameworks replace python's (or any other language for that

Re: Man Bites Python

2009-04-17 Thread Dotan Cohen
Man bites python. Python bites dog. Dog bites man. This beats rock paper scissors by a long shot. Python: Index finger extended Man: Index and middle fingers extended, thumb between them Dog: Four main fingers extended and slightly curved, thumb touches tip of middle finger -- Dotan Cohen

Re: script question

2009-04-17 Thread Scott David Daniels
Marco Mariani wrote: Piet van Oostrum wrote: funclist = [func01, func02, func03, ... ] for i in range(1,n): funclist[i]() Or myscript.funclist[i]() from another module. Ehm, calling a bazillion things in the right order should be a responsibility of the myscript module anyway. For

Language detection with python

2009-04-17 Thread S.Selvam
Hi all, I am trying for language detection in python.I just need to check whether the input text is english or not. 1)I tried nltk's stopwords and compared with input text,but only with little success. 2)Used oice.langdet for language detection,which uses bi-gram approach.It is also

ANN: doit 0.2.0 released

2009-04-17 Thread Eduardo Schettino
doit comes from the idea of bringing the power of build-tools to execute any kind of task. It will keep track of dependencies between “tasks” and execute them only when necessary. It was designed to be easy to use and “get out of your way”. check the new website

Re: script question

2009-04-17 Thread gitulyar
On Apr 17, 5:23 pm, Scott David Daniels scott.dani...@acm.org wrote: Marco Mariani wrote: Piet van Oostrum wrote: funclist = [func01, func02, func03, ... ] for i in range(1,n):     funclist[i]() Or myscript.funclist[i]() from another module. Ehm, calling a bazillion things in the

Re: script question

2009-04-17 Thread Peter Pearson
On 17 Apr 2009 07:03:18 -0700, Aahz a...@pythoncraft.com wrote: In article m263h3vadt@cs.uu.nl, Piet van Oostrum wrote: funclist = [func01, func02, func03, ... ] for i in range(1,n): funclist[i]() Go to all that trouble, you might as well make it easier: for func in funclist:

Re: compiler package vs parser

2009-04-17 Thread Gabriel Genellina
En Fri, 17 Apr 2009 10:55:46 -0300, Scott David Daniels scott.dani...@acm.org escribió: Robin Becker wrote: def func(D): for k in D: exec '%s=D[%r]' % (k,k) print i, j, k print locals() print i, j, k if __name__=='__main__': func(dict(i=1,j=33)) end p.py

Re: [OT] large db question about no joins

2009-04-17 Thread Daniel Fetchinson
Well, I gave the concrete example of zoo/cage/animal/leg because this *is* the business logic. I need to know for example the total number of animals, this is pretty understandable if you have a zoo. Or you mean that I should give another example? It might be the business logic but not the

Re: Language detection with python

2009-04-17 Thread Jeremiah Dodds
On Fri, Apr 17, 2009 at 3:19 PM, S.Selvam s.selvams...@gmail.com wrote: Hi all, I am trying for language detection in python.I just need to check whether the input text is english or not. 1)I tried nltk's stopwords and compared with input text,but only with little success. 2)Used

Re: QT , Wxwidgets are not just UI framework ?

2009-04-17 Thread Diez B. Roggisch
Deep_Feelings wrote: On Apr 17, 1:52 pm, Diez B. Roggisch de...@nospam.web.de wrote: Deep_Feelings wrote: qt include many libraries : network , threading,database ..etc while Wxwidgets seem similar but with less scope my question is : does these frameworks replace python's (or any other

Re: script question

2009-04-17 Thread D'Arcy J.M. Cain
On 17 Apr 2009 07:03:18 -0700 a...@pythoncraft.com (Aahz) wrote: Go to all that trouble, you might as well make it easier: for func in funclist: func() And if you need the return values: retlist = [func() for func in funclist] -- D'Arcy J.M. Cain da...@druid.net |

Re: Help improve program for parsing simple rules

2009-04-17 Thread Paul McGuire
On Apr 16, 10:57 am, prueba...@latinmail.com wrote: Another interesting task for those that are looking for some interesting problem: I inherited some rule system that checks for programmers program outputs that to be ported: given some simple rules and the values it has to determine if the

Inheriting dictionary attributes and manipulate them in subclasses

2009-04-17 Thread Dominik Ruf
Hi, I just stumbled upon the following behaviour. class base(): ... dic = {'1':'1', '2':'2'} ... class child1(base): ... def __init__(self): ... self.dic.update({'1':'2'}) ... class child2(base): ... pass ... c1 = child1() c2 = child2() print c1.dic {'1': '2', '2': '2'} print

Re: Help improve program for parsing simple rules

2009-04-17 Thread John Machin
On Apr 18, 1:26 am, Paul McGuire pt...@austin.rr.com wrote: On Apr 16, 10:57 am, prueba...@latinmail.com wrote: Another interesting task for those that are looking for some interesting problem: I inherited some rule system that checks for programmers program outputs that to be ported:

Re: Inheriting dictionary attributes and manipulate them in subclasses

2009-04-17 Thread Diez B. Roggisch
Dominik Ruf wrote: Hi, I just stumbled upon the following behaviour. class base(): ... dic = {'1':'1', '2':'2'} ... class child1(base): ... def __init__(self): ... self.dic.update({'1':'2'}) ... class child2(base): ... pass ... c1 = child1() c2 = child2() print c1.dic

Re: binary file compare...

2009-04-17 Thread norseman
Adam Olsen wrote: On Apr 16, 11:15 am, SpreadTooThin bjobrie...@gmail.com wrote: And yes he is right CRCs hashing all have a probability of saying that the files are identical when in fact they are not. Here's the bottom line. It is either: A) Several hundred years of mathematics and

Re: binary file compare...

2009-04-17 Thread SpreadTooThin
On Apr 17, 4:54 am, Nigel Rantor wig...@wiggly.org wrote: Adam Olsen wrote: On Apr 16, 11:15 am, SpreadTooThin bjobrie...@gmail.com wrote: And yes he is right CRCs hashing all have a probability of saying that the files are identical when in fact they are not. Here's the bottom line.  It

Re: Accessing a parse tree

2009-04-17 Thread Aaron Brady
On Apr 17, 8:22 am, John Machin sjmac...@lexicon.net wrote: On 17/04/2009 7:32 PM, Clarendon wrote: Dear John Machin I presume that you replied to me instead of the list accidentally. So sorry about the typo. It should be: the program should *see* that the designated *words* are...

Re: Non-secure execution environment

2009-04-17 Thread rogeeff
On Apr 17, 7:06 am, Aaron Brady castiro...@gmail.com wrote: On Apr 17, 1:47 am, roge...@gmail.com wrote: Hi, I am C++ guy for the most part and don't know much of Python, so, please, bear with me if I am asking errrm..idiotic question. Old rexec module provided kinda 'secure'

Re: get text from rogramms runn by subprocess.Popen immediatetly

2009-04-17 Thread Aaron Brady
On Apr 16, 8:02 am, Rüdiger Ranft _r...@web.de wrote: Diez B. Roggisch schrieb: Rüdiger Ranft schrieb: Hi all, I need to call some programms and catch their stdout and stderr streams. While the Popen class from subprocess handles the call, I get the results of the programm not until

Re: Non-secure execution environment

2009-04-17 Thread Aaron Brady
On Apr 17, 11:19 am, roge...@gmail.com wrote: On Apr 17, 7:06 am, Aaron Brady castiro...@gmail.com wrote: snip It depends what you mean by secure environment.  One option is to create a subprocess, to just limit access your variables.  Another is to compile and examine their code yourself,

Re: Non-secure execution environment

2009-04-17 Thread rogeeff
On Apr 17, 3:16 am, Ken Seehart k...@seehart.com wrote: roge...@gmail.com wrote: Hi, I am C++ guy for the most part and don't know much of Python, so, please, bear with me if I am asking errrm..idiotic question. Old rexec module provided kinda 'secure' execution environment. I am not

Re: Suggestions wanted on Tkinter problem

2009-04-17 Thread norseman
Dave Angel wrote: norseman wrote: div class=moz-text-flowed style=font-family: -moz-fixedOne suggested I change the subject line - OK I also replaced the [TAB]s since I noticed the Emailer seems to get very confused with them. Problem: Using Python 2.5.2 and Tkinter ??? (came with

Re: script question

2009-04-17 Thread Scott David Daniels
gitulyar wrote: On Apr 17, 5:23 pm, Scott David Daniels scott.dani...@acm.org wrote: Marco Mariani wrote: Piet van Oostrum wrote: funclist = [func01, func02, func03, ... ] for i in range(1,n): funclist[i]() Or myscript.funclist[i]() from another module. ... For example, you could do it

cPickle and subclassing lists?

2009-04-17 Thread Reckoner
I have a large class that is a child of list. I need to pickle it, but it's not working. For example, I have reduced it to the following: class Mylist(list): def __init__(self,x=[]): list.__init__(self,x) and I cannot even get this to pickle right. w=Mylist([1,2,3]) dumps(w)

Re: Help improve program for parsing simple rules

2009-04-17 Thread Paul McGuire
On Apr 17, 10:43 am, John Machin sjmac...@lexicon.net wrote: I don't see how it can handle the chained relop in the last two testcases e. g. '0.00 LE A LE 4.00' -- unless relops are chained by default in your parser. John - First of all, to respect precedence of operations, higher level

unpythonic use of property()?

2009-04-17 Thread J Kenneth King
Consider: code: class MyInterface(object): def __get_id(self): return self.__id id = property(fget=__get_id) def __init__(self, id, foo): self.__id = id self.foo = foo class

Re: QT , Wxwidgets are not just UI framework ?

2009-04-17 Thread Phil Thompson
On Fri, 17 Apr 2009 07:04:40 -0700 (PDT), Deep_Feelings doctore...@gmail.com wrote: On Apr 17, 1:52 pm, Diez B. Roggisch de...@nospam.web.de wrote: Deep_Feelings wrote: qt include many libraries : network , threading,database ..etc while Wxwidgets seem similar but with less scope my

Re: cPickle and subclassing lists?

2009-04-17 Thread Peter Otten
Reckoner wrote: I have a large class that is a child of list. I need to pickle it, but it's not working. For example, I have reduced it to the following: class Mylist(list): def __init__(self,x=[]): list.__init__(self,x) and I cannot even get this to pickle right.

Re: compiler package vs parser

2009-04-17 Thread Kay Schluehr
I realize that I probably ought to be trying this out with the newer ast stuff, but currently I am supporting code back to 2.3 and there's not much hope of doing it right there without using the compiler package. You might consider using the *builtin* parser module and forget about the

Re: cPickle and subclassing lists?

2009-04-17 Thread Reckoner
On Apr 17, 10:42 am, Peter Otten __pete...@web.de wrote: Reckoner wrote: I have a large class that is a child of list. I need to pickle it, but it's not working. For example, I have reduced it to the following: class Mylist(list): def __init__(self,x=[]): list.__init__(self,x)

Re: [Python-Dev] RELEASED Python 2.6.2

2009-04-17 Thread Russell Owen
On Apr 16, 2009, at 11:17 PM, Ronald Oussoren wrote: On 16 Apr, 2009, at 20:58, Russell Owen wrote: I installed the Mac binary on my Intel 10.5.6 system and it works, except it still uses Apple's system Tcl/Tk 8.4.7 instead of my ActiveState 8.4.19 (which is in /Library/Frameworks where

Re: script question

2009-04-17 Thread python
Scott, Newbie question (and I'm not the OP): What are your thoughts on having your decorator add an attribute to the functions vs. placing the functions in a global variable? def _included(f): f._included = True return f I tried experimenting with this technique, but could not find a

Re: cPickle and subclassing lists?

2009-04-17 Thread Peter Otten
Reckoner wrote: On Apr 17, 10:42 am, Peter Otten __pete...@web.de wrote: Reckoner wrote: I have a large class that is a child of list. I need to pickle it, but it's not working. For example, I have reduced it to the following: class Mylist(list): def __init__(self,x=[]):

Re: cPickle and subclassing lists?

2009-04-17 Thread Piet van Oostrum
Reckoner recko...@gmail.com (R) wrote: R I have a large class that is a child of list. I need to pickle it, but R it's not working. For example, I have reduced it to the following: R class Mylist(list): R def __init__(self,x=[]): R list.__init__(self,x) R and I cannot even get this to

Re: Help improve program for parsing simple rules

2009-04-17 Thread Aaron Brady
On Apr 17, 7:37 am, prueba...@latinmail.com wrote: On Apr 16, 3:59 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 16, 10:57 am, prueba...@latinmail.com wrote: Another interesting task for those that are looking for some interesting problem: I inherited some rule system that

Re: binary file compare...

2009-04-17 Thread Adam Olsen
On Apr 17, 5:30 am, Tim Wintle tim.win...@teamrubber.com wrote: On Thu, 2009-04-16 at 21:44 -0700, Adam Olsen wrote: The Wayback Machine has 150 billion pages, so 2**37.  Google's index is a bit larger at over a trillion pages, so 2**40.  A little closer than I'd like, but that's still

Re: Help improve program for parsing simple rules

2009-04-17 Thread Aaron Brady
On Apr 17, 12:15 pm, Paul McGuire pt...@austin.rr.com wrote: On Apr 17, 10:43 am, John Machin sjmac...@lexicon.net wrote: snip not only does this handle 0.00 LE A LE 4.00, but it could also evaluate 0.00 LE A LE 4.00 LE E D.  (I see that I should actually do some short-circuiting here - if

can't install new modules after updating python

2009-04-17 Thread lie
I've updated from python 2.5 to 2.6 on my Slackware 12.2, by compiling the 2.6 source. When I try to use slapt-get to install a new module for python, it installs in the old version, and I can't use it. How can I fix this? Should I go back to 2.5? --

  1   2   3   >