Re: how to serialize a COM object ?

2007-04-24 Thread Roger Upole
"Carsten Haese" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 2007-04-24 at 13:10 -0700, vml wrote: >> I have a problem : >> >> I have a COM object. >> >> I would like to pass this com object from a server to a client through >> a socket. > > That is just as feasible as pas

Re: [python-advocacy] Would You Write Python Articles or Screencasts for Money?

2007-04-24 Thread Tennessee Leeuwenburg
Firstly, let me put up my hand and say that I would be happy to write Python articles for cash. Now, on to business. I am already doing something similar with /The Python Papers/. As part of putting together each edition (especially the upcoming, bumper edition due out soon), I seek out authors,

How to set font colour in PIL

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it will

Advocacy: "Python up, Ruby down".

2007-04-24 Thread Paddy
I found this blog post on one users migration to Python. It states one users frustrations but the comments section is quite good too. http://blog.cbcg.net/articles/2007/04/22/python-up-ruby-down-if-that-runtime-dont-work-then-its-bound-to-drizzown The time and effort the developers spend on the b

MS SQL Server Extension?

2007-04-24 Thread Jack
Hi all, in my next project, my Python code needs to talk to an MS SQL 2000 Server. Internet search gives me http://pymssql.sourceforge.net/ I wonder what module(s) people are using. My code runs on a Linux box so the module has to build on Linux. Any hints/pointers are welcome. -- http://mail.p

function object.func_default off the console

2007-04-24 Thread Aaron Brady
>>> f.func_defaults[0] [2, 3] >>> f.func_defaults[0]+=[4] Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' object does not support item assignment >>> f.func_defaults[0] [2, 3, 4] V. interesting. Operation succeeds but with a throw. Er, raise. -- http://mail.python.

Re: subprocess.Popen fails, but os.system works

2007-04-24 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, bahoo wrote: > This line of code fails (see error message at the end), > > last_line = subprocess.Popen(["D:/release/win.exe 0.5 1000 100 D:/ > images/img.ppm out.ppm"], stdout=subprocess.PIPE).communicate()[0] > > but using "os.system" works: > os.system('D:/release/win.

PIL and font colours.

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it will

override settrace

2007-04-24 Thread Raja
Hi, I want to override the sys.settrace() call, create a way to trace the execution of a python program. Keep track of all objects created and destroyed. Keep track of the call pattern throughout the execution of the program and output a simplified "call graph" to standard out. Please help me in

Overide settrace

2007-04-24 Thread Raja
Hi, I want to override the sys.settrace() call, create a way to trace the execution of a python program. Keep track of all objects created and destroyed. Keep track of the call pattern throughout the execution of the program and output a simplified "call graph" to standard out. Please help me in

Override sys.settrace()

2007-04-24 Thread Raja
Hi, I want to override the sys.settrace() call, create a way to trace the execution of a python program. Keep track of all objects created and destroyed. Keep track of the call pattern throughout the execution of the program and output a simplified "call graph" to standard out. Please help me in

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-24 Thread Jonathan Kirwan
On Wed, 25 Apr 2007 15:33:45 +1200, Gib Bogle <[EMAIL PROTECTED]> wrote: >When did the University of Iowa (Iowhere?) become CalTech. "Grabbe earned his PhD from Caltech in 1978. He is a graduate of Caltech, but has no current academic appointment there." So I read, anyway. Jon -- http://mail.p

Re: TK-grid problem, please help

2007-04-24 Thread James Stroud
Hertha Steck wrote: > Hello, > > Ray schrieb: > >> Hi, Thanks for the help. >> >> >> I was trying to find a book "Python TK" something on last Friday. >> but didn't find it :-) >> > > There is only one printed book, all the details here: > > http://wiki.python.org/moin/GuiBooks > > HTH > Herth

Re: Python Screen Scraper

2007-04-24 Thread James Stroud
James Stroud wrote: > Hello, > > Does anyone know of an example, however modest, of a screenscraper > authored in python? I am using Firefox. > > Basically, I am answering problems via my browser and being scored for > each problem. I have a tendency to go past my peak for training > efficienc

subprocess.Popen fails, but os.system works

2007-04-24 Thread bahoo
Hi, I am using Windows + Python 2.5. This line of code fails (see error message at the end), last_line = subprocess.Popen(["D:/release/win.exe 0.5 1000 100 D:/ images/img.ppm out.ppm"], stdout=subprocess.PIPE).communicate()[0] but using "os.system" works: os.system('D:/release/win.exe 0.5 1000

Re: gotcha or bug? random state reset on irrelevant import

2007-04-24 Thread Alex Martelli
Alan Isaac <[EMAIL PROTECTED]> wrote: > "John Machin" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > It's not irrelevant; the test2 module has to be *executed* as part of > > the import. [...] seed(314) is executed. > > OK, I understand this is the right answer. > But another w

Re: Where's the source code for __builtin__?

2007-04-24 Thread John Machin
On 25/04/2007 1:17 PM, Steven Bethard wrote: > Ben Finney wrote: >> John Machin <[EMAIL PROTECTED]> writes: >>> On 25/04/2007 9:32 AM, Dustan wrote: I've been paging through the source code for various C modules in python, and wanted to find the source of some of the builtin function

Re: Where's the source code for __builtin__?

2007-04-24 Thread John Machin
On 25/04/2007 12:31 PM, Ben Finney wrote: > John Machin <[EMAIL PROTECTED]> writes: > >> On 25/04/2007 9:32 AM, Dustan wrote: >>> I've been paging through the source code for various C modules in >>> python, and wanted to find the source of some of the builtin >>> functions. You snipped the 2nd s

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-24 Thread Gib Bogle
[EMAIL PROTECTED] wrote: > Cal Tech is the ELITE of ELITE in physics. > > If Feynman were alive, he would point his finger straight at the 911 > criminal operators, the yank bastards themselves ... > > http://www.911blogger.com/node/8101 > > No self-respecting scientist should keep his mouth

Re: Where's the source code for __builtin__?

2007-04-24 Thread Steven Bethard
Ben Finney wrote: > John Machin <[EMAIL PROTECTED]> writes: >> On 25/04/2007 9:32 AM, Dustan wrote: >>> I've been paging through the source code for various C modules in >>> python, and wanted to find the source of some of the builtin >>> functions. >> What's the 2nd file (in alphabetical order) in

Re: Where's the source code for __builtin__?

2007-04-24 Thread Ben Finney
John Machin <[EMAIL PROTECTED]> writes: > On 25/04/2007 9:32 AM, Dustan wrote: > > I've been paging through the source code for various C modules in > > python, and wanted to find the source of some of the builtin > > functions. > > What's the 2nd file (in alphabetical order) in the Python folder?

Re: gotcha or bug? random state reset on irrelevant import

2007-04-24 Thread Alan Isaac
"James Stroud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > if __name__ == "__main__": >seed(314) Thanks for this suggestion. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-24 Thread stj911
Cal Tech is the ELITE of ELITE in physics. If Feynman were alive, he would point his finger straight at the 911 criminal operators, the yank bastards themselves ... http://www.911blogger.com/node/8101 No self-respecting scientist should keep his mouth shut. Its a fundamental challenge to the

Re: gotcha or bug? random state reset on irrelevant import

2007-04-24 Thread Alan Isaac
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It's not irrelevant; the test2 module has to be *executed* as part of > the import. [...] seed(314) is executed. OK, I understand this is the right answer. But another way to look at the question is: is it a good design to

Re: Python un-plugging the Interpreter

2007-04-24 Thread Alex Martelli
John Nagle <[EMAIL PROTECTED]> wrote: ... > >>>Perhaps the current wave of dual-core and quad-core CPUs in cheap > >>>consumer products would change people's perceptions -- I wonder... > > > IronPython would appear to be coming along nicely and getting acceptance > > in the Windows community, a

Re: gotcha or bug? random state reset on irrelevant import

2007-04-24 Thread John Machin
On 25/04/2007 11:22 AM, Alan Isaac wrote: > Running test.py will print False. > Is this expected/desirable? > Thanks, > Alan Isaac > > > %%% test.py %%% > from random import seed, getstate > seed(217) > x = getstate() > from test2 import Trivial It's not irrelevant; the test2 module

Re: numpy migration (also posted to numpy-discussion)

2007-04-24 Thread Duncan Smith
Travis E. Oliphant wrote: > Duncan Smith wrote: > >> Hello, >> Since moving to numpy I've had a few problems with my existing >> code. It basically revolves around the numpy scalar types. e.g. >> > > You will probably get more help on the numpy discussion list: > > [EMAIL PROTECTED] > >

Re: gotcha or bug? random state reset on irrelevant import

2007-04-24 Thread James Stroud
Alan Isaac wrote: > Running test.py will print False. > Is this expected/desirable? > Thanks, > Alan Isaac > > > %%% test.py %%% > from random import seed, getstate > seed(217) > x = getstate() > from test2 import Trivial > y = getstate() > print x == y > > > % test2.py %%

kwarg references

2007-04-24 Thread Calvin Spealman
In the internal API when a C function is called and passed a kwarg dictionary, is there any case where anything else has a reference to it? I checked with the following code and it looks like even if you explicitly pass a dictionary with **kwargs, it still copies the dictionary anyway. -- Read my

gotcha or bug? random state reset on irrelevant import

2007-04-24 Thread Alan Isaac
Running test.py will print False. Is this expected/desirable? Thanks, Alan Isaac %%% test.py %%% from random import seed, getstate seed(217) x = getstate() from test2 import Trivial y = getstate() print x == y % test2.py % from random import seed seed(314) class Tr

Re: Do other Python GUI toolkits require this?

2007-04-24 Thread James Stroud
Bruno Desthuilliers wrote: > Kevin Walzer a écrit : > (snip) > >> Thanks to all for an illuminating thread on the mathematical >> implications of "learning curve" and other aspects. This thread has >> wandered pretty far from my original question (above) > > > Noticed this too ?-) I would ha

Re: Catching a specific IO error

2007-04-24 Thread John Machin
On 25/04/2007 4:06 AM, Steven Howe wrote: > Steve Holden wrote: >> Thomas Krüger wrote: >> >>> Tina I schrieb: >>> Now, this works but of course it catches every IOError, and I can not figure out how to restrict it to only catch the "[Errno 2]"? >>> There's an example th

Re: Where's the source code for __builtin__?

2007-04-24 Thread John Machin
On 25/04/2007 9:32 AM, Dustan wrote: > I've been paging through the source code for various C modules in > python, and wanted to find the source of some of the builtin > functions. I searched through the Modules, Objects, Python, and Parser > folder, searched docs.python.org, searched the archived

Re: Simple csv read/write

2007-04-24 Thread John Machin
On 25/04/2007 8:27 AM, Drew wrote: > Ok, I'm trying to do the simplest read/write from one csv file to > another. For some reason, every other row on the output file is a > blank row. What am I doing wrong? > > import csv > > reader = csv.reader(open('current.csv')) > writer = csv.writer(open('ne

Re: Blank rows resulting from simple csv script

2007-04-24 Thread John Machin
On 25/04/2007 6:17 AM, Diez B. Roggisch wrote: > Drew schrieb: >> Hi all - >> >> I've written a simple script to read a .csv file and then write out >> rows to a new file only if the value in the 4th column is a 0. Here's >> the code: >> >> import csv >> >> reader = csv.reader(open('table_export.cs

Re: *** Watch BOMBSHELL video of Senator John Kerry admitting 911 was in INSIDE JOB ???

2007-04-24 Thread SuperM
On 23 Apr 2007 21:12:45 -0700, [EMAIL PROTECTED] Gave us: >Senator John Kerry was questioned You're an idiot, and so is Kerry. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tutorial creates confusion about slices

2007-04-24 Thread [EMAIL PROTECTED]
Antoon Pardon wrote: > On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: > > > > On Apr 24, 2007, at 6:35 AM, Antoon Pardon wrote: > > > >> People don't read tutorials in a strictly linear fashion. They can > >> continue to later subjects and then come back here to see how things > >> tie

Where's the source code for __builtin__?

2007-04-24 Thread Dustan
I've been paging through the source code for various C modules in python, and wanted to find the source of some of the builtin functions. I searched through the Modules, Objects, Python, and Parser folder, searched docs.python.org, searched the archived messages of this group, searched the web, and

Re: Socket exceptions aren't in the standard exception hierarchy

2007-04-24 Thread John Nagle
Steve Holden wrote: > John Nagle wrote: > >> Steve Holden wrote: >> >>> John Nagle wrote: >>> [socket.error bug report] > All these notes should be included in the bug report, as I suspect the > module would benefit from additional clarity. Done. See [ 1706815 ] socket.error exceptions

Overriding Sys.Settrace

2007-04-24 Thread Raja
Hi, I want to override the sys.settrace() call, create a way to trace the execution of a python program. Keep track of all objects created and destroyed. Keep track of the call pattern throughout the execution of the program and output a simplified "call graph" to standard out. Can anyone please

Overriding Sys.Settrace

2007-04-24 Thread Raja
Hi, I want to override the sys.settrace() call, create a way to trace the execution of a python program. Keep track of all objects created and destroyed. Keep track of the call pattern throughout the execution of the program and output a simplified "call graph" to standard out. Can anyone please

Re: Do other Python GUI toolkits require this?

2007-04-24 Thread David Boddie
On Monday 23 April 2007 15:55, Kevin Walzer wrote: > I had originally thought that learning PyObjC might preclude me from > having to learn Objective-C, but that seems not to be the case. I have > previously found the same to be true with PyQt and wxPython--not knowing > the toolkits as they are i

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread Grant Edwards
On 2007-04-24, hlubenow <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> On 2007-04-23, Kjell Magne Fauske <[EMAIL PROTECTED]> wrote: >> Is there a PDF generation library that can place EPS or PDF figures on a page? > > What about > > http://pybrary.net/pyPdf/ > > It does some very

Re: os.system('tar -c * | tar -C dst') ##Any other suggestions...

2007-04-24 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > I'm getting the following error: > > tar: You must specify one of the `-Acdtrux' options > Try `tar --help' or `tar --usage' for more information. > tar: -: Cannot write: Broken pipe > tar: Error is not recoverable: exiting now > > Any suggestions on a different approac

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread Grant Edwards
On 2007-04-24, David Boddie <[EMAIL PROTECTED]> wrote: > However, it doesn't seem that either are capable of inserting the kinds of > vector files you are using. > > It may be worth writing a quick and dirty PDF writer using an > existing backend library, though I can imagine that the hard > work

Re: os.system('tar -c * | tar -C dst') ##Any other suggestions...

2007-04-24 Thread Thomas Krüger
[EMAIL PROTECTED]: > Any suggestions on a different approach or fix? Check your commandline! The second command is wrong, -C is not valid as the only option, a command is missing. If you just want to archive files in a tarball try: "tar -c * > dst.tar" or take a look at Python's tarfile lib. Thom

Simple csv read/write

2007-04-24 Thread Drew
Ok, I'm trying to do the simplest read/write from one csv file to another. For some reason, every other row on the output file is a blank row. What am I doing wrong? import csv reader = csv.reader(open('current.csv')) writer = csv.writer(open('new.csv','w')) for line in reader: writer.writer

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread hlubenow
Grant Edwards wrote: > On 2007-04-23, Kjell Magne Fauske <[EMAIL PROTECTED]> wrote: > >>> Is there a PDF generation library that can place EPS or PDF >>> figures on a page? What about http://pybrary.net/pyPdf/ It does some very interesting things. But I'm not really sure, if it does what you'r

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread David Boddie
On Tuesday 24 April 2007 20:42, Cameron Laird wrote: > I want to make sure we're all keeping up with each other, so > I'll make explicit a couple of points, despite the risk of > redundancy: > A. Bundling GS is a little touchy, depending on > what you mean by that. Check out its license. >

Help with trees, lists and checkboxes

2007-04-24 Thread P-Cubed
I'm looking for some assistance extending the TreeListCtrl class to include the check box ability of the CustomTreeCtrl as well as 3-state check boxes. Main Column Column1 -- [o] Child1 |-[ ]Child1.1 |-[ ]C

Re: Building browser-like GET request

2007-04-24 Thread Gilles Ganault
On Sun, 22 Apr 2007 18:07:57 -0400, Steve Holden <[EMAIL PROTECTED]> wrote: >On a point of information, Wireshark wokrs very effectively under >Windows. The only thing you shouldn't expect to be able to do is tap >into the loopback network, and that's down to the Windows driver structure. Thanks

Re: how to serialize a COM object ?

2007-04-24 Thread Neil Hodgson
vml wrote: > I have a COM object. > > I would like to pass this com object from a server to a client through > a socket. As Diez mentioned, this may be possible through Distributed COM (DCOM). Its not very popular any more with techniques such as SOAP being more widely implemented. DCOM is

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-24 Thread Thomas Nelson
On Apr 23, 10:38 pm, Mel Wilson <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: > > The interpreter explains it: "A list is not a hashable object." > > Choosing a hash table instead of some kind of balanced tree seems > > to be just an optimization. ;) > > Even with a balanced tree, if a key in a

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread Grant Edwards
On 2007-04-24, Cameron Laird <[EMAIL PROTECTED]> wrote: >>I can't even find any mention of a commercial version of >>ReportLab on the web site. The FAQ says ReportLib is available >>under the BSD license. Period. >> >>There are some other "projects" listed, but they don't appear >>to be relevent.

Re: *** Watch BOMBSHELL video of Senator John Kerry admitting 911 was in INSIDE JOB ???

2007-04-24 Thread Jon Slaughter
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://www.911blogger.com/node/8053 > > Senator John Kerry was questioned concerning 9/11 during an appearance > at Book People in Austin, Texas. Members of Austin 9/11 Truth Now > asked Kerry about the officially unexplained collapse

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: >>> >>> In fairness to ReportLab I'd like to say that their *commercial* >>> products can do everything the OP asks for and more besides, but >>> unfortunately they are mostly targeted at the "enterprise" (read: big >>> mo

Re: tkinter paint program

2007-04-24 Thread Gigs_
Wojciech Muła wrote: > Gigs_ wrote: >> I'm working on tkinter paint program, mostly to learn tkinter canvas. >> I have method which create buttons for oval, rectangle, line, polygon >> etc. >> How to make oval button to be sunken when i click it and to remain >> sunken until i click on another bu

os.system('tar -c * | tar -C dst') ##Any other suggestions...

2007-04-24 Thread [EMAIL PROTECTED]
I'm getting the following error: tar: You must specify one of the `-Acdtrux' options Try `tar --help' or `tar --usage' for more information. tar: -: Cannot write: Broken pipe tar: Error is not recoverable: exiting now Any suggestions on a different approach or fix? -List -- http://mail.python.

Re: *** Dr G Polya BRILLIANTLY analyses the Virgina Shooting Incident ***

2007-04-24 Thread bill . sloman
On Apr 24, 2:09 pm, Quadibloc <[EMAIL PROTECTED]> wrote: > The Real Andy wrote: > > Makes me wonder about the credibility of any statement Dr Gideon Polya > > makes. > > . > I never thought that I would feel the urge to call someone an > edelweiss-eating Tanzanian devil, but Dr. Polya proved that I

Re: Blank rows resulting from simple csv script

2007-04-24 Thread Michael Bentley
On Apr 24, 2007, at 3:35 PM, Drew wrote: > Hi all - > > I've written a simple script to read a .csv file and then write out > rows to a new file only if the value in the 4th column is a 0. Here's > the code: > > import csv > > reader = csv.reader(open('table_export.csv','rb')) > > writer = csv.wr

Blank rows resulting from simple csv script

2007-04-24 Thread Drew
Hi all - I've written a simple script to read a .csv file and then write out rows to a new file only if the value in the 4th column is a 0. Here's the code: import csv reader = csv.reader(open('table_export.csv','rb')) writer = csv.writer(open('new_jazz.csv','w')) for row in reader: if row

Re: how to serialize a COM object ?

2007-04-24 Thread Carsten Haese
On Tue, 2007-04-24 at 13:10 -0700, vml wrote: > I have a problem : > > I have a COM object. > > I would like to pass this com object from a server to a client through > a socket. That is just as feasible as passing a cruise ship through a phone line. A COM object represents a connection to a se

Re: how to serialize a COM object ?

2007-04-24 Thread Diez B. Roggisch
vml schrieb: > I have a problem : > > I have a COM object. > > I would like to pass this com object from a server to a client through > a socket. > > I tried to put the com object into a stringIO with the pickle module > but : > > "can't pickle PyIDispatch objects" > > > Is there other possib

Re: Blank rows resulting from simple csv script

2007-04-24 Thread Diez B. Roggisch
Drew schrieb: > Hi all - > > I've written a simple script to read a .csv file and then write out > rows to a new file only if the value in the 4th column is a 0. Here's > the code: > > import csv > > reader = csv.reader(open('table_export.csv','rb')) > > writer = csv.writer(open('new_jazz.csv',

how to serialize a COM object ?

2007-04-24 Thread vml
I have a problem : I have a COM object. I would like to pass this com object from a server to a client through a socket. I tried to put the com object into a stringIO with the pickle module but : "can't pickle PyIDispatch objects" Is there other possibilities to pass a COM object through a ne

Blank rows resulting from simple csv script

2007-04-24 Thread Drew
Hi all - I've written a simple script to read a .csv file and then write out rows to a new file only if the value in the 4th column is a 0. Here's the code: import csv reader = csv.reader(open('table_export.csv','rb')) writer = csv.writer(open('new_jazz.csv','w')) for row in reader: if row

Re: PIL and font colours.

2007-04-24 Thread Diez B. Roggisch
Johny schrieb: > I use PIL to write some text to a picture.The text must be seen wery > clearly. > I write the text to different pictures but to the same position. As > pictures maybe different, colour, in the position where I write the > text, is also different. > Is there a way how to set the

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread Grant Edwards
On 2007-04-24, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-04-24, Steve Holden <[EMAIL PROTECTED]> wrote: > I've looked at ReportLab's documentation, but although it appears to be able to use bitmap images (e.g jpeg) it doesn't appear to be able to use vector images (EPS/PDF/S

PIL and font colours.

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it will

Re: Would You Write Python Articles or Screencasts for Money?

2007-04-24 Thread Anton Vredegoor
Steve Holden wrote: >> When cash is involved, it's important to avoid even the slightest >> hint of a suggestion of a suspicion of a conflict of interest; >> that, I guess, is why firms that run contests with cash prizes >> always declare employees and their families "not eligible", and why >> I t

Re: Catching a specific IO error

2007-04-24 Thread Michael Hoffman
Steven Howe wrote: > Steve Holden wrote: >> Thomas Krüger wrote: >> >>> Tina I schrieb: >>> Now, this works but of course it catches every IOError, and I can not figure out how to restrict it to only catch the "[Errno 2]"? >>> There's an example that uses the error numbe

Re: Simple sqlite3 question

2007-04-24 Thread John Nagle
Jerry Hill wrote: > On 24 Apr 2007 10:03:45 -0700, cjl <[EMAIL PROTECTED]> wrote: > >> When I run the script and there is no file named optiondata, one is >> created and the correct data is added to it. If I run the script >> again then the data from the first run seems to be replaced with the >>

EuroPython 2007 - call for refereed papers

2007-04-24 Thread arigo
Hi all, He're a reminder to submit a talk at EuroPython! Like each year, we have both the regular conference (see call at http://indico.cern.ch/conferenceCFA.py?confId=13919) and a somewhat separated Refereed Papers section. Here is the call for the latter. The deadline for both is the 18th of

PIL and font colour

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it will

PIL and font colour

2007-04-24 Thread Johny
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the position where I write the text, is also different. Is there a way how to set the font colour so that it will

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: . . . >part of a Win32 application. You can pretty much except a >Linux platform to have ghostscript available, but for Win32 >users it'll have to be bu

Re: tkinter paint program

2007-04-24 Thread Wojciech Muła
Gigs_ wrote: > I'm working on tkinter paint program, mostly to learn tkinter canvas. > I have method which create buttons for oval, rectangle, line, polygon etc. > How to make oval button to be sunken when i click it and to remain > sunken until i click on another button (like rectangle and than i

Re: If Dict Contains a particular key

2007-04-24 Thread Steven Bethard
Steven Howe wrote: > Carsten Haese wrote: >> On Tue, 2007-04-24 at 18:28 +0100, Robert Rawlins - Think Blue wrote: >> >>> Hello Guys, >>> >>> >>> >>> I’m Looking to build a quick if/else statement that checks a >>> dictionary for a key like follows. >>> >>> >>> >>> If myDict contains ThisKey:

Re: RPM error

2007-04-24 Thread Steven Howe
CSUIDL PROGRAMMEr wrote: > Hi folks > I am new to python > I am trying to write a program that will install rpm > using rpm -ivh xxx.rpm > > I want to know if python has in-built exceptions to catch no- > dependencies error. > > If not how can i build them > > thanks > > not really sure where y

Angelina Joli Paris Hilton MARISA MILLER

2007-04-24 Thread M M
Angelina Joli Paris Hilton MARISA MILLER www.alphasearch.gr -- http://mail.python.org/mailman/listinfo/python-list

Re: Catching a specific IO error

2007-04-24 Thread Steven Howe
Steve Holden wrote: > Thomas Krüger wrote: > >> Tina I schrieb: >> >>> Now, this works but of course it catches every IOError, and I can not >>> figure out how to restrict it to only catch the "[Errno 2]"? >>> >> There's an example that uses the error number: >> http://docs.python.or

Re: Would You Write Python Articles or Screencasts for Money?

2007-04-24 Thread Daniel Nogradi
[Alex] > When cash is involved, it's important to avoid even the > slightest hint of a suggestion of a suspicion of a conflict of interest I propose the non-PSF sponsored Grand Prize For Successfully Squeezing 4 Of's In A Single Sentence should be received by Alex Martelli this month :) -- http:/

Re: Simple sqlite3 question

2007-04-24 Thread Jerry Hill
On 24 Apr 2007 10:03:45 -0700, cjl <[EMAIL PROTECTED]> wrote: > When I run the script and there is no file named optiondata, one is > created and the correct data is added to it. If I run the script > again then the data from the first run seems to be replaced with the > data from the second run.

Re: If Dict Contains a particular key

2007-04-24 Thread Steven Howe
Carsten Haese wrote: > On Tue, 2007-04-24 at 18:28 +0100, Robert Rawlins - Think Blue wrote: > >> Hello Guys, >> >> >> >> I’m Looking to build a quick if/else statement that checks a >> dictionary for a key like follows. >> >> >> >> If myDict contains ThisKey: >> >> Do this..

Modules for peer-to-peer chat program

2007-04-24 Thread Viewer T.
I would like to know which modules I would need in order to create peer-to-peer chat program in python using Tkinter. If I would need modules that do not come packaged with python, I would appreciate information on where I can get them. Thanks. -- http://mail.python.org/mailman/listinfo/python-

q: how to output a unicode string?

2007-04-24 Thread Frank Stajano
A simple unicode question. How do I print? Sample code: # -*- coding: utf-8 -*- s1 = u"héllô wórld" print s1 # Gives UnicodeEncodeError: 'ascii' codec can't encode character # u'\xe9' in position 1: ordinal not in range(128) What I actually want to do is slightly more elaborate: read from a tex

Re: Python un-plugging the Interpreter

2007-04-24 Thread John Nagle
Alex Martelli wrote: > Jorgen Grahn <[EMAIL PROTECTED]> wrote: >... > >>>Perhaps the current wave of dual-core and quad-core CPUs in cheap >>>consumer products would change people's perceptions -- I wonder... > IronPython would appear to be coming along nicely and getting acceptance > in the

Re: If Dict Contains a particular key

2007-04-24 Thread Carsten Haese
On Tue, 2007-04-24 at 18:28 +0100, Robert Rawlins - Think Blue wrote: > Hello Guys, > > > > I’m Looking to build a quick if/else statement that checks a > dictionary for a key like follows. > > > > If myDict contains ThisKey: > > Do this... > > Else > > Do

Re: If Dict Contains a particular key

2007-04-24 Thread Michael Bentley
On Apr 24, 2007, at 12:28 PM, Robert Rawlins - Think Blue wrote: Hello Guys, I’m Looking to build a quick if/else statement that checks a dictionary for a key like follows. If myDict contains ThisKey: Do this... Else Do that... Thats the best way o

Re: Python Screen Scraper

2007-04-24 Thread kyosohma
On Apr 24, 7:17 am, Michael Bentley <[EMAIL PROTECTED]> wrote: > On Apr 24, 2007, at 11:50 AM, James Stroud wrote: > > > > > Hello, > > > Does anyone know of an example, however modest, of a screenscraper > > authored in python? I am using Firefox. > > > Basically, I am answering problems via my br

Re: Convert a string to a list

2007-04-24 Thread Nick Craig-Wood
rh0dium <[EMAIL PROTECTED]> wrote: > I am using pexpect to drive another tool. Some of the data I get back > would be better suited as a list and I want to know a simple way to > parse the data to push it into a list. > > For example > > I get the following string back. I want to convert t

If Dict Contains a particular key

2007-04-24 Thread Robert Rawlins - Think Blue
Hello Guys, I'm Looking to build a quick if/else statement that checks a dictionary for a key like follows. If myDict contains ThisKey: Do this... Else Do that... Thats the best way of doing this? Thanks, Rob -- http://mail.python.org/mailman

Re: Feedback on Until recipe

2007-04-24 Thread Steve Holden
Thomas Nelson wrote: > Occasionally someone posts to this group complaining about the lack of > "repeat ... until" in python. I too have occasionally wished for such > a construct, and after some thinking, I came up with the class below. > I'm hoping to get some feedback here, and if people beside

Trees, Lists and Check Boxes

2007-04-24 Thread P-Cubed
I'm looking for some assistance extending the TreeListCtrl class to include the check box ability of the CustomTreeCtrl as well as 3-state check boxes. Main Column Column1 -- [o] Child1 |-[ ]Child1.1 |-[ ]Ch

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread Steve Holden
Grant Edwards wrote: > On 2007-04-24, Steve Holden <[EMAIL PROTECTED]> wrote: > I've looked at ReportLab's documentation, but although it appears to be able to use bitmap images (e.g jpeg) it doesn't appear to be able to use vector images (EPS/PDF/SVG). Is there a PDF gene

Re: *** Watch BOMBSHELL video of Senator John Kerry admitting 911 was in INSIDE JOB ???

2007-04-24 Thread Richard The Dreaded Libertarian
On Mon, 23 Apr 2007 21:12:45 -0700, lemnitzer wrote: > WHAT THE HELL|?| Are you saying that building was wired that day? Or > well in advance? 'Splain, please. No, you idiot. That was the Murrah building in OK city. Cheers! Rich -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket exceptions aren't in the standard exception hierarchy

2007-04-24 Thread Steve Holden
John Nagle wrote: > Steve Holden wrote: >> John Nagle wrote: >> [socket.error bug report] >> Where did you get this information? If true it would certainly need to be logged as a bug, but under Windows on 2,4 I see >>> issubclass(socket.gaierror, Exception) True >>>

Simple sqlite3 question

2007-04-24 Thread cjl
P: I am using python 2.5.1 on windows. I have the following code: conn = sqlite3.connect('.\optiondata') c = conn.cursor() try: c.execute('''create table options (ssymbol text, strike real, osymbol text, bid real, mpp real, upp real)''') except sqlite3.OperationalError: pass I am hoping

Re: *** Dr G Polya BRILLIANTLY analyses the Virgina Shooting Incident ***

2007-04-24 Thread Rich Grise
On Tue, 24 Apr 2007 09:00:56 -0700, bill.sloman wrote: > On Apr 24, 2:09 pm, Quadibloc <[EMAIL PROTECTED]> wrote: >> The Real Andy wrote: >> > Makes me wonder about the credibility of any statement Dr Gideon Polya >> > makes. >> . >> I never thought that I would feel the urge to call someone an >>

Re: need help with ODE solver from scipy

2007-04-24 Thread Robert Kern
T.Crane wrote: > Hi, > > OK, I'm trying to figure out how to use the ODE solver > (scipy.integrate.ode.ode). You will get more help from the scipy-user list than you will here. http://www.scipy.org/Mailing_Lists > Here's what I'm doing (in iPython) > > y0 = [0,1,1] > dt = 0.01 > tEnd = 12 >

  1   2   >