the perens in lisp dilects is there for a reson... macros.

2006-08-04 Thread atbusbook
macros are sort of like c macros but more powerful. they are the manafestation of treating code like data. lisp code is just a textual representation of a data structure that is the list. this means that you can manipulate code to emulate structured controll constructs and elemanate boilerplate cod

Re: Hiding Console Output

2006-08-04 Thread John Savage
"Kkaa" <[EMAIL PROTECTED]> writes: >I'm using the os.system command in a python script on Windows to run a >batch file like this: > >os.system('x.exe') Is .exe really a batch file? >The third-party program x.exe outputs some text to the console that I >want to prevent from being displayed. Is th

Re: Pywin32 Excel question

2006-08-04 Thread [EMAIL PROTECTED]
John Henry wrote: > I posted the following message to the Pywin32 list but if anybody here > can help, it would be appreciated very much. > > > Hi list, > > I have a need to copy 3 rows of data from the top of my Excel > spreadsheet to another location. I would have t

Re: Extending/Embedding Confusion

2006-08-04 Thread Jane & Carl
I'm going through a bit of this myself.   What I've found useful is downloading the source to Python and comparing modules that I use a lot that are written in C (in my case datetime) and see how they are coded.  Also, if I am thinking of using a C API function to do something, I grep or us

Re: Design Patterns in Python

2006-08-04 Thread gene tani
Gabriel Genellina wrote: > Hello > > Most authors talk about Java/C++, and describe patterns used as a > workaround to their static class model; the dynamic nature of Python > allows for trivial implementations in some cases. Eckel's thinking in Python too http://www.mindview.net/Books/TIPython

Re: Design Patterns in Python

2006-08-04 Thread Dale Strickland-Clark
Gabriel Genellina wrote: > Hello > > Most authors talk about Java/C++, and describe patterns used as a > workaround to their static class model; the dynamic nature of Python > allows for trivial implementations in some cases. > I've seen some design patterns examples on the ActiveState site, and

Re: Design Patterns in Python

2006-08-04 Thread gene tani
Gabriel Genellina wrote: > Hello > > Most authors talk about Java/C++, and describe patterns used as a > workaround to their static class model; the dynamic nature of Python > allows for trivial implementations in some cases. > I've seen some design patterns examples on the ActiveState site, and >

Pywin32 Excel question

2006-08-04 Thread John Henry
I posted the following message to the Pywin32 list but if anybody here can help, it would be appreciated very much. Hi list, I have a need to copy 3 rows of data from the top of my Excel spreadsheet to another location. I would have throught that this should be very

Design Patterns in Python

2006-08-04 Thread Gabriel Genellina
Hello Most authors talk about Java/C++, and describe patterns used as a workaround to their static class model; the dynamic nature of Python allows for trivial implementations in some cases. I've seen some design patterns examples on the ActiveState site, and some discussions some time ago on

Re: Python open a named pipe == hanging?

2006-08-04 Thread Alex Martelli
Donn Cave <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Rochester <[EMAIL PROTECTED]> wrote: > > > I just found out that the general open file mechanism doesn't work > > for named pipes (fifo). Say I wrote something like this and it > > simply hangs python: > >

Re: Python open a named pipe == hanging?

2006-08-04 Thread Alex Martelli
Rochester <[EMAIL PROTECTED]> wrote: > Thank you for your advise. So, it turns out that fifos are quite useless > in Python programming then, which is quite disappointing to me :-( Uh? How so? They're exactly as useful (or useless) as in any other language: if you want the open-for-writing to

Re: Which Python API for PostgreSQL?

2006-08-04 Thread hiaips
I also recommend psycopg. --Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: MVC for wxWidgets or Tkinter?

2006-08-04 Thread Satya
samuraisam wrote: > Are there any MVC-framework-like libraries for wxWidgets or Tkinter for > Python? If so, any experiences with using them? I need to develop a > desktop application *fast* and experiences with the likes of Turbogears > have taught me that you can indeed develop very fast with a

Re: paramter passing question

2006-08-04 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I wrote a small app in wxPython using wxGlade as designer tool. wxGlade > brings and writes a lot of code by itself and thats where my confusion > started. Its about parameter passing. Here is my little confusion. > > ***CODE BEGINS***

MVC for wxWidgets or Tkinter?

2006-08-04 Thread samuraisam
Are there any MVC-framework-like libraries for wxWidgets or Tkinter for Python? If so, any experiences with using them? I need to develop a desktop application *fast* and experiences with the likes of Turbogears have taught me that you can indeed develop very fast with a framework and the MVC struc

Re: Enhanced Listbox

2006-08-04 Thread drodrig
Thanks for your reply. I have done this. It certainly helps. My biggest concern right now is the vertical space between the fonts in each row. I need more than the default and I'm not sure on how to go about achieving this. Also, the vertical lines between each row would be nice. H J van Rooyen wr

Re: Nested function scope problem

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 15:21:52, Dennis Lee Bieber wrote: > On Fri, 4 Aug 2006 14:09:15 -0300, Gerhard Fiedler <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Python === C >> Textual representation a === Address operator (&a) >> id(a) === Dereference operator (*a) >> >> I think I

Re: Which KDE IDE for Python?

2006-08-04 Thread baalbek
If you have Eclipse, I strongly recommend the pydev package (see http://pydev.sourceforge.net/ for install). Code completion, etc works great! Baalbek -- http://mail.python.org/mailman/listinfo/python-list

Re: Why do I require an "elif" statement here?

2006-08-04 Thread John Machin
[EMAIL PROTECTED] wrote: > Jim, what you wrote should work correctly. I'm curious as to why you > are doing it this way though. An easier way would be to take out all > this character processing and use the builtin string processing. I'm curious as to why Jim is doing it at all. Extract from C:\

Re: Programming Games with python, I know this subject was disccused need help

2006-08-04 Thread Grant Edwards
On 2006-08-04, Over G <[EMAIL PROTECTED]> wrote: >> http://www.pygame.org/news.html >> http://sourceforge.net/projects/pyallegro/ > Still can you shad more light on the second link, what is project > allegro ? Following a couple links on that second page gets you here: http://alleg.sourceforge.

Re: super quick question

2006-08-04 Thread John Machin
Chris wrote: > It's very beautiful. Thanks You think that's beautiful? Try these: 'abcdef'[::-1] 'abcdef'[::-2] Cheers, John -- http://mail.python.org/mailman/listinfo/python-list

Re: super quick question

2006-08-04 Thread Chris
It's very beautiful. Thanks jwoolard wrote: > Chris wrote: > > is there a prettier way to do this? > > string[:len(string)-1] > > > > thanks! > > string[:-1] > > Negative indices count from the end of the string! beautiful isn't it? -- http://mail.python.org/mailman/listinfo/python-list

Re: regex question

2006-08-04 Thread John Machin
Slawomir Nowaczyk wrote: > On Thu, 03 Aug 2006 22:10:55 +0100 > Gabriel Murray <[EMAIL PROTECTED]> wrote: > > #> Hello, I'm looking for a regular expression > > Some people, when confronted with a problem, think "I know, I'll > use regular expressions." Now they have two problems. >

Re: Pydev with Eclipse on OSX Q

2006-08-04 Thread Michiel Sikma
On Aug 4, 2006, at 7:39 PM, Fabio Zadrozny wrote: > > On 8/4/06, Michiel Sikma <[EMAIL PROTECTED]> wrote: Hey guys. > I'm trying to run Pydev on Eclipse on OSX, but I've got a > problem that prevents me from making new projects in it. It seems > that I cannot add my Python interpreter to the li

Re: super quick question

2006-08-04 Thread jwoolard
Chris wrote: > is there a prettier way to do this? > string[:len(string)-1] > > thanks! string[:-1] Negative indices count from the end of the string! beautiful isn't it? -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Games with python, I know this subject was disccused need help

2006-08-04 Thread Over G
Goalie_Ca wrote: > Well, with these libraries you won't need much else. > > http://www.pygame.org/news.html > and > http://sourceforge.net/projects/pyallegro/ > > > Over G wrote: > > HI > > > > I would like to start to program games, with python, where to start? > > > > What packages I need,? > >

Re: Which Python API for PostgreSQL?

2006-08-04 Thread Dave Cook
On 2006-08-04, Redefined Horizons <[EMAIL PROTECTED]> wrote: > What are the advanatages and disadvantages of each? Which one do you > use? What do you like about it? I would use psycopg: http://www.initd.org I believe it's the most full-featured postgres module. There's a windows installer. D

super quick question

2006-08-04 Thread Chris
is there a prettier way to do this? string[:len(string)-1] thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Games with python, I know this subject was disccused need help

2006-08-04 Thread Goalie_Ca
Well, with these libraries you won't need much else. http://www.pygame.org/news.html and http://sourceforge.net/projects/pyallegro/ Over G wrote: > HI > > I would like to start to program games, with python, where to start? > > What packages I need,? > > Thanks. -- http://mail.python.org/mai

Programming Games with python, I know this subject was disccused need help

2006-08-04 Thread Over G
HI I would like to start to program games, with python, where to start? What packages I need,? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

paramter passing question

2006-08-04 Thread diffuser78
I wrote a small app in wxPython using wxGlade as designer tool. wxGlade brings and writes a lot of code by itself and thats where my confusion started. Its about parameter passing. Here is my little confusion. ***CODE BEGINS class MyFrame1(wx.Frame):

Which Python API for PostgreSQL?

2006-08-04 Thread Redefined Horizons
I have been working with PostgreSQL for a while, and have just made the move to Python a couple of months ago. I noticed that there are at least 2 Python API's to PostgreSQL. I have looked at PygreSQL and PostgrePy. What are the advanatages and disadvantages of each? Which one do you use? What do

Re: Need help building boost python on mac os x.

2006-08-04 Thread Simon Forman
KraftDiner wrote: > Could someone point me to step by step instructions on building boost > python on mac os x? > I have bjam running.. I have the boost source... but the tests are > failing.. > Probably something to do with environement variables... > Anyone with time? You might also ask on the

Re: Windows vs. Linux

2006-08-04 Thread Bryan Olson
Duncan Booth wrote: > Bryan Olson wrote: > >> Duncan Booth wrote: >>> Any other Microsoft commands I try all complain about 'invalid >>> switch'. >> >> The first I noticed were their build tools. Their version of >> "make", called "nmake", and their visual studio tools will >> accept either forw

Extending/Embedding Confusion

2006-08-04 Thread jeremito
I am trying to learn how to extend and/or embed Python. I have looked at the document "Extending and Embedding the Python Interpreter" and also "Python/C API Reference Manual. In the examples shown in "Extending..." there are some things I ma not familiar with so I turn to the index in the Refere

Re: SWIG Python Extension winth C++ Problematic

2006-08-04 Thread Chandrashekhar kaushik
Hi skipthanks for replying I made a small test case that fails with a similar problem This is how it looks 1. Two simple classes A and B , each holds an integer.2. A has a function getB() that returns pointer to B. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\#ifndef __AB_H__#define __AB_H__c

Re: Why do I require an "elif" statement here?

2006-08-04 Thread Justin Azoff
Jim wrote: > Could somebody tell me why I need the "elif char == '\n'" in the > following code? > This is required in order the pick up lines with just spaces in them. > Why doesn't > the "else:" statement pick this up? No idea. Look at the profile of your program: for.. if.. for.. if.. else.. if

using an already running COM object with Dispatch

2006-08-04 Thread jiccab
Greetings. with the following code, olApp = Dispatch("Outlook.Application") I am capable of getting a new instance of Outlook running. I would like to be able to use the instance that is already running, if exists, otherwise open a new one. Has anyone being able to do this? -- http://mail.py

Re: Web Crawling/Threading and Things That Go Bump in the Night

2006-08-04 Thread [EMAIL PROTECTED]
Rem, what OS are you trying this on? Windows XP SP2 has a limit of around 40 tcp connections per second... Remarkable wrote: > Hello all > > I am trying to write a reliable web-crawler. I tried to write my own > using recursion and found I quickly hit the "too many sockets" open > problem. So I lo

Re: Why do I require an "elif" statement here?

2006-08-04 Thread [EMAIL PROTECTED]
Jim, what you wrote should work correctly. I'm curious as to why you are doing it this way though. An easier way would be to take out all this character processing and use the builtin string processing. See this code: --- whitespace = " " old_indent = 3 new_indent = 5

Re: Why do I require an "elif" statement here?

2006-08-04 Thread Tim Chase
> Could somebody tell me why I need the "elif char == '\n'" in > the following code? > > This is required in order the pick up lines with just spaces > in them. > Why doesn't the "else:" statement pick this up? Following through with the below code: if the line consists of only a newline, it get

An interesting way to implement an abstract base class

2006-08-04 Thread olsongt
This one made me smile. From: http://aima.cs.berkeley.edu/python/utils.html#Queue class Queue: """Queue is an abstract class/interface. There are three types: Stack(): A Last In First Out Queue. FIFOQueue(): A First In First Out Queue. PriorityQueue(lt): Queue where i

Re: Python open a named pipe == hanging?

2006-08-04 Thread Antoon Pardon
On 2006-08-04, Rochester <[EMAIL PROTECTED]> wrote: > Thank you for your advise. So, it turns out that fifos are quite useless > in Python programming then, which is quite disappointing to me :-( > > I am not saying that I _have to_ use fifo, afterall it is a rather odd > thingy not in fasion

Re: Pydev with Eclipse on OSX Q

2006-08-04 Thread Fabio Zadrozny
On 8/4/06, Michiel Sikma <[EMAIL PROTECTED]> wrote: Hey guys. I'm trying to run Pydev on Eclipse on OSX, but I've got aproblem that prevents me from making new projects in it. It seemsthat I cannot add my Python interpreter to the list of interpreters(it seems to do _something_ when I select it, bu

Why do I require an "elif" statement here?

2006-08-04 Thread Jim
Could somebody tell me why I need the "elif char == '\n'" in the following code? This is required in order the pick up lines with just spaces in them. Why doesn't the "else:" statement pick this up? OLD_INDENT = 5 # spaces NEW_INDENT = 4 # spaces print 'Reindent.py:' print '\nFrom file %s' % in

Re: Python open a named pipe == hanging?

2006-08-04 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Rochester <[EMAIL PROTECTED]> wrote: > Thank you for your advise. So, it turns out that fifos are quite useless > in Python programming then, which is quite disappointing to me :-( > > I am not saying that I _have to_ use fifo, afterall it is a rather odd > t

Re: Need a compelling argument to use Django instead of Rails

2006-08-04 Thread Bruno Desthuilliers
Paul Rubin wrote: > "Ben Sizer" <[EMAIL PROTECTED]> writes: >> Another perfectly good reason is that PHP pages are much simpler to >> deploy than any given Python application server. Just add the code into >> your HTML pages as required and you're done. Python could come close to >> this if somethi

Re: Nested function scope problem

2006-08-04 Thread Antoon Pardon
On 2006-08-04, Gerhard Fiedler <[EMAIL PROTECTED]> wrote: > On 2006-08-04 12:12:44, Antoon Pardon wrote: > >>> That's possible. I wouldn't expect too many C programmers to have any >>> notion of "id of a variable". I, for example, never thought about such >>> thing before this thread. >> >> But ev

Re: Nested function scope problem

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 11:41:03, Slawomir Nowaczyk wrote: > #> > I disagree. At least in my understanding, which, up to now, was > #> > perfectly enough to explain everything about how Python variables > #> > behave: > #> > > #> > The address operator in C is what textual representation (i.e. what > #> >

Re: Windows vs. Linux

2006-08-04 Thread Jorgen Grahn
On Tue, 1 Aug 2006 14:47:59 -0300, Gerhard Fiedler <[EMAIL PROTECTED]> wrote: > On 2006-08-01 12:31:01, Sybren Stuvel wrote: ... > Is that really true? From what I know, it's more like this: > > - Unix-type systems: '/' > - Windows-type systems: '\' > - Mac OS: ':' > - OpenVMS: '.' > - ... > > Mayb

Need help building boost python on mac os x.

2006-08-04 Thread KraftDiner
Could someone point me to step by step instructions on building boost python on mac os x? I have bjam running.. I have the boost source... but the tests are failing.. Probably something to do with environement variables... Anyone with time? -- http://mail.python.org/mailman/listinfo/python-list

Re: web searching scripts

2006-08-04 Thread Jorgen Grahn
On Fri, 04 Aug 2006 18:11:18 +0200, Avell Diroll <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> Does anyone know of a freely available script that can take a given URL >> and follow every link within it? >> >> Ideally, I would like to start with this to build a quick application >> to gr

Re: Nested function scope problem

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 12:12:44, Antoon Pardon wrote: >> That's possible. I wouldn't expect too many C programmers to have any >> notion of "id of a variable". I, for example, never thought about such >> thing before this thread. > > But even in Python we don't speak of "id of a variable". It is not the >

Re: Windows vs. Linux

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 09:58:34, Sybren Stuvel wrote: >> They all (well, most of them) use computers in their administration; >> /that's/ the cost I was talking about, not the cost for the software >> industry :) > > Good point. Time more people started using Open Source :) Definitely. But don't hold you

Re: web searching scripts

2006-08-04 Thread Avell Diroll
[EMAIL PROTECTED] wrote: > Does anyone know of a freely available script that can take a given URL > and follow every link within it? > > Ideally, I would like to start with this to build a quick application > to grab all the content off a website to publish it to a CD. > > Thanks, > > jul >

Re: What is the best way to print the usage string ?

2006-08-04 Thread Steven Bethard
Ben Finney wrote: > "Leonel Gayard" <[EMAIL PROTECTED]> writes: > >> import sys >> args = sys.argv[1:] >> if args == []: >> print """Concat: concatenates the arguments with a colon (:) between >> them >> Usage: concat arg1 [arg2...] >> Example: concat a b c prints \"a.jar:b.jar:c/\ >>

Re: Python open a named pipe == hanging?

2006-08-04 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Rochester <[EMAIL PROTECTED]> wrote: > I just found out that the general open file mechanism doesn't work > for named pipes (fifo). Say I wrote something like this and it > simply hangs python: > > #!/usr/bin/python > > import os > > os.mkfifo('m

web searching scripts

2006-08-04 Thread julien . lord
Does anyone know of a freely available script that can take a given URL and follow every link within it? Ideally, I would like to start with this to build a quick application to grab all the content off a website to publish it to a CD. Thanks, jul -- http://mail.python.org/mailman/listinfo/pyt

Re: Python open a named pipe == hanging?

2006-08-04 Thread Rochester
Thank you for your advise. So, it turns out that fifos are quite useless in Python programming then, which is quite disappointing to me :-( I am not saying that I _have to_ use fifo, afterall it is a rather odd thingy not in fasion since the last iceage... I am just disappointed by the fact

Re: Windows vs. Linux

2006-08-04 Thread andrew clarke
On Fri, Aug 04, 2006 at 02:01:58PM +0200, Sybren Stuvel wrote: > > OS/2 (and eComStation) also uses the backslash as the path > > separator. > > You mean OS/2 is still in actual use? 'fraid so. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to force a thread to stop

2006-08-04 Thread H J van Rooyen
"Gerhard Fiedler" <[EMAIL PROTECTED]> wrote: | On 2006-08-04 02:33:07, H J van Rooyen wrote: | | > The next step above the 555 is a PIC... then you can steal power from the | > RS-232 line - and its a small step from "PIC" to "PIG"... | | I see... you obviously know what to do, if you want to :)

Re: python-dev Summary for 2006-06-16 through 2006-06-30

2006-08-04 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWeek #3 in September!

2006-08-04 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANNOUNCE] Thirty-fourth release of PythonCAD now available

2006-08-04 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 2.5 (beta 3)

2006-08-04 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list

Re: [Linux] What toolkit for a good grid/spreadsheet widget?

2006-08-04 Thread Vincent Delporte
On Fri, 04 Aug 2006 10:58:42 GMT, Dave Cook <[EMAIL PROTECTED]> wrote: >But both pyqt and wxpython also offer that. Try running the demos for each. Thx everyone! -- http://mail.python.org/mailman/listinfo/python-list

new Python release date (Sept. 12)

2006-08-04 Thread John Salerno
just in case you don't check the PEP obsessively like i do (i'm really excited for 2.5!), the new release dates are: rc 1:August 18, 2006 [planned] final: September 12, 2006 [planned] although in the Abstract it still shows August 19...where can that be reported? -- http://mail.python.or

Re: wxPython font color

2006-08-04 Thread Avizoa
Fonts don't have colors. You need to either change the text color in whatever widget the test is going or change the wx.Brush in your Paint method. Kiran wrote: > hey everybody, > i cant seem to find a way to create a font with a non-default color > using the wx.Font constructor. anybody know

Re: Nested function scope problem

2006-08-04 Thread Antoon Pardon
On 2006-08-04, Slawomir Nowaczyk <[EMAIL PROTECTED]> wrote: > On Fri, 04 Aug 2006 10:10:45 -0300 > Gerhard Fiedler <[EMAIL PROTECTED]> wrote: > > #> You can hardly claim that what gets printed is the "id" of the variable c. > #> (Well, you can claim, but few C programmers would follow you.) > > Tha

Re: Problem reading/writing files

2006-08-04 Thread Roel Schroeven
[EMAIL PROTECTED] schreef: > Well, now I tried running the script and it worked fine with the .gfx > file. Originally I was working using the IDLE, which I wouldn't have > thought would make a difference, but when I ran the script on its own > it worked fine and when I ran it in the IDLE it didn't

Re: Problem reading/writing files

2006-08-04 Thread smeenehan
Well, now I tried running the script and it worked fine with the .gfx file. Originally I was working using the IDLE, which I wouldn't have thought would make a difference, but when I ran the script on its own it worked fine and when I ran it in the IDLE it didn't work unless the data was in a text

Re: Need a compelling argument to use Django instead of Rails

2006-08-04 Thread aaronwmail-usenet
Ben Sizer wrote: > [EMAIL PROTECTED] wrote: > > Paul Rubin wrote: > > > A typical shared hosting place might > > > support 1000's of users with ONE apache/php instance (running in a > > > whole bunch of threads or processes, to be sure). > > > > You just need to run multiple apache > > instances, w

Re: [Linux] What toolkit for a good grid/spreadsheet widget?

2006-08-04 Thread Philippe Martin
jean-michel bain-cornu wrote: > Hi, >> Thx for the two pointers. Are those widgets more than just tables, ie. >> can I edit the contents, including displaying a combo box, can items >> be grouped or hierarchized, or are they just basic, read-only tables >> to display results? >> >> I need this ki

Re: Nested function scope problem

2006-08-04 Thread Slawomir Nowaczyk
On Fri, 04 Aug 2006 10:10:45 -0300 Gerhard Fiedler <[EMAIL PROTECTED]> wrote: #> On 2006-08-04 07:36:25, Slawomir Nowaczyk wrote: #> #> > #> The address operator is probably for a C programmer the closest to #> > #> what the id() function is to a Python programmer. #> > #> > I disagree. At least

Re: programming is hard

2006-08-04 Thread John Salerno
placid wrote: > [EMAIL PROTECTED] wrote: >> placid wrote: >>> Alas, all good arguments. >>> >>> I rest my case. >> After you've just been proven wrong? >> >> I wouldn't want you for my lawyer. > > Aha, lucky i wont be a lawyer. > lawyering is hard too ;) -- http://mail.python.org/mailman/listin

wxPython font color

2006-08-04 Thread Kiran
hey everybody, i cant seem to find a way to create a font with a non-default color using the wx.Font constructor. anybody know how to change hte color? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Running queries on large data structure

2006-08-04 Thread Christoph Haas
On Friday 04 August 2006 15:23, Amit Khemka wrote: > Though some sugggested maintaining data in some XML structures, I was > wondering that > if you considered using some native XML database like BDB XML. > > 1. It allows you to retain hierarchical structure of data. > 2. It also has support for pr

Re: Using Python for my web site

2006-08-04 Thread Ben Sizer
Cliff Wells wrote: > On Mon, 2006-07-31 at 22:25 -0700, Luis M. González wrote: > > IMHO the best way of using mod_python is with its publisher handler. > > It let's you code your applications in a MVC (model view controller) > > style. > > While I agree (or at least consider the point moot) that t

Re: Problem reading/writing files

2006-08-04 Thread Roel Schroeven
[EMAIL PROTECTED] schreef: > f = open('evil2.gfx','rb') > i1 = open('img1.jpg','wb') > i2 = open('img2.png','wb') > i3 = open('img3.gif','wb') > i4 = open('img4.png','wb') > i5 = open('img5.jpg','wb') > > > for i in range(0,67575,5): > i1.write(f.read(1)) > i2.write(f.read(1)) > i3.wr

Re: Need a compelling argument to use Django instead of Rails

2006-08-04 Thread Ben Sizer
[EMAIL PROTECTED] wrote: > Paul Rubin wrote: > > A typical shared hosting place might > > support 1000's of users with ONE apache/php instance (running in a > > whole bunch of threads or processes, to be sure). > > You just need to run multiple apache > instances, which is advisable anyway. > The h

Re: regex question

2006-08-04 Thread Slawomir Nowaczyk
On Thu, 03 Aug 2006 22:10:55 +0100 Gabriel Murray <[EMAIL PROTECTED]> wrote: #> Hello, I'm looking for a regular expression Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. -- Jamie Z

Re: SWIG Python Extension winth C++ Problematic

2006-08-04 Thread skip
>> I have been working getting my C++ code to be used in Python ( >> Basically Extending ) This is the problem i am facing rite now. >> >> I have a function that returns a Pointer to a class in my C++ Code >> >> It looks like this ... >> I have used SWIG to get th

Re: What is the best way to print the usage string ?

2006-08-04 Thread Sion Arrowsmith
There's been a good lot of response to the problem originally stated, but no-one's pointed out that: >print reduce(lambda x, y: x + ':' + y, sys.argv[1:]) is a confusing (and slow) way of writing: print ':'.join(sys.argv[1:]) -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ ___

Re: Problem reading/writing files

2006-08-04 Thread smeenehan
Ok, now I'm very confused, even though I just solved my problem. I copied the entire contents of the original file (evil2.gfx) from my hex editor and pasted it into a text file. When I read from *this* file using my original code, everything worked fine. When I read the 21st byte, it came up as the

Pydev with Eclipse on OSX Q

2006-08-04 Thread Michiel Sikma
Hey guys. I'm trying to run Pydev on Eclipse on OSX, but I've got a problem that prevents me from making new projects in it. It seems that I cannot add my Python interpreter to the list of interpreters (it seems to do _something_ when I select it, but then ends up not adding it to the list)

Re: Running queries on large data structure

2006-08-04 Thread Amit Khemka
On 8/3/06, Christoph Haas <[EMAIL PROTECTED]> wrote: > On Wednesday 02 August 2006 22:24, Christoph Haas wrote: > > I have written an application in Perl some time ago (I was young and > > needed the money) that parses multiple large text files containing > > nested data structures and allows the u

Re: Nested function scope problem

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 07:36:25, Slawomir Nowaczyk wrote: > #> The address operator is probably for a C programmer the closest to > #> what the id() function is to a Python programmer. > > I disagree. At least in my understanding, which, up to now, was > perfectly enough to explain everything about how Py

Re: regex question

2006-08-04 Thread John Machin
taleinat wrote: > Gabriel Murray gmail.com> writes: > > > > > Hello, I'm looking for a regular expression which will match strings as > follows: if there are symbols a, b, c and d, then any pattern is valid if it > begins with a and ends with d and proceeds in order through the symbols. > However

Re: How to force a thread to stop

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 02:33:07, H J van Rooyen wrote: > The next step above the 555 is a PIC... then you can steal power from the > RS-232 line - and its a small step from "PIC" to "PIG"... I see... you obviously know what to do, if you want to :) But I'm not sure such a device alone is of much help in

Re: Which KDE IDE for Python?

2006-08-04 Thread Diez B. Roggisch
> Actually I doubt it. For example on question why doesn't Eric use > katepart as editor, he responded: > "Because it is actually written using PyQt and is meant to work on > Win... and Mac OS X as well. Therefore it must not depend on KDE (or > any other non-portable or non-ported toolkit)." That

Re: Windows vs. Linux

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 05:30:00, Sybren Stuvel wrote: >> Besides, you probably don't know whether it's not one of your direct >> suppliers who's affected. You're sure you don't buy from anybody >> running a Windows system? I'd bet against that, and I only bet when >> I know I win :) > > Good point. I don'

Re: Running queries on large data structure

2006-08-04 Thread Christoph Haas
On Friday 04 August 2006 01:39, John Machin wrote: > Christoph Haas wrote: > > I assume that XQuery can't to weird queries like IP ranges, or can it? > > That's twice now you've indicated that IP ranges are causing you some > problems. What's the big deal? > > (a) If you don't have a specialised da

Re: Thread Question

2006-08-04 Thread Ritesh Raj Sarraf
Carl Banks wrote: > > Exactly. Only one thread can hold a lock at a time. If a thread tries > to acquire a lock that some other thread has, it'll wait until the > other thread releases it. You need locks to do this stuff because most > things (such as zipfile objects) don't wait for other threa

Re: Problem reading/writing files

2006-08-04 Thread smeenehan
> What platform? What version of Python? Have you opened the > file in binary mode i.e. open('thefile', 'rb') ?? Show us the relevant > parts of your code, plus what caused you to conclude that read() > changed data on the fly in an undocumented fashion. Yes, I've been reading and writing everyt

Re: Which KDE IDE for Python?

2006-08-04 Thread Phil Thompson
On Friday 04 August 2006 11:52 am, Bart Ogryczak wrote: > Diez B. Roggisch wrote: > > Bart Ogryczak schrieb: > > > Hi, > > > Rigth now I'm using two IDEs for Python, KDevelop and Eric. Both have > > > drawbacks. KDevelop is a multilanguage IDE, and doesn't really have > > > anything special for Pyt

Re: Thread Question

2006-08-04 Thread Carl Banks
Ritesh Raj Sarraf wrote: > Carl Banks wrote: > > Then change the zipping part of download_from_web to acquire and > > release this lock; do zipfile operations only between them. > > > > ziplock.acquire() > > try: > > do_all_zipfile_stuff_here() > > finally: > > ziplock.release() > > I hope

Re: Is there an obvious way to do this in python?

2006-08-04 Thread H J van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote: | On Thu, 3 Aug 2006 16:50:15 +0200, "H J van Rooyen" | <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: | | > | > This is broadly what I had in mind, yes - but sort of down to a transaction | > level - this user does invoicing, th

Re: Enhanced Listbox

2006-08-04 Thread H J van Rooyen
"drodrig" <[EMAIL PROTECTED]> | My apologies if this question has been asked an answered. | | I am looking for a tkinter grid control or enhanced listbox that can | act as a "receipt" for a cash register program. I would like the widget | to contain a visible grid of columns and rows. I've trie

Re: Is there an obvious way to do this in python?

2006-08-04 Thread H J van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote: | On Thu, 3 Aug 2006 16:50:15 +0200, "H J van Rooyen" | <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: | > Now part of the reason I would like to go the transaction type route instead of | > the "per user" route is robustness and

Re: Is there an obvious way to do this in python?

2006-08-04 Thread H J van Rooyen
"Nick Vatamaniuc" <[EMAIL PROTECTED]> wrote: | Hendrik, | | ---snip--- | Now part of the reason I would like to go the transaction type route | instead of the "per user" route is robustness and maintainability, and | the ability it would give me to introduce new transaction types easily | - as

  1   2   >