Re: Create standalone Windows program with simple graphics?

2009-04-16 Thread edexter
On Apr 17, 1:48 am, edexter wrote: > On Apr 16, 8:12 am, Poster28 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. > > >

Re: Domain Driven Design and Python

2009-04-16 Thread José María
On Apr 16, 7:11 pm, Stef Mientki 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#? > > > Chee

Re: Create standalone Windows program with simple graphics?

2009-04-16 Thread edexter
On Apr 16, 8:12 am, Poster28 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 that? Which librari

Non-secure execution environment

2009-04-16 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

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

2009-04-16 Thread alex23
On Apr 17, 4:36 pm, Andreas Otto 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

howto submit documentation bugs on python V3 web-site ?

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

Re: Question to python C API

2009-04-16 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

Re: polar plots, clockwise, north

2009-04-16 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: How do I change the behavior of the 'python-docs' action in IDLE?

2009-04-16 Thread Raymond Hettinger
On Apr 16, 12:02 pm, samwyse 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 in config-key

Re: [Python-Dev] RELEASED Python 2.6.2

2009-04-16 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 ActiveSt

Re: Accessing a parse tree

2009-04-16 Thread Aaron Brady
On Apr 16, 10:16 pm, John Machin wrote: > On Apr 17, 8:55 am, Clarendon wrote: > > > > > Hello! > > > I need a program that accesses a parse tree based on the designated > > words (terminals) within the tree. For instance, in: > > > I came a long way in changing my habit. > > > (ROOT > >   (S > >

Re: binary file compare...

2009-04-16 Thread Adam Olsen
On Apr 16, 4:27 pm, "Rhodri James" wrote: > On Thu, 16 Apr 2009 10:44:06 +0100, Adam Olsen wrote: > > On Apr 16, 3:16 am, Nigel Rantor wrote: > >> Okay, before I tell you about the empirical, real-world evidence I have > >> could you please accept that hashes collide and that no matter how many

Re: How to access C structures

2009-04-16 Thread Mark Tolonen
"Chris Helck" wrote in message news:6db873c2999f7547ad0d1c0e6f0c89d704285...@uspsexchs1.us.icap.com... 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,

Re: ANN: PyGUI 2.0.1

2009-04-16 Thread greg
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 on Windows -- I could

Re: [Python-Dev] RELEASED Python 2.6.2

2009-04-16 Thread Ned Deily
In article , 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). > > I just built python from source and th

Re: Accessing a parse tree

2009-04-16 Thread John Machin
On Apr 17, 8:55 am, Clarendon wrote: > Hello! > > I need a program that accesses a parse tree based on the designated > words (terminals) within the tree. For instance, in: > > I came a long way in changing my habit. > > (ROOT >   (S >     (NP (PRP I)) >     (VP (VBD came) >       (NP (DT a) (JJ l

Re: Suggestions wanted on Tkinter problem

2009-04-16 Thread Dave Angel
norseman wrote: One 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 system) List made and for loop in use lst=[ ("S", "Single"),

Re: Is there any way to find out the definition of a function in a file of C language?

2009-04-16 Thread Jebel
On Apr 17, 4:04 am, Dan wrote: > you rule, just for your sig...  Zork in all forms ftw > > namekuseijin wrote: > >Jebelescreveu: > >> Hi ,everyone. I have the name of a function of C language, and have > >> the source file which the function is defined in. And I want to find > >> out the type and

Getting Newsgroup Headers

2009-04-16 Thread R. David Murray
aslkoi fdsda wrote: > I would like to read just the headers out of a newsgroup. > Being a Python newbie, I was wondering if this is possible and how difficult > it would be for a novice Python programmer. > Thanks for any reply! > [HTML part not displayed] It's not hard at all. I've pulled some

Re: [OT] large db question about no joins

2009-04-16 Thread Paul Rubin
Daniel Fetchinson writes: > Yes, sorry for using the wrong words, my question then is how do I > solve a problem similar to my zoo/cage/animal/leg problem with > distributed databases? In the case of BigTable, you could write a suitable MapReduce task. You might look at the Wikipedia articles abo

Re: December 21, 2012: Judgment Day

2009-04-16 Thread Ken Seehart
MRAB wrote: Mensanator wrote: On Apr 16, 2:46 am, Thara wrote: Science can neither confirm nor discredit the validity of many religiously or prophetically deemed judgment days of the future, the soonest of which will be arriving December 21, 2012, the final day of the Mayan Calendar. No big

Re: Help improve program for parsing simple rules

2009-04-16 Thread John Machin
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? -- http://mail.python.org/mailman/listinfo/python-list

ANN: PyGUI 2.0.2

2009-04-16 Thread Greg Ewing
PyGUI 2.0.2 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Fixes problem on Windows causing "This file should not be imported" error. What is PyGUI? -- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. -- Gre

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
>> [off but interesting topic] > > >> What would be the corresponding database layout that would scale and I >> could get the total number of legs in the zoo or total number of >> animals in the zoo without join(s)? >> >> Cheers, >> Daniel >> >> [/off but interesting topic] >> > > That all comes d

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
>> If you think that's bull, why do you think the google app engine or >> bigtable doesn't support joins? > > Join is a relational database concept. Bigtable is not a relational > database. Of course it does lookups, but they are not the same as > relational joins. True! I gave a use case that c

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
Hi folks, I've come across many times the claim that 'joins are bad' for large databases because they don't scale >>> IMO that's bull... >> >> If you think that's bull, why do you think the google app engine or >> bigtable doesn't support joins? > > "Large database" is not synonymous with

Re: December 21, 2012: Judgment Day

2009-04-16 Thread MRAB
Mensanator wrote: On Apr 16, 2:46 am, Thara wrote: Science can neither confirm nor discredit the validity of many religiously or prophetically deemed judgment days of the future, the soonest of which will be arriving December 21, 2012, the final day of the Mayan Calendar. No big deal, the las

Re: Suggestions wanted on Tkinter problem

2009-04-16 Thread Rhodri James
On Fri, 17 Apr 2009 00:18:03 +0100, norseman wrote: One 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 system) List made and for loo

Re: Passing all extra commandline arguments to python program, Optparse raises exception

2009-04-16 Thread Saptarshi
> > Saptarshi > > Preprocess the sys.args before calling optparse. > Simply search sys.args for the string "start" and the string "stop", and > note whichever comes first.  Then use slice operators to peel the extra > arguments off of sys.args. Thanks, i implemented your logic. I thought there wa

Re: [OT] large db question about no joins

2009-04-16 Thread Paul Rubin
Daniel Fetchinson writes: > If you think that's bull, why do you think the google app engine or > bigtable doesn't support joins? Join is a relational database concept. Bigtable is not a relational database. Of course it does lookups, but they are not the same as relational joins. -- http://mai

Re: binary file compare...

2009-04-16 Thread Adam Olsen
On Apr 16, 11:15 am, SpreadTooThin 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 cryptography are wrong. The birthday problem

Re: Man Bites Python

2009-04-16 Thread Mikael Olofsson
I don't think the guy in question finds it that funny. Roy Hyunjin Han wrote: Hahaha! On Thu, Apr 16, 2009 at 10:27 AM, Aahz wrote: http://news.yahoo.com/s/nm/20090415/od_nm/us_python_odd_1/print -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this new

Re: December 21, 2012: Judgment Day

2009-04-16 Thread Mensanator
On Apr 16, 2:46 am, Thara wrote: > Science can neither confirm nor discredit the validity of many > religiously or prophetically deemed judgment days of the future, the > soonest of which will be arriving December 21, 2012, the final day of > the Mayan Calendar. No big deal, the last Harry Potter

Re: [OT] large db question about no joins

2009-04-16 Thread norseman
Robert Kern wrote: ...(snip) "Large database" is not synonymous with "distributed database". === True! And cross-code lookup tables can make otherwise very large 'bytes on disk' rather small overall. Z3 in common_names.dbf African Pygmy Zebra Z3 i

Re: [OT] large db question about no joins

2009-04-16 Thread Robert Kern
On 2009-04-16 18:05, Daniel Fetchinson wrote: Hi folks, I've come across many times the claim that 'joins are bad' for large databases because they don't scale IMO that's bull... If you think that's bull, why do you think the google app engine or bigtable doesn't support joins? "Large databa

Re: Create standalone Windows program with simple graphics?

2009-04-16 Thread Gabriel Genellina
En Thu, 16 Apr 2009 12:44:03 -0300, Poster28 escribió: What is the easiest way to do that? Which libraries or compilers I should use? http://www.py2exe.org/ Will it work with any graphics library? It works with most "normal" modules, but some libraries require special measures. See the

Suggestions wanted on Tkinter problem

2009-04-16 Thread norseman
One 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 system) List made and for loop in use lst=[ ("S", "Single"), .] f

Re: [OT] large db question about no joins

2009-04-16 Thread Martin P. Hellwig
Daniel Fetchinson wrote: [off but interesting topic] What would be the corresponding database layout that would scale and I could get the total number of legs in the zoo or total number of animals in the zoo without join(s)? Cheers, Daniel [/off but interesting topic] That all comes down

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
>> Hi folks, I've come across many times the claim that 'joins are bad' >> for large databases because they don't scale > > IMO that's bull... If you think that's bull, why do you think the google app engine or bigtable doesn't support joins? Cheers, Daniel -- Psss, psss, put it down! - http:/

Re: [OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
>> Hi folks, I've come across many times the claim that 'joins are bad' >> for large databases because they don't scale. > > I think that means joins with very large result sets and lots of > different values being matched on between the two tables. The usual > use of a join in, say, web server pr

Accessing a parse tree

2009-04-16 Thread Clarendon
Hello! I need a program that accesses a parse tree based on the designated words (terminals) within the tree. For instance, in: I came a long way in changing my habit. (ROOT (S (NP (PRP I)) (VP (VBD came) (NP (DT a) (JJ long) (NN way)) (PP (IN in) (S (VP (

Re: Suggestions wanted

2009-04-16 Thread Terry Reedy
Your subject line is way too vague, to the point of looking like spam. I only opened this because it was the last thread listed and I have time for 'one more'. Something like 'Creating multiple radio buttons with tkinter (2.5)' would be more likely to attract a reader with the specialized know

Re: binary file compare...

2009-04-16 Thread Rhodri James
On Thu, 16 Apr 2009 10:44:06 +0100, Adam Olsen wrote: On Apr 16, 3:16 am, Nigel Rantor wrote: Okay, before I tell you about the empirical, real-world evidence I have could you please accept that hashes collide and that no matter how many samples you use the probability of finding two files th

Re: any(), all() and empty iterable

2009-04-16 Thread Roel Schroeven
Dale Roberts schreef: > On Apr 16, 2:27 pm, Tim Chase wrote: >> Raymond Hettinger wrote: >>> I will not change the sentence to "return false if any element >>> of the iterable is false." The negations make the sentence >>> hard to parse mentally >> Just as a ribbing, that "return X if any element

Re: [OT] large db question about no joins

2009-04-16 Thread Paul Rubin
Daniel Fetchinson writes: > Hi folks, I've come across many times the claim that 'joins are bad' > for large databases because they don't scale. I think that means joins with very large result sets and lots of different values being matched on between the two tables. The usual use of a join in,

Re: PEP 382: Namespace Packages

2009-04-16 Thread Martin v. Löwis
> I've maybe missed some point, but doesn't the PEP requires > coordination so that *.pkg files have different names in each portion, > and the same if one want to provide a non empty __init__.py. To some degree, coordination is necessary. However, the PEP recommends that you use .pkg as the name;

Re: setuptools catch 22

2009-04-16 Thread Martin v. Löwis
> Thanks, Kay. Of course, the workaround would be better known if the > setuptools web page had those instructions instead of "install using > the [non-existent] .exe file." :-) The instructions were written before Python 2.6 was released. They haven't be updated since. Regards, Martin -- http:

Re: [OT] large db question about no joins

2009-04-16 Thread Peter Otten
John Fabiani wrote: > Daniel Fetchinson wrote: > >> Hi folks, I've come across many times the claim that 'joins are bad' >> for large databases because they don't scale > IMO that's bull... >> Okay, makes sense, we agree. ;) -- http://mail.python.org/mailman/listinfo/python-list

Suggestions wanted

2009-04-16 Thread norseman
Problem: Using Python 2.5.2 and Tkinter ??? (came with system) List made and for loop in use lst=[ ("S", "Single"), .] for mode, text c = Radiobuton(. c.pack() At this point the program runs, but I cannot control gray-o

Re: compiler package vs parser

2009-04-16 Thread Robin Becker
Kay Schluehr wrote: On 16 Apr., 11:41, Robin Becker 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 subsequent computations. In

Re: [OT] large db question about no joins

2009-04-16 Thread John Fabiani
Daniel Fetchinson wrote: > Hi folks, I've come across many times the claim that 'joins are bad' > for large databases because they don't scale IMO that's bull... -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems running on HP Intel duel core machine

2009-04-16 Thread jim-on-linux
On Thursday 11 December 2008 I wrote about the problem that I was having importing win32ui from within a program I wrote. This was happening only on some computers but not all. The win32ui module is used for printing. I never solved the problem until today. I installed only winXP on a hard d

Re: need to start a new project , can python do all that ?

2009-04-16 Thread Tim Rowe
2009/4/15 Rhodri James : > That's not sufficient.  It isn't enough that your program works, it also > has to satisfy the regulatory authorities otherwise (depending on what > country you're in) you could end up on the wrong end of some very > expensive law-suits without actually having done anythi

BaseHTTPRequestHandler delays server response after "Popen"ing a program that waits for user input? (getline, fgets, etc.)

2009-04-16 Thread gburde...@gmail.com
I'm trying to write a very simple HTTP client/server program where the client uploads a file via PUT using pycurl, and the server accepts the file, "POpen"s a program, sends back "HELLO" to the client, then displays "good morning". The problem is when the "POpen"ed C++ program (test1.cpp below) wa

Re: compiler package vs parser

2009-04-16 Thread Kay Schluehr
On 16 Apr., 11:41, Robin Becker 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 subsequent computations. In more recent versio

Re: Queue() question. This post is pretty long.

2009-04-16 Thread grocery_stocker
On Apr 16, 11:46 am, Piet van Oostrum wrote: > > grocery_stocker (g) wrote: > >g> [cdal...@localhost ~]$ python > >g> Python 2.4.3 (#1, Oct 1 2006, 18:00:19) > >g> [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 > >g> Type "help", "copyright", "credits" or "license" for more information. >

Re: setuptools catch 22

2009-04-16 Thread Mac
On Apr 16, 11:52 am, Kay Schluehr wrote: > Yes, but there is a known workaround: Thanks, Kay. Of course, the workaround would be better known if the setuptools web page had those instructions instead of "install using the [non-existent] .exe file." :-) -- http://mail.python.org/mailman/lis

Re: large db question about no joins

2009-04-16 Thread Aahz
In article , Aaron Brady wrote: > >Wait a second., how many legs in the zoo?? That's so you can find out how many to pull. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an

Re: Is there any way to find out the definition of a function in a file of C language?

2009-04-16 Thread Dan
you rule, just for your sig... Zork in all forms ftw namekuseijin wrote: Jebel escreveu: Hi ,everyone. I have the name of a function of C language, and have the source file which the function is defined in. And I want to find out the type and name of the parameters. If I need to analyze the fi

Re: looking for a pattern to code logic shared by gui/cli

2009-04-16 Thread MRAB
Andreas Balogh wrote: Only recently I have started developing code for application providing both a GUI and a command line interface (CLI). Naturally I want to reuse the business logic code for both GUI and CLI interfaces. The problem is to provide feedback to the GUI on the one hand, to the CL

Re: pyqt4: setText() inside a function

2009-04-16 Thread l . freschi
On 16 Apr, 20:17, "Diez B. Roggisch" wrote: > l.fres...@gmail.com schrieb: > > > > > I'm developing a PyQt4 application. > > > I have created a button: > > ... > > self.start_button=QtGui.QPushButton("start simulation", self) > > ... > > > that is connected to a function: > > ... > > self.connect(

Re: any(), all() and empty iterable

2009-04-16 Thread Luis Zarrabeitia
On Thursday 16 April 2009 02:46:24 pm Dale Roberts wrote: > On Apr 16, 2:27 pm, Tim Chase wrote: > > Yes, I now appreciate the motivation for having the word "all" in the > text, and simply adding something like "or the iterable is empty" > might head off future confusion. /me wonders how no one

Re: Help improve program for parsing simple rules

2009-04-16 Thread Aaron Brady
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 t

Re: looking for a pattern to code logic shared by gui/cli

2009-04-16 Thread Chris Rebert
On Thu, Apr 16, 2009 at 12:36 PM, Andreas Balogh wrote: > Only recently I have started developing code for application providing both > a GUI and a command line interface (CLI). Naturally I want to reuse the > business logic code for both GUI and CLI interfaces. The problem is to > provide feedbac

polar plots, clockwise, north

2009-04-16 Thread enricong
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? If matplotlib cannot do this, is there something that does work? -- http://mail.python

Re: any(), all() and empty iterable

2009-04-16 Thread Raymond Hettinger
> Thanks for weighing in, Raymond. You're welcome. > As long as people are getting in their > last licks on this one ... > > Including the word "all" in the definition of "all()" is suboptimal. > Especially since the everyday meaning of "all" is ambiguous. Sure, leave > in the code-equivalent to

Re: compiler package vs parser

2009-04-16 Thread Robin Becker
Robin Becker wrote: Aahz wrote: In article , Robin Becker wrote: Is the compiler package actually supposed to be equivalent to the parser module? Before I poke my nose into this, what versions of Python have you tried? I'm using 2.6. I just checked and it's the same in 2.5. -- Robin Bec

looking for a pattern to code logic shared by gui/cli

2009-04-16 Thread Andreas Balogh
Only recently I have started developing code for application providing both a GUI and a command line interface (CLI). Naturally I want to reuse the business logic code for both GUI and CLI interfaces. The problem is to provide feedback to the GUI on the one hand, to the CLI on the other hand -

Re: Is there any way to find out the definition of a function in a file of C language?

2009-04-16 Thread namekuseijin
Jebel escreveu: Hi ,everyone. I have the name of a function of C language, and have the source file which the function is defined in. And I want to find out the type and name of the parameters. If I need to analyze the file by myself, or have some way to do it more easily? ever heard of grep?

Re: compiler package vs parser

2009-04-16 Thread Robin Becker
Aahz wrote: In article , Robin Becker wrote: Is the compiler package actually supposed to be equivalent to the parser module? Before I poke my nose into this, what versions of Python have you tried? I'm using 2.6. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] RELEASED Python 2.6.2

2009-04-16 Thread Russell Owen
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). I just built python from source and that version does use ActiveState 8.4.19. I

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

2009-04-16 Thread grocery_stocker
On Apr 16, 4:12 am, Rüdiger Ranft <_r...@web.de> wrote: > 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 the programm finishes. Since the > output of the pro

Re: Data uploading to a ftp server

2009-04-16 Thread Aahz
In article , Ahmed, Shakir wrote: > >I am getting following error while uploading data to a ftp server. Any >help is highly appreciated. > >ftp.storbinary("stor erp.shp", ffile2,8192) > File "C:\Python24\lib\ftplib.py", line 419, in storbinary >conn.sendall(buf) > File "", line 1, in sen

Re: large db question about no joins

2009-04-16 Thread Aaron Brady
On Apr 16, 1:45 pm, Daniel Fetchinson wrote: > [off but interesting topic] > > Hi folks, I've come across many times the claim that 'joins are bad' > for large databases because they don't scale. Okay, makes sense, we > agree. But what I don't get, although I watched a couple of online > videos on

Re: any(), all() and empty iterable

2009-04-16 Thread John Posner
Tim Chase wrote: I will probably leave the lead-in sentence as-is but may add another sentence specifically covering the case for an empty iterable. as one of the instigators in this thread, I'm +1 on this solution. Thanks for weighing in, Raymond. As long as people are getting in their last

Re: Getting Newsgroup Headers

2009-04-16 Thread Chris Rebert
On Thu, Apr 16, 2009 at 9:25 AM, aslkoi fdsda wrote: > I would like to read just the headers out of a newsgroup. > Being a Python newbie, I was wondering if this is possible and how difficult > it would be for a novice Python programmer. > Thanks for any reply! See the `nntplib` [http://docs.pyth

Re: Domain Driven Design and Python

2009-04-16 Thread Stef Mientki
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#? Cheers. -- http://mail.python.org/mailman/listinfo/python-list I'm not a

Re: win32 wins settings

2009-04-16 Thread Tim Golden
Toff wrote: hello I don't understand why this doesn't woks. def setwins(self): from win32com.client import GetObject objWMIService = GetObject("winmgmts: {impersonationLevel=impersonate}!.\\root\\cimv2") colNicConfigs = objWMIService.ExecQuery ("SELECT * FROM Win32_N

Re: binary file compare...

2009-04-16 Thread Adam Olsen
On Apr 16, 8:59 am, Grant Edwards wrote: > On 2009-04-16, Adam Olsen wrote: > > I'm afraid you will need to back up your claims with real files. > > Although MD5 is a smaller, older hash (128 bits, so you only need > > 2**64 files to find collisions), > > You don't need quite that many to have a

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

2009-04-16 Thread samwyse
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 opens http://www.python.org/doc/current/. I'd prefer the former behavior. I know how to change the key bindings in config-keys.def, but I think I want to change the actio

Re: Domain Driven Design and Python

2009-04-16 Thread Chris Rebert
On Thu, Apr 16, 2009 at 10:44 AM, 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#? Reading the Wikipedia article

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

2009-04-16 Thread Chris Rebert
On Thu, Apr 16, 2009 at 9:55 AM, wrote: > Ravi: >> Which is a better approach. >> My personal view is that I should create a module with functions. > > When in doubt, use the simplest solution that works well enough. In > this case, module functions are simple and probably enough. > > But there c

Re: Queue() question. This post is pretty long.

2009-04-16 Thread Piet van Oostrum
> grocery_stocker (g) wrote: >g> [cdal...@localhost ~]$ python >g> Python 2.4.3 (#1, Oct 1 2006, 18:00:19) >g> [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 >g> Type "help", "copyright", "credits" or "license" for more information. > import Queue > queue = Queue.Queue() > >>

Re: any(), all() and empty iterable

2009-04-16 Thread Dale Roberts
On Apr 16, 2:27 pm, Tim Chase wrote: > Raymond Hettinger wrote: > > I will not change the sentence to "return false if any element > > of the iterable is false."  The negations make the sentence > > hard to parse mentally > > Just as a ribbing, that "return X if any element of the iterable > is X"

[OT] large db question about no joins

2009-04-16 Thread Daniel Fetchinson
[off but interesting topic] Hi folks, I've come across many times the claim that 'joins are bad' for large databases because they don't scale. Okay, makes sense, we agree. But what I don't get, although I watched a couple of online videos on this topic (one by the creator of flickr who gave a talk

Re: any(), all() and empty iterable

2009-04-16 Thread Paul Rudin
Tim Chase writes: > Changing the implementation of all() would break wy too much > stuff... Not to mention it clearly works correctly as is. *If* there is an issue it is a documentation one... not an implementation one. -- http://mail.python.org/mailman/listinfo/python-list

Re: Create standalone Windows program with simple graphics?

2009-04-16 Thread norseman
Poster28 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 that? Which libraries or compilers I should use? -

Re: any(), all() and empty iterable

2009-04-16 Thread Tim Chase
Raymond Hettinger wrote: I will not change the sentence to "return false if any element of the iterable is false." The negations make the sentence hard to parse mentally Just as a ribbing, that "return X if any element of the iterable is X" is of the same form as the original. The negation

Re: WHIFF - was: Re: Using Python after a few years of Ruby

2009-04-16 Thread Aaron Watters
On Apr 15, 4:35 pm, Gerhard Häring wrote: > WTF?! This is weird stuff! Why the hell would I use this instead of a > Python web framework like Django/Pylons/etc. Ok folks. I've added a page: "Whiff is cool because: How do you make a page like this using another package?" http://aaron.o

Re: pyqt4: setText() inside a function

2009-04-16 Thread Diez B. Roggisch
l.fres...@gmail.com schrieb: I'm developing a PyQt4 application. I have created a button: ... self.start_button=QtGui.QPushButton("start simulation", self) ... that is connected to a function: ... self.connect(self.start_button, QtCore.SIGNAL('clicked()'), self.simulate) ... This is the functi

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

2009-04-16 Thread norseman
Rüdiger Ranft wrote: 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 the programm finishes. Since the output of the programm is used to generate a progress indicat

pyqt4: setText() inside a function

2009-04-16 Thread l . freschi
I'm developing a PyQt4 application. I have created a button: ... self.start_button=QtGui.QPushButton("start simulation", self) ... that is connected to a function: ... self.connect(self.start_button, QtCore.SIGNAL('clicked()'), self.simulate) ... This is the function: ... def simulate(self):

Re: any(), all() and empty iterable

2009-04-16 Thread Raymond Hettinger
> The doc should speak to the intended audience: programmers, who like > to make sure all bases and cases are covered. FWIW, I wrote the docs. The pure python forms were put in as an integral part of the documentation. The first sentence of prose was not meant to stand alone. It is a lead-in to

Domain Driven Design and Python

2009-04-16 Thread José María
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#? Cheers. -- http://mail.python.org/mailman/listinfo/python-list

Re: binary file compare...

2009-04-16 Thread SpreadTooThin
On Apr 16, 3:16 am, Nigel Rantor wrote: > Adam Olsen wrote: > > On Apr 15, 12:56 pm, Nigel Rantor wrote: > >> Adam Olsen wrote: > >>> The chance of *accidentally* producing a collision, although > >>> technically possible, is so extraordinarily rare that it's completely > >>> overshadowed by the

Queue() question. This post is pretty long.

2009-04-16 Thread grocery_stocker
I don't get how item = self.__queue.get() gets advanced to if item is None: in the following code. >>> import time >>> from threading import Thread >>> import Queue >>> >>> WORKER = 2 >>> >>> class Worker(Thread): ... def __init__(self, queue): ... Thread.__init__(self) ...

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

2009-04-16 Thread bearophileHUGS
Ravi: > Which is a better approach. > My personal view is that I should create a module with functions. When in doubt, use the simplest solution that works well enough. In this case, module functions are simple and probably enough. But there can be a situation where you want to keep functions eve

Re: Question to python C API

2009-04-16 Thread Stefan Behnel
Andreas Otto wrote: > the problem with such kind of framework is usually > that you start with the easy stuff and than (after a couple > of days/weeks) you come to the difficult stuff and you > have to figure out that this kind of problem does not > fit into the tool. That is a very comm

Choose: class with static methods or module with functions

2009-04-16 Thread Ravi
I have to create a few helper/utility application-wide functions. There are two options: 1. Create a Utility class and all functions as static method of that class. 2. Create a module, utility.py and member functions. Which is a better approach. My personal view is that I should create a module

Getting Newsgroup Headers

2009-04-16 Thread aslkoi fdsda
I would like to read just the headers out of a newsgroup. Being a Python newbie, I was wondering if this is possible and how difficult it would be for a novice Python programmer. Thanks for any reply! -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >