Re: Gnu/Linux dialogue boxes in python

2007-12-18 Thread Donn Ingle
> I've now uploaded a new release of the desktop module which is now, in > fact, a package: Thanks Paul, I saw it via the cheese shop rss. I have been too busy to read this list for a week. I will have a look in due course. \d -- http://mail.python.org/mailman/listinfo/python-list

Re: build a syntax tree

2007-12-18 Thread Arnaud Delobelle
On Dec 18, 10:43 pm, Federico <[EMAIL PROTECTED]> wrote: > Hi I've some trivial question: > > for exercise I want to parse a string that like this: > > "x -34 + 65 * 96 = 102" > > now if I had this ("(25+24)/2") is extremely easy to have a result but > I want to resolve the above string (for the 'x

Re: Problem untaring python2.5

2007-12-18 Thread samuel . progin
Hello, It is not possible to give sharp hints without more relevant information like: - What is your platform? - Which version of python? - What is the version of: $ tar --version (GNU tar, other proprietary tar, according to my personal experience, AIX tar may fail) - Is your disk full or do you

import X between submodules in a package

2007-12-18 Thread Donn Ingle
Hi, I'm sure this is a FAQ, but I have just not found clarity on the web/docs. (using monospaced type to show the tree) trunk:$ tree . fp |-- fontypython | |-- __init__.py | |-- cli.py | |-- config.py (I start it all with ./fp) fp says: import cli cli.py says: import os import config con

Re: More than one interpreter per process?

2007-12-18 Thread Christian Heimes
Roger Binns wrote: > sturlamolden wrote: >> If one can have more than one interpreter in a single process, > > You can. Have a look at mod_python and mod_wsgi which does exactly > this. But extension modules that use the simplified GIL api don't work > with them (well, if at all). No, you can'

Re: New+old-style multiple inheritance

2007-12-18 Thread Michele Simionato
On Dec 18, 9:25 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > A well-considered, timely monkey-patch can sometimes save all kinds of > workarounds and other headaches. > > Carl Banks +1 Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Strict mode?

2007-12-18 Thread Noah Dain
On Dec 18, 2007 5:03 PM, Jack <[EMAIL PROTECTED]> wrote: > While enjoying the dynamic feature of Python I find it difficult to refactor > code without breaking it. For example, if I modify a function to take more > arguments, or arguments of different types, I'll need to manually find out > all pla

Re: New+old-style multiple inheritance

2007-12-18 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Thank Gabriel, | | That sounds exactly right and your work-around provides confirmation. | This code is an expedient solution for us so I expect we'll go with | forcing a slot update. Hopefully the library concerned is going to | fix

Re: .NET and Python Integration Problem and PDF Library (Need Help and Suggestions)

2007-12-18 Thread Ravi Kumar
> > If I had to do something like this I would host a Python web > server listening on some port and let .NET application talk to me > using HTTP requests preferably or SOAP if I really had to. > It could be a Paster or Cherrypy or Twisted based server. > Google for instruction on how to package it

Re: .NET and Python Integration Problem and PDF Library (Need Help and Suggestions)

2007-12-18 Thread Ravi Kumar
> Joshua: > PDF library: ReportLab. But that is most generation of PDFs. For reading, > splitting, etc, you may have to look at their commercial offering I will have to research on it, i think time to list the best available libs, and finding all's dependency. > On Dec 19, 2007 6:10 AM, Boris Bo

Re: More than one interpreter per process?

2007-12-18 Thread Graham Dumpleton
On Dec 19, 3:07 pm, Roger Binns <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > > When using mod_wsgi there is no problem with C extension modules which > > use simplified GIL API provided that one configures mod_wsgi to > > delegate that specific application to run in the context of the fir

Re: How to generate pdf file from an html page??

2007-12-18 Thread abhishek
On Dec 17, 8:42 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-12-16, abhishek <[EMAIL PROTECTED]> wrote: > > > Hi everyone, I am trying to generate a PDF printable format file from > > an html page. Is there a way to do this using python. If yes then > > which library and functions are req

Re: Why custom objects take so much memory?

2007-12-18 Thread Robert Kern
Steven D'Aprano wrote: > On Tue, 18 Dec 2007 21:13:14 +0100, Hrvoje Niksic wrote: > >> Each object takes 36 bytes itself: 4 bytes refcount + 4 bytes type ptr + >> 4 bytes dict ptr + 4 bytes weakptr + 12 bytes gc overhead. That's not >> counting malloc overhead, which should be low since objects a

Re: NameError: name 'main' is not defined

2007-12-18 Thread jolly
thanks -- http://mail.python.org/mailman/listinfo/python-list

Problem untaring python2.5

2007-12-18 Thread abhishek
Hi everyone , i am not able to untar python 2.5 source code using " tar -xvzf " . Is it a problem with my system settings or python 2.5 itself. When i tried to do it it resulted in following errors -- tar: Skipping to next header Python-2.5/Mac/Resources/app/Resources/English.lproj/Documentation/

Python-URL! - weekly Python news and links (Dec 18)

2007-12-18 Thread Gabriel Genellina
QOTW: "XML. Almost as good as plain text for grepping." - Joe Mason "Where there's IP, there's a way." - Kyler Laird, on network programming Linked lists, deques, and iteration over a mutating container: http://groups.google.com/group/comp.lang.python/browse_thread/thread/1017de91

Re: Why custom objects take so much memory?

2007-12-18 Thread Steven D'Aprano
On Tue, 18 Dec 2007 21:13:14 +0100, Hrvoje Niksic wrote: > Each object takes 36 bytes itself: 4 bytes refcount + 4 bytes type ptr + > 4 bytes dict ptr + 4 bytes weakptr + 12 bytes gc overhead. That's not > counting malloc overhead, which should be low since objects aren't > malloced individually.

Re: WikiInclude on 0.11 - Noah Kantrowitz blocks bug-fix

2007-12-18 Thread Ilias Lazaridis
On Dec 18, 9:15 pm, smallpond <[EMAIL PROTECTED]> wrote: > On Dec 17, 9:23 pm, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > > > > > Essence: > > > * Deletion of valid defect reports on trac community resources > > > The "WikiInclude" plugin is not recognised on trac 0.11, thus I took a > > look an

Re: operator module isSequenceType with builtin set produces False

2007-12-18 Thread Gabriel Genellina
En Tue, 18 Dec 2007 09:15:12 -0300, English, Mark <[EMAIL PROTECTED]> escribió: try: set except NameError: from sets import Set as set class myset_fails(set): pass class myset_works(set): def __getitem__(self): pass s = set() fails = myset_fails() work

Re: NameError: name 'main' is not defined

2007-12-18 Thread Robert Kern
jolly wrote: > hey guys, > > When i try to run my code I get an error. NameError name 'main is not > defined' > > [code] > if __name__ == "__main__": > main() Put this at the end of the file. Currently, it is getting executed before the code that defines main(). -- Robert Kern "I have com

Re: More than one interpreter per process?

2007-12-18 Thread Roger Binns
Graham Dumpleton wrote: > When using mod_wsgi there is no problem with C extension modules which > use simplified GIL API provided that one configures mod_wsgi to > delegate that specific application to run in the context of the first > interpreter instance created by Python. Graham, I've asked yo

Re: More than one interpreter per process?

2007-12-18 Thread Roger Binns
sturlamolden wrote: > On 18 Des, 10:24, Roger Binns <[EMAIL PROTECTED]> wrote: > >> The biggest stumbling block is what to do when the external environment >> makes a new thread and then eventually calls back into Python. It is >> hard to know which interpretter that callback should go to. > > N

Re: Detecting memory leaks on apache, mod_python

2007-12-18 Thread Ilias Lazaridis
On Dec 17, 8:41 am, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > How to detect memory leaks of python programms, which run in an > environment like this: > > * Suse Linux 9.3 > * Apache > * mod_python > > The problem occoured after some updates on the infrastructure. It's > most possibly caused

NameError: name 'main' is not defined

2007-12-18 Thread jolly
hey guys, When i try to run my code I get an error. NameError name 'main is not defined' [code] if __name__ == "__main__": main() filename = "addbook.dat" def main(): theMenu = ''' 1) Add Entry 2) Remove Entry 3) Find Entry 4) Quit and Save ''' theBook = {} r

Re: askopenfilename() as root window

2007-12-18 Thread Sean DiZazzo
On Dec 18, 6:06 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 18 dic, 22:43, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > > > Is there any way to open a Tkinter.askopenfilename() without opening a > > root window alongside the file chooser? > > > I simply want a script to open a dialog and ret

Re: Allowing Arbitrary Indentation in Python

2007-12-18 Thread Grant Edwards
On 2007-12-19, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Dec 18, 2:16 pm, Sam <[EMAIL PROTECTED]> wrote: >> layouts = ['column', 'form', 'frame'] >> cmds.window(t='gwfUI Builder') >> cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, >> 100))) >> cmds.paneLayout(configu

Re: More than one interpreter per process?

2007-12-18 Thread Graham Dumpleton
On Dec 18, 8:24 pm, Roger Binns <[EMAIL PROTECTED]> wrote: > sturlamolden wrote: > > If one can have more than one interpreter in a single process, > > You can. Have a look at mod_python andmod_wsgiwhich does exactly > this. But extension modules that use the simplified GIL api don't work > with

Re: Best way to protect my new commercial software.

2007-12-18 Thread Robert Kern
Steven D'Aprano wrote: > On Tue, 18 Dec 2007 21:54:26 +, Grant Edwards wrote: > >> On 2007-12-18, Steven D'Aprano <[EMAIL PROTECTED]> >> wrote: >>> On Tue, 18 Dec 2007 17:04:29 +, Grant Edwards wrote: >>> On 2007-12-18, Jan Claeys <[EMAIL PROTECTED]> wrote: > Op Fri, 14 Dec 2007 1

Re: More than one interpreter per process?

2007-12-18 Thread Graham Dumpleton
On Dec 19, 2:37 am, sturlamolden <[EMAIL PROTECTED]> wrote: > On 18 Des, 10:24, Roger Binns <[EMAIL PROTECTED]> wrote: > > > You can. Have a look at mod_python andmod_wsgiwhich does exactly > > this. But extension modules that use the simplified GIL api don't work > > with them (well, if at all).

Re: Best way to protect my new commercial software.

2007-12-18 Thread Steven D'Aprano
On Tue, 18 Dec 2007 21:54:26 +, Grant Edwards wrote: > On 2007-12-18, Steven D'Aprano <[EMAIL PROTECTED]> > wrote: >> On Tue, 18 Dec 2007 17:04:29 +, Grant Edwards wrote: >> >>> On 2007-12-18, Jan Claeys <[EMAIL PROTECTED]> wrote: Op Fri, 14 Dec 2007 16:54:35 +, schreef Grant Edwa

Re: askopenfilename() as root window

2007-12-18 Thread Gabriel Genellina
On 18 dic, 22:43, Sean DiZazzo <[EMAIL PROTECTED]> wrote: > Is there any way to open a Tkinter.askopenfilename() without opening a > root window alongside the file chooser? > > I simply want a script to open a dialog and return the chosen file's > path to stdout. Yes, create the root yourself so

askopenfilename() as root window

2007-12-18 Thread Sean DiZazzo
Is there any way to open a Tkinter.askopenfilename() without opening a root window alongside the file chooser? I simply want a script to open a dialog and return the chosen file's path to stdout. """ from tkFileDialog import askopenfilename print askopenfilename() """ ...does the job, but it op

Re: .NET and Python Integration Problem and PDF Library (Need Help and Suggestions)

2007-12-18 Thread Waldemar Osuch
On Dec 18, 6:42 am, "Ravi Kumar" <[EMAIL PROTECTED]> wrote: > In continuation of last mail [since pressing tab+space sent the mail :( ] > Things on high priorities right now are: > - How to integrate Python calling from .NET If I had to do something like this I would host a Python web server liste

Re: pySerial

2007-12-18 Thread __zip__
Tnx for help. Done it. The problem was that returning bytes were on few lines and I didn't look after first \n :( tnx. -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing Arbitrary Indentation in Python

2007-12-18 Thread Jason
On Dec 18, 5:18 pm, Sam <[EMAIL PROTECTED]> wrote: > On Dec 18, 7:09 pm, Jonathan Gardner > > > > <[EMAIL PROTECTED]> wrote: > > On Dec 18, 2:16 pm, Sam <[EMAIL PROTECTED]> wrote: > > > > layouts = ['column', 'form', 'frame'] > > > cmds.window(t='gwfUI Builder') > > > cmds.paneLayout(configuration=

Re: .NET and Python Integration Problem and PDF Library (Need Help and Suggestions)

2007-12-18 Thread Boris Borcic
Ravi Kumar wrote: > - your opinion with available PDF Libraries, that are best among. Also > which library to use for Windows server platform (there is limitation > on installing long chain libraries that include other deep > dependencies too). A pure python PDF library would be good, but which > o

Re: pySerial

2007-12-18 Thread John Machin
On Dec 19, 10:49 am, __zip__ <[EMAIL PROTECTED]> wrote: > Hi, > > I am using pySerial for communication with modem. > > Does anyone knows which values are for what in these variables? > > xonxoff=0 > rtscts=0 > dsrdtr=0 > > if xonxoff=0 is it hardware control on or of (logic says it would be off >

Re: Allowing Arbitrary Indentation in Python

2007-12-18 Thread Sam
On Dec 18, 7:09 pm, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Dec 18, 2:16 pm, Sam <[EMAIL PROTECTED]> wrote: > > > > > layouts = ['column', 'form', 'frame'] > > cmds.window(t='gwfUI Builder') > > cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, > > 100))) > > cmds.pa

Re: Allowing Arbitrary Indentation in Python

2007-12-18 Thread Sam
On Dec 18, 5:28 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-12-18, Sam <[EMAIL PROTECTED]> wrote: > > > > > A friend of mine is picking up some Python and is frustrated by > > Python's indentation rules (http://greatbiggary.livejournal.com/ > > 260460.html?thread=1835884#t1835884). Pers

Re: Allowing Arbitrary Indentation in Python

2007-12-18 Thread Jonathan Gardner
On Dec 18, 2:16 pm, Sam <[EMAIL PROTECTED]> wrote: > layouts = ['column', 'form', 'frame'] > cmds.window(t='gwfUI Builder') > cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, > 100))) > cmds.paneLayout(configuration='horizontal2') > cmds.frameLayout(l='Layouts') >

Crunchy release 0.9.8.6

2007-12-18 Thread André
Crunchy is an application that transforms static (text based) Python tutorials into interactive Python sessions within your browser. Since the last announcement on this list, there has been 6 new releases. The latest release can always be found at http://code.google.com/p/crunchy/ New in 0.9.8.6:

pySerial

2007-12-18 Thread __zip__
Hi, I am using pySerial for communication with modem. Does anyone knows which values are for what in these variables? xonxoff=0 rtscts=0 dsrdtr=0 if xonxoff=0 is it hardware control on or of (logic says it would be off , but who knows). Second question is: do I need to send \n or soemthing w

Re: Best way to protect my new commercial software.

2007-12-18 Thread Paul Boddie
On 18 Des, 22:38, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > > I dare say that European countries which have had automatic copyright > longer than the US have seen far more of their national heritage (early > film, photographs and the like) rot away. Indeed. One of the most fa

[search for reviewers] asyncore delayed calls feature

2007-12-18 Thread Giampaolo Rodola'
Hi, I post this message here in the hope someone using asyncore could review this. Since the thing I miss mostly in asyncore is a system for calling a function after a certain amount of time, I spent the last 3 days trying to implement this with the hopes that this could be included in asyncore in

Re: Strict mode?

2007-12-18 Thread Larry Bates
Jack wrote: > While enjoying the dynamic feature of Python I find it difficult to refactor > code without breaking it. For example, if I modify a function to take more > arguments, or arguments of different types, I'll need to manually find out > all places where the function is called and make

Re: Changing intobject to use int rather than long

2007-12-18 Thread Martin v. Löwis
>> On a 64-bit machine, that's 16 bytes for PyObject_HEAD and 8 more >> bytes for the value, 24 bytes total. Changing long to int won't >> decrease the struct size to 20 because the compiler will pad it to >> 24, the nearest multiple of 8. (Forcing the compiler to pack the >> struct won't help

Re: It's ok to __slots__ for what they were intended (was: Don't use __slots__ (was Re: Why custom objects take so much memory?))

2007-12-18 Thread Carl Banks
On Dec 18, 4:49 pm, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > > Chris Mellon <[EMAIL PROTECTED]> wrote: > > >You can reduce the size of new-style classes (inherit from object) by > >quite a bit if you use __slots__ to eliminate the class dictionary. > > You can also reduce

Re: IronPython faster than CPython?

2007-12-18 Thread Mark Shroyer
In article <[EMAIL PROTECTED]>, "Jack" <[EMAIL PROTECTED]> wrote: > I learned a lot from the other thread 'Is a "real" C-Python possible?' about > Python performance and optimization. I'm almost convinced that Python's > performance is pretty good for this dynamic language although there are >

Re: Newbie observations

2007-12-18 Thread Rick Dooling
On Dec 18, 2:14 pm, [EMAIL PROTECTED] wrote: > But where? Look it up in the function reference. OK, > where's the function reference? A line of code that you'd type in a > second is a ten-minute search. Thank God for google. Maybe this will help: http://rgruet.free.fr/PQR25/PQR2.5.html But sinc

build a syntax tree

2007-12-18 Thread Federico
Hi I've some trivial question: for exercise I want to parse a string that like this: "x -34 + 65 * 96 = 102" now if I had this ("(25+24)/2") is extremely easy to have a result but I want to resolve the above string (for the 'x' variable) what can I do? Especially for symbolic function I think

Re: IronPython faster than CPython?

2007-12-18 Thread John Machin
On Dec 19, 9:18 am, "Jack" <[EMAIL PROTECTED]> wrote: > I learned a lot from the other thread 'Is a "real" C-Python possible?' about > Python performance and optimization. I'm almost convinced that Python's > performance is pretty good for this dynamic language although there are > areas to improve

RE: Don't use __slots__ (was Re: Why custom objects take so much memory?)

2007-12-18 Thread Delaney, Timothy (Tim)
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Chris Mellon <[EMAIL PROTECTED]> wrote: >> >> You can reduce the size of new-style classes (inherit from object) by >> quite a bit if you use __slots__ to eliminate the class dictionary. > > You can also reduce your functionality quite a bit by usi

Re: Allowing Arbitrary Indentation in Python

2007-12-18 Thread Grant Edwards
On 2007-12-18, Sam <[EMAIL PROTECTED]> wrote: > A friend of mine is picking up some Python and is frustrated by > Python's indentation rules (http://greatbiggary.livejournal.com/ > 260460.html?thread=1835884#t1835884). Personally, I've never had any > issues with Python's ways of indentation, but

Re: Strict mode?

2007-12-18 Thread John Machin
On Dec 19, 9:03 am, "Jack" <[EMAIL PROTECTED]> wrote: > While enjoying the dynamic feature of Python I find it difficult to refactor > code without breaking it. For example, if I modify a function to take more > arguments, or arguments of different types, I'll need to manually find out > all places

IronPython faster than CPython?

2007-12-18 Thread Jack
I learned a lot from the other thread 'Is a "real" C-Python possible?' about Python performance and optimization. I'm almost convinced that Python's performance is pretty good for this dynamic language although there are areas to improve, until I read some articles that say IronPython is a few

Allowing Arbitrary Indentation in Python

2007-12-18 Thread Sam
A friend of mine is picking up some Python and is frustrated by Python's indentation rules (http://greatbiggary.livejournal.com/ 260460.html?thread=1835884#t1835884). Personally, I've never had any issues with Python's ways of indentation, but that conversation got me thinking about the issue. Co

Strict mode?

2007-12-18 Thread Jack
While enjoying the dynamic feature of Python I find it difficult to refactor code without breaking it. For example, if I modify a function to take more arguments, or arguments of different types, I'll need to manually find out all places where the function is called and make sure I modify them a

Re: Funny python cartoon... hope it's not a repost

2007-12-18 Thread Ben Finney
Breal <[EMAIL PROTECTED]> writes: > http://xkcd.com/353/ Instead of *hoping* it's not a repost, please search the group archives *before* posting. -- \ "I'm beginning to think that life is just one long Yoko Ono | `\ album; no rhyme or reason, just a lot of incoherent shrieks and |

Re: Best way to protect my new commercial software.

2007-12-18 Thread Grant Edwards
On 2007-12-18, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 18 Dec 2007 17:04:29 +, Grant Edwards wrote: > >> On 2007-12-18, Jan Claeys <[EMAIL PROTECTED]> wrote: >>> Op Fri, 14 Dec 2007 16:54:35 +, schreef Grant Edwards: >>> Uh what? I don't know what country you're in, but i

Don't use __slots__ (was Re: Why custom objects take so much memory?)

2007-12-18 Thread Aahz
In article <[EMAIL PROTECTED]>, Chris Mellon <[EMAIL PROTECTED]> wrote: > >You can reduce the size of new-style classes (inherit from object) by >quite a bit if you use __slots__ to eliminate the class dictionary. You can also reduce your functionality quite a bit by using __slots__. Someday I'll

Re: Best way to protect my new commercial software.

2007-12-18 Thread Steven D'Aprano
On Tue, 18 Dec 2007 17:04:29 +, Grant Edwards wrote: > On 2007-12-18, Jan Claeys <[EMAIL PROTECTED]> wrote: >> Op Fri, 14 Dec 2007 16:54:35 +, schreef Grant Edwards: >> >>> Uh what? I don't know what country you're in, but in the US, it >>> doesn't take any time at all to copyright someth

Re: why only an msi-installer for windows ?

2007-12-18 Thread Gabriel Genellina
On 18 dic, 15:54, Stef Mientki <[EMAIL PROTECTED]> wrote: > having a lot of trouble installing 2.5 (without affecting my stable 2.4), > I wonder why there's only a msi installer for windows users ? What's your problem? I have five versions installed (2.1, 2.3, 2.4, 2.5 and svn) and they coexist p

Re: Funny python cartoon... hope it's not a repost

2007-12-18 Thread Breal
On Dec 18, 11:56 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Breal a écrit : > > >http://xkcd.com/353/ > > Bad luck: it *is* a repost. > > While we're at it, did you notice the alternate text for the image ?-) Did not notice the alt text... friggin hilarious!!! -- http://mail.python.org/

Re: New+old-style multiple inheritance

2007-12-18 Thread [EMAIL PROTECTED]
Thank Gabriel, That sounds exactly right and your work-around provides confirmation. This code is an expedient solution for us so I expect we'll go with forcing a slot update. Hopefully the library concerned is going to fix the problem in a future release. Cheers, Stephen. On Dec 18, 7:40 pm,

Re: New+old-style multiple inheritance

2007-12-18 Thread [EMAIL PROTECTED]
On Dec 18, 8:25 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Dec 18, 2:09 pm, Jonathan Gardner > > > > <[EMAIL PROTECTED]> wrote: > > On Dec 18, 7:08 am, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > We are trying to monkey-patch a third-party library that mixes new and > > > old-sty

Re: why only an msi-installer for windows ?

2007-12-18 Thread John Machin
On Dec 19, 7:11 am, Tim Couper <[EMAIL PROTECTED]> wrote: > I think as msi is "The *Windows Installer* .. is an engine for the > installation, maintenance, and removal of software on modern Microsoft > Windows systems" (from > Wikipaedia)", it's clea

Re: Rounding

2007-12-18 Thread John Machin
On Dec 19, 7:21 am, "Ron Provost" <[EMAIL PROTECTED]> wrote: > Adding 0.5, then converting to an int always works for me. > > >>> x = 6.345 > >>> int( x + 0.5 ) > >>> 6 Always? >>> x = -6.345 >>> int(x + 0.5) -5 >>> I therefore deduce that you have never crossed the equator :-) Be careful, doin

Re: Another newbie design question

2007-12-18 Thread MartinRinehart
> My 2 cents... Thanks for the feedback, Bruno. Seriously thinking about ditching the block comments and adding multi-line strings. (Block comments are the last item on my tokenizer's "todo" list. Multi-line strings would be easier.) Beginners will be programming fun things in a GUI environment.

Re: Newbie observations

2007-12-18 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > First, it is absolutely horrible being a newbie. I'd forgot how bad it > was. In addition to making a fool of yourself in public, you have to > look up everything. I wanted to find a substring in a string. OK, > Python's a serious computer language, so you know it's got a

Re: New+old-style multiple inheritance

2007-12-18 Thread Carl Banks
On Dec 18, 2:09 pm, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Dec 18, 7:08 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > We are trying to monkey-patch a third-party library that mixes new and > > old-style classes with multiple inheritance. In so doing we have > > uncovered som

Re: lotus nsf to mbox

2007-12-18 Thread Adam Lanier
On Tue, 2007-12-18 at 19:25 +, Fabian Braennstroem wrote: > Hi to all, > > thanks, I'll try your suggestions... > > Regards! > Fabian > > Brian Munroe schrieb am 12/15/2007 07:10 PM: > > Well, If you wish to go that route, I believe you will have to reverse > > engineer the Notes Database bi

Re: Newbie observations

2007-12-18 Thread John Machin
On Dec 19, 7:14 am, [EMAIL PROTECTED] wrote: > Warning! Complaints coming. > > The good news is that 10-days of part-time Python coding has convinced > me that I picked the right language. Now, observations. > > First, it is absolutely horrible being a newbie. I'd forgot how bad it > was. In additi

Re: Why custom objects take so much memory?

2007-12-18 Thread Hrvoje Niksic
jsanshef <[EMAIL PROTECTED]> writes: > That means every object is around 223 bytes in size That's too > much considering it only contains a string with a maximum size of 7 > chars. The list itself consumes 4 MB because it stores 1 million PyObject pointers. It possibly consumes more due to o

Re: New+old-style multiple inheritance

2007-12-18 Thread Carl Banks
On Dec 18, 10:08 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > We are trying to monkey-patch a third-party library that mixes new and > old-style classes with multiple inheritance. New library? Geez, if people are dumb enough to do this, are you sure you want your application to depend on

Re: Rounding

2007-12-18 Thread Ron Provost
Adding 0.5, then converting to an int always works for me. >>> x = 6.345 >>> int( x + 0.5 ) >>> 6 Ron - Original Message - From: "katie smith" <[EMAIL PROTECTED]> To: Sent: Saturday, December 15, 2007 9:09 AM Subject: Rounding > if i have a number 6.345 and i wanted it to be 6 witho

Newbie observations

2007-12-18 Thread MartinRinehart
Warning! Complaints coming. The good news is that 10-days of part-time Python coding has convinced me that I picked the right language. Now, observations. First, it is absolutely horrible being a newbie. I'd forgot how bad it was. In addition to making a fool of yourself in public, you have to lo

Re: Passing arguments to exe

2007-12-18 Thread kyosohma
On Dec 15, 6:46 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Fri, 14 Dec 2007 16:38:28 -0800 (PST), [EMAIL PROTECTED] declaimed > the following in comp.lang.python: > > > The executable runs, but no argument appears to get passed into it. Of > > course, I don't really know that for sure as

Re: Why custom objects take so much memory?

2007-12-18 Thread Chris Mellon
On Dec 18, 2007 1:26 PM, jsanshef <[EMAIL PROTECTED]> wrote: > Hi, > > after a couple of days of script debugging, I kind of found that some > assumptions I was doing about the memory complexity of my classes are > not true. I decided to do a simple script to isolate the problem: > > class MyClass:

Re: why only an msi-installer for windows ?

2007-12-18 Thread Tim Couper
I think as msi is "The *Windows Installer* .. is an engine for the installation, maintenance, and removal of software on modern Microsoft Windows systems" (from Wikipaedia)", it's clear it's a Windows product ... not sure that they're up for putt

Re: Funny python cartoon... hope it's not a repost

2007-12-18 Thread Bruno Desthuilliers
Breal a écrit : > http://xkcd.com/353/ Bad luck: it *is* a repost. While we're at it, did you notice the alternate text for the image ?-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Another newbie design question

2007-12-18 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > I'd like to hear from people who use Python's multi-line strings other > than in doc comments. Then: do you hear me ?-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Another newbie design question

2007-12-18 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Fortran (1957) had line comments. C (1972) replaced these with non- > nested block comments. C++ (1983) added here-to-EOL comments. Python > (1991) keeps here-to-EOL comments but replaces block comments with > multi-line quotes. Block comments and multi-line quotes bot

Funny python cartoon... hope it's not a repost

2007-12-18 Thread Breal
http://xkcd.com/353/ -- http://mail.python.org/mailman/listinfo/python-list

Re: New+old-style multiple inheritance

2007-12-18 Thread Gabriel Genellina
On 18 dic, 12:08, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > We are trying to monkey-patch a third-party library that mixes new and > old-style classes with multiple inheritance. In so doing we have > uncovered some unexpected behaviour: > > > class Foo: > pass > > class Bar(object): >

Re: is it possible to install 2 Python versions on windows XP ?

2007-12-18 Thread Stef Mientki
I finally found a way to let everything work: My base system is a stable Scipy installation, based on Python 2.4, with a few extra or updated libraries. This Python installation is completed with RPYC and PyScripter, to form a good workplace to develop GUI through wxPython. Installing of a worki

Re: Changing intobject to use int rather than long

2007-12-18 Thread Terry Reedy
"Clarence" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | That's an excellent point. And true, too. Thanks, that will lay the | issue to rest. Good idea. I think people who moved to 64 bits to get 64 bits would be upset if they did not ;-). -- http://mail.python.org/mailma

Re: checking a string against multiple patterns

2007-12-18 Thread Jonathan Gardner
On Dec 18, 4:41 am, tomasz <[EMAIL PROTECTED]> wrote: > Is there an alternative to it? Am I missing something? Python doesn't > have special variables $1, $2 (right?) so you must assign the result > of a match to a variable, to be able to access the groups. > > I'd appreciate any hints. > Don't us

Why custom objects take so much memory?

2007-12-18 Thread jsanshef
Hi, after a couple of days of script debugging, I kind of found that some assumptions I was doing about the memory complexity of my classes are not true. I decided to do a simple script to isolate the problem: class MyClass: def __init__(self,s): self.mystring = s mylist

Re: Does fileinput.input() read STDIN all at once?

2007-12-18 Thread Jonathan Gardner
On Dec 18, 5:55 am, Adam Funk <[EMAIL PROTECTED]> wrote: > I'm using this sort of standard thing: > >for line in fileinput.input(): > do_stuff(line) > > and wondering whether it reads until it hits an EOF and then passes > lines (one at a time) into the variable line. This appears to be

Re: Changing intobject to use int rather than long

2007-12-18 Thread Clarence
On Dec 18, 6:58 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > I don't think changing the underlying type will help at all. The > > On a 64-bit machine, that's 16 bytes for PyObject_HEAD and 8 more > bytes for the value, 24 bytes total. Changing long to int won't > decrease the struct size to 2

Re: WikiInclude on 0.11 - Noah Kantrowitz blocks bug-fix

2007-12-18 Thread smallpond
On Dec 17, 9:23 pm, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > Essence: > > * Deletion of valid defect reports on trac community resources > > The "WikiInclude" plugin is not recognised on trac 0.11, thus I took a > look an made a small addition to the setup.py (the entry_point). > > Other users

Re: Debugging pipe IPC

2007-12-18 Thread Ian Clark
Jim B. Wilson wrote: > ... My fondest wish is to play the role of the child at the > good old ">>>" prompt. ... > > Jim Okay, I misunderstood the direction you wanted to go. I thought that you wanted to play the part of the mother, giving commands to the child and not the other way around. As

Re: New+old-style multiple inheritance

2007-12-18 Thread Jonathan Gardner
On Dec 18, 7:08 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > We are trying to monkey-patch a third-party library that mixes new and > old-style classes with multiple inheritance. In so doing we have > uncovered some unexpected behaviour: > > > I know this level of messing with python inte

Re: Changing intobject to use int rather than long

2007-12-18 Thread Hrvoje Niksic
Clarence <[EMAIL PROTECTED]> writes: > When you move your application to a 64-bit system in order to get a > bigger address space to store your millions/billions of integers in > RAM, but they get twice as big, you don't gain very much. I don't think changing the underlying type will help at all.

Re: .NET and Python Integration Problem and PDF Library (Need Help and Suggestions)

2007-12-18 Thread Joshua Kugler
Ravi Kumar wrote: > - your opinion with available PDF Libraries, that are best among. Also > which library to use for Windows server platform (there is limitation > on installing long chain libraries that include other deep > dependencies too). A pure python PDF library would be good, but which > o

why only an msi-installer for windows ?

2007-12-18 Thread Stef Mientki
hello, having a lot of trouble installing 2.5 (without affecting my stable 2.4), I wonder why there's only a msi installer for windows users ? thanks, Stef -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to protect my new commercial software.

2007-12-18 Thread tinnews
Jan Claeys <[EMAIL PROTECTED]> wrote: > Op Fri, 14 Dec 2007 16:54:35 +, schreef Grant Edwards: > > > Uh what? I don't know what country you're in, but in the US, it doesn't > > take any time at all to copyright something. The mere act of writing > > something copyrights it. I thought it was

Re: Changing intobject to use int rather than long

2007-12-18 Thread Clarence
On Dec 18, 6:24 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > Your int objects get twice as large, but you get 4294967296 times more > address space. > > (They don't always get twice as large, and you don't actually get that > much address space, and there's lots of other things wrong with this

Re: Changing intobject to use int rather than long

2007-12-18 Thread Chris Mellon
On Dec 18, 2007 11:59 AM, Clarence <[EMAIL PROTECTED]> wrote: > Does anyone think (or know) that it might cause any internal problems > if the ival member of the struct defining an intobject were to be > changed from its current "long int" to just "int"? > > When you move your application to a 64-b

Re: lotus nsf to mbox

2007-12-18 Thread Fabian Braennstroem
Hi to all, thanks, I'll try your suggestions... Regards! Fabian Brian Munroe schrieb am 12/15/2007 07:10 PM: > On Dec 15, 11:04 am, Fabian Braennstroem <[EMAIL PROTECTED]> > wrote: > >> thanks for your ideas! I actually thought of something like >> a python parser, which just converts the nsf s

  1   2   >