Re: Advice to a Junior in High School?

2005-01-18 Thread collegebabe2004
wow! Aren't we getting ahead of ourselves? Well, I'm glad you are beefing up your college knowledge but let's just sit back for a minute and breathe..there, feel better? Now, listen. When I was a freshman and sophomore in high school I was so sure I wanted to be an artist and attend one o

Re: lambda

2005-01-18 Thread Antoon Pardon
Op 2005-01-17, Just schreef <[EMAIL PROTECTED]>: > In article <[EMAIL PROTECTED]>, > Antoon Pardon <[EMAIL PROTECTED]> wrote: > >> >> I don't see a big difference between these principles >> >> and the hash key principle, >> > >> > Than you haven't looked hard enough. >> >> All of these can get u

Re: wxPython and PyGame - do they play well together?

2005-01-18 Thread Terry Reedy
"Erik Bethke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am having a great time with python and pygame, and last night I took > a long look at the wxPython demo. I think that rocks as well. > > So now, my question is do wxPython and PyGame work together? I have no personal

Re: Fuzzy matching of postal addresses

2005-01-18 Thread Aaron Bingham
Andrew McLean wrote: I have a problem that is suspect isn't unusual and I'm looking to see if there is any code available to help. I've Googled without success. Basically, I have two databases containing lists of postal addresses and need to look for matching addresses in the two databases. More

Re: [ANN] iCalendar package 0.9

2005-01-18 Thread Roger Binns
"Max M" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://www.mxm.dk/products/public/ical/ > > Any feedback would be welcome. How well do you cope with the crud that real programs generate? Does it work with the different dialects uses out there? Can it at least identify them

Re: lambda

2005-01-18 Thread Antoon Pardon
Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > > Mostly, though, I was trying to say that I found your nitpicking > insistence on terminological exactitude, even when giving advice to > those new to the language, both inappropriate and tedious in the extreme. I

Re: lambda

2005-01-18 Thread Steven Bethard
Antoon Pardon wrote: In this case for example there are a number of people who flat out assert that muatble dict keys in pyhthon is impossible. If you run into any of these folks, please point them to: http://www.python.org/moin/DictionaryKeys It's a pretty good summary of one of the more recent th

inbuilt function buffer()

2005-01-18 Thread km
Hi all, I which context is the inbuilt function buffer() used ? regards, KM -- http://mail.python.org/mailman/listinfo/python-list

Re: Advice to a Junior in High School?

2005-01-18 Thread Stephen Waterbury
collegebabe2004 wrote: wow! Aren't we getting ahead of ourselves? ... Well I'm like "yuhhh!" Like, you know, Japanese ... oh I am *so* shur! -- http://mail.python.org/mailman/listinfo/python-list

Re: Integration with java

2005-01-18 Thread Dan Bishop
Istvan Albert wrote: > Joachim Boomberschloss wrote: > > > the code is already written in Python, using the > > standard libraries and several extension modules > > One thing to keep in mind is that Jython does not > integrate CPython, instead it "understands" python code > directly. So if you ha

Re: [Python-Dev] Getting rid of unbound methods: patch available

2005-01-18 Thread Nick Coghlan
Guido van Rossum wrote: What do people think? (My main motivation for this, as stated before, is that it adds complexity without much benefit.) Something important that came up in my response to Marc-Andre: What about C method implementations which are relying on this typecheck and assuming that '

Re: extension module, thread safety?

2005-01-18 Thread Nick Coghlan
Pierre Barbier de Reuille wrote: With the current CPython, it's very hard to mix Python and C in a multithreading application (with C-threads, not Python-threads). In fact I never really succeeded in that task because of that GIL ! I have a multi-thread application but every bit of Python code m

Re: extension module, thread safety?

2005-01-18 Thread Pierre Barbier de Reuille
Nick Coghlan a écrit : Pierre Barbier de Reuille wrote: With the current CPython, it's very hard to mix Python and C in a multithreading application (with C-threads, not Python-threads). In fact I never really succeeded in that task because of that GIL ! I have a multi-thread application but eve

Re: wxPython and PyGame - do they play well together?

2005-01-18 Thread Erik Bethke
Thank you, My apologies to all for insufficient googling -Erik -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expressions: performance anomaly?

2005-01-18 Thread Nick Coghlan
Raymond Hettinger wrote: [Delaney, Timothy C] Nick's other suggestion - that genexps propagate __len__ - might still be interesting. Of course, it would only be applicable for unconditional genexps(i.e. no if clause). Length transparency for iterators is not as general as one would expect. I once

Re: Socket and Tkinter Problem

2005-01-18 Thread Tonino
hi, was wondering if you ever got a reply ? Did you mannage to sort this out ? I am wanting todo the same thing - just have a window that connects to a port and displays the data it receives from that port in the window? Thanks Tonino -- http://mail.python.org/mailman/listinfo/python-list

Re: extension module, thread safety?

2005-01-18 Thread Nick Coghlan
Pierre Barbier de Reuille wrote: Ok, I wondered why I didn't know these functions, but they are new to Python 2.4 ( and I didn't take the time to look closely at Python 2.4 as some modules I'm working with are still not available for Python 2.4). But if it really allows to call Python code outsi

Re: [ANN] iCalendar package 0.9

2005-01-18 Thread Max M
Roger Binns wrote: "Max M" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] http://www.mxm.dk/products/public/ical/ Any feedback would be welcome. How well do you cope with the crud that real programs generate? Does it work with the different dialects uses out there? Can it at least i

Re: ftplib strange behaviour

2005-01-18 Thread siggy2
Kartic wrote: > I have used ftplib but never for such a huge file (assuming your > problem is related to the size of the file). we're doing that since python 2.2 from different site to different hosts where our script was installed... needless to say all the (few) problems we had came from the serv

Re: Problem parsing namespaces with xml.dom.minidom

2005-01-18 Thread Mike McGavin
Hi Fredrik. Fredrik Lundh wrote: I'm not terribly experienced with XML in general, so it's possible that I'm just incorrectly interpreting how things are supposed to work to begin with. If this is the case, please accept my apologies, but I'd like any suggestions for how I should be doing it. I

Re: Problem parsing namespaces with xml.dom.minidom

2005-01-18 Thread Fredrik Lundh
Mike McGavin wrote: >> is the DOM API an absolute requirement? > > It wouldn't need to conform to the official specifications of the DOM API, > but I guess I'm after > some comparable functionality. > > In particular, I need to be able to parse a namespace-using XML document into > some kind of

Re: generator expressions: performance anomaly?

2005-01-18 Thread Antoon Pardon
Op 2005-01-18, Nick Coghlan schreef <[EMAIL PROTECTED]>: > Raymond Hettinger wrote: >> [Delaney, Timothy C] >> >>>Nick's other suggestion - that genexps propagate __len__ - might >>>still be interesting. Of course, it would only be applicable for >>>unconditional genexps(i.e. no if clause). >> >>

Re: Problem parsing namespaces with xml.dom.minidom

2005-01-18 Thread Paul Prescod
You've reversed some function parameters. Here's a program that works fine (note that you don't need to set up a SAX parser): from xml.dom import minidom text = ''' alias Thu Jan 30 15:06:06 NZDT 2003 Nothing ''' # Parse the string into a minidom mydom = minidom.parseString(t

Re: Fuzzy matching of postal addresses

2005-01-18 Thread Simon Brunning
You might find these at least periperally useful: They refer to address formatting rather than de-duping - but normalising soulds like a useful first step to me. -- Che

Re: lambda

2005-01-18 Thread Simon Brunning
On 18 Jan 2005 07:51:00 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: > 3 mutating an item in a sorted list *does* *always* cause problems No, it doesn't. It might cause the list no longer to be sorted, but that might or might no be a problem. > More specific the Decimal class is mutable and usab

Re: lambda

2005-01-18 Thread Antoon Pardon
Op 2005-01-18, Simon Brunning schreef <[EMAIL PROTECTED]>: > On 18 Jan 2005 07:51:00 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> 3 mutating an item in a sorted list *does* *always* cause problems > > No, it doesn't. It might cause the list no longer to be sorted, but > that might or might no b

Re: generator expressions: performance anomaly?

2005-01-18 Thread Steve Holden
Antoon Pardon wrote: Op 2005-01-18, Nick Coghlan schreef <[EMAIL PROTECTED]>: Raymond Hettinger wrote: [Delaney, Timothy C] Nick's other suggestion - that genexps propagate __len__ - might still be interesting. Of course, it would only be applicable for unconditional genexps(i.e. no if clause). Le

Re: Central New Jersey PIG Meeting -- Python Interest Group In Princeton PIG/IP

2005-01-18 Thread [EMAIL PROTECTED]
Yes Jay. PIG/IP meetings are publicly open with no RSVP necessary. Most of the folks coming are LUG/IP members, as I am and the location is the same as LUG/IP meetings. We haven't formalized the group's affiliation yet. -- Jon -- http://mail.python.org/mailman/listinfo/python-list

Re: Integration with java

2005-01-18 Thread Steve Holden
Dan Bishop wrote: Istvan Albert wrote: Joachim Boomberschloss wrote: the code is already written in Python, using the standard libraries and several extension modules One thing to keep in mind is that Jython does not integrate CPython, instead it "understands" python code directly. So if you have

MDaemon Warning - virus found: Returned mail: Data format error

2005-01-18 Thread Mail Administrator
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken ---

Re: lambda

2005-01-18 Thread Nick Coghlan
Antoon Pardon wrote: More specific the Decimal class is mutable and usable as dict key. It's *meant* to be immutable though. The fact that we used __slots__ instead of __setattr__ to implement the immutability, so you *can* overwrite the slot variables if you really want to is merely an artifact

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
> Something else I was thinking about. I think it would be nice if the > python compilor could figure out whether a genexp in a list or tuple > expression always generates the same list or tuple and then instead > of generating code would generate the list or tuple in place. This won't ever happen

Re: generator expressions: performance anomaly?

2005-01-18 Thread Antoon Pardon
Op 2005-01-18, Steve Holden schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Op 2005-01-18, Nick Coghlan schreef <[EMAIL PROTECTED]>: >> >>>Raymond Hettinger wrote: >>> [Delaney, Timothy C] >Nick's other suggestion - that genexps propagate __len__ - might >still be in

Re: List problems in C code ported to Python

2005-01-18 Thread Bengt Richter
On Mon, 17 Jan 2005 15:28:56 GMT, Lucas Raab <[EMAIL PROTECTED]> wrote: >Lucas Raab wrote: >> I'm done porting the C code, but now when running the script I >> continually run into problems with lists. I tried appending and >> extending the lists, but with no avail. Any help is much appreciated

Re: generator expressions: performance anomaly?

2005-01-18 Thread Ola Natvig
Antoon Pardon wrote: Op 2005-01-18, Steve Holden schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: Op 2005-01-18, Nick Coghlan schreef <[EMAIL PROTECTED]>: Raymond Hettinger wrote: [Delaney, Timothy C] Nick's other suggestion - that genexps propagate __len__ - might still be interesting. Of cou

Re: how to find site-packages path (Michael Hoffman) - use distutils

2005-01-18 Thread Philippe C. Martin
>> Why would you want to copy any *.pyc instead of compiling them on site? I know that sounds terrible to the open source community, but I do not intend to release the source code for my product - pls go to philippecmartin.com/applications.html for my _small_ contributions :-)) Regards, Philip

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
>lst = list(genexp) >tpl = tuple(genexp) > > > Since in such cases the object is build in memory any way, I don't > think it would be a problem of having them prebuilt in memory, or am > I missing something? Yes. Consider this: lst = list(time.time() for i in xrange(10)) tpl = tuple(ti

Re: news feed problem -- anyone else?

2005-01-18 Thread Bengt Richter
On 17 Jan 2005 16:48:24 EST, Tim Daneliuk <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >> I can see postings on google, but my news service >> is having a problem since sometime during the weekend. >> Can get old stuff from other n.g., but no new. >> Wondering whether I'll see this via googl

Re: generator expressions: performance anomaly?

2005-01-18 Thread Ola Natvig
Diez B. Roggisch wrote: lst = list(genexp) tpl = tuple(genexp) Since in such cases the object is build in memory any way, I don't think it would be a problem of having them prebuilt in memory, or am I missing something? Yes. Consider this: lst = list(time.time() for i in xrange(10)) tpl = tupl

[wxpython] exclude files in a wx.FileDialog?

2005-01-18 Thread John Field
Hello, Is it possible to exclude certain files in a wx.FileDialog, so that the user won't see them and can't select them with the mouse in de File open window? I was thinking of somehow extending the class FileDialog(Dialog) in the wx module _windows.py to a subclass, but I'm not sure how to d

Re: extension module, thread safety?

2005-01-18 Thread Pierre Barbier de Reuille
Nick Coghlan a écrit : The Python 2.4 docs claim the functions were added in Python 2.3, even though they aren't documented in the 2.3.4 docs. The 2.3 release PEP (PEP 283) confirms that PEP 311 (which added these functions) went in. Indeed, I just tested it and now it works fine :) Thanks a lot

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
> Would it be a bad solution to make that a list or tuple of ten > time.time() calls, you could also restrict what theese prebuilding > sequenses could contain, or perhaps try to prebuild them, and then fail > if it's impossible. I don't fully understand what you mean. Restricting them would mean

Re: lambda

2005-01-18 Thread Antoon Pardon
Op 2005-01-18, Nick Coghlan schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> More specific the Decimal class is mutable and usable as dict key. > > It's *meant* to be immutable though. The fact that we used __slots__ instead > of > __setattr__ to implement the immutability, so you *can* ove

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Jay Tilton
"Xah Lee" <[EMAIL PROTECTED]> wrote: : # the syntax of keyed list in Perl is too complex : # to be covered in a short message. You've got to be joking. You couldn't even muster enough skill to provide Perl equivalents for the four simple Python statements you showed? : # see "perldoc perldata"

Re: strange note in fcntl docs

2005-01-18 Thread John Lenton
On Mon, Jan 17, 2005 at 09:54:46PM -0600, Skip Montanaro wrote: > > John> And, even if they were, the note is *still* wrong and misleading: > John> fcntl is available on Windows, and os.open's flags won't be. > > Does this read better? > > [snip] yes, and it takes me back to considering

Re: Employablity of python programmers

2005-01-18 Thread Premshree Pillai
Hi, I program in Python -- but not at work. There are very few opportunities for Python work in India. As of now, at least. (If somebody else has better information, please correct me.) A lot of people _do_ use Python, but not many organizations use it. Okay, as an aside, as a computer _science_

Re: [wxpython] exclude files in a wx.FileDialog?

2005-01-18 Thread Franz Steinhaeusler
On 18 Jan 2005 13:23:24 GMT, John Field <[EMAIL PROTECTED]> wrote: >Hello, > >Is it possible to exclude certain files in a wx.FileDialog, so that the user >won't see them and can't select them with the mouse in de File open window? > >I was thinking of somehow extending the class FileDialog(Dial

Re: generator expressions: performance anomaly?

2005-01-18 Thread Stephen Thorne
On Tue, 18 Jan 2005 07:12:18 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: > Since it doesn't yet optimize 2+5 to a constant-folded 7 you should > realize that you are suggesting a large increase in the compiler's > analytical powers. As in interesting aside to this, you might be interested to kn

Re: generator expressions: performance anomaly?

2005-01-18 Thread Ola Natvig
Diez B. Roggisch wrote: Would it be a bad solution to make that a list or tuple of ten time.time() calls, you could also restrict what theese prebuilding sequenses could contain, or perhaps try to prebuild them, and then fail if it's impossible. I don't fully understand what you mean. Restricting

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
> My thoughts where to let the 'leftmost' section of the expression to be > intact so that any of the dynamic things done to this part, i.e. > replacing time.time with random.random are taken into consideration. > What can be done is to extract the expression into a loopless structure > > lst = l

Re: generator expressions: performance anomaly?

2005-01-18 Thread Antoon Pardon
Op 2005-01-18, Diez B. Roggisch schreef <[EMAIL PROTECTED]>: >> Something else I was thinking about. I think it would be nice if the >> python compilor could figure out whether a genexp in a list or tuple >> expression always generates the same list or tuple and then instead >> of generating code w

MemoryError with parser.suite and wrong encoding declaration

2005-01-18 Thread Sylvain Thenault
Hi there ! I've noticed the following problem with python >= 2.3 (actually 2.3.4 and 2.4): [EMAIL PROTECTED]:test$ python Python 2.3.4 (#2, Sep 24 2004, 08:39:09) [GCC 3.3.4 (Debian 1:3.3.4-12)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import parser >>>

Re: generator expressions: performance anomaly?

2005-01-18 Thread Ola Natvig
What makes the leftmost expression different from the iterable returning expression inside the for? The same arguments apply there. It's not different, but it's a requirement that the iterable returns the same data every time. I know that anyone can type range = fancyRange and make this return a

Re: lambda

2005-01-18 Thread John Lenton
On Mon, Jan 17, 2005 at 03:20:01PM +, Antoon Pardon wrote: > Op 2005-01-17, John Lenton schreef <[EMAIL PROTECTED]>: > > > > knowledgeable and experienced users know when to ignore the rules. > > Then why seems there to be so few acknowledgement that these rules > may indeed be broken by users

Re: lambda

2005-01-18 Thread Steve Holden
Antoon Pardon wrote: Op 2005-01-18, Nick Coghlan schreef <[EMAIL PROTECTED]>: [...] But don't use mutable keys is not a general principle. It is a principle introduced by the limitations of the python implementations. Sorry, but it *is* a general principle, adduced from the potential pitfalls avai

Re: generator expressions: performance anomaly?

2005-01-18 Thread Steve Holden
Stephen Thorne wrote: On Tue, 18 Jan 2005 07:12:18 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: Since it doesn't yet optimize 2+5 to a constant-folded 7 you should realize that you are suggesting a large increase in the compiler's analytical powers. As in interesting aside to this, you might be

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
> I don't see how generating byte code for a = 9; when seeing the > expression a = 3 + 6, would be a problem for non-functional > languages. Most probably. But I don't see much code of that type that it would be worth optimizing for, either. The cost for re-evaluation such an expression doesn't re

Re: generator expressions: performance anomaly?

2005-01-18 Thread Steve Holden
Antoon Pardon wrote: Op 2005-01-18, Diez B. Roggisch schreef <[EMAIL PROTECTED]>: Something else I was thinking about. I think it would be nice if the python compilor could figure out whether a genexp in a list or tuple expression always generates the same list or tuple and then instead of generati

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Jürgen Exner
Xah Lee wrote: > © # in perl, keyed-list is done like this: Just FYI: those thingies are called hashes. The legacy name would be associative array. > © %a = ('john',3, 'mary', 4, 'jane', 5, 'vicky',7); > © use Data::Dumper qw(Dumper); > © print Dumper \%a; Wow, my compliments. The very first ti

Re: lambda

2005-01-18 Thread Antoon Pardon
Op 2005-01-18, Steve Holden schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Op 2005-01-18, Nick Coghlan schreef <[EMAIL PROTECTED]>: > [...] >> But don't use mutable keys is not a general principle. It is a principle >> introduced by the limitations of the python implementations. >> > Sor

bind error!!!!!

2005-01-18 Thread Perrin Aybara
hi.. my code was working pretty well until yesterday.suddenly it started giving me bind error: address already in use. but i have logged out and again logged in, but still the problem is not solved can somebody give me solution for this thankx perrin -- http://mail.python.org/mailman/listinfo/pyt

ANNOUNCE: Altova DiffDog 2005 - the dedicated differencing utility for developers and power users

2005-01-18 Thread Altova Announcements
Altova Unveils DiffDog(tm) 2005 --- This week, Altova added a new dedicated differencing utility to its award-winning product line. DiffDog 2005 is a powerful, easy-to-use synchronization tool that facilitates the comparison and merging of files, folders, and direct

Re: generator expressions: performance anomaly?

2005-01-18 Thread Antoon Pardon
Op 2005-01-18, Steve Holden schreef <[EMAIL PROTECTED]>: > Python is *designed* as a dynamic language. I wish you would embrace > this aspect rather than continually trying to shoehorn it into a static > straitjacket. Efficiency is good. Flexibility is better. Flexibility is better? IMO flexibi

RE: bind error!!!!!

2005-01-18 Thread Batista, Facundo
Title: RE: bind error! [Perrin Aybara] #- my code was working pretty well until yesterday.suddenly it started #- giving me bind error: address already in use. #- but i have logged out and again logged in, but still the #- problem is not solved #- can somebody give me solution for this

Re: MemoryError with parser.suite and wrong encoding declaration

2005-01-18 Thread Thomas Heller
Sylvain Thenault <[EMAIL PROTECTED]> writes: > Hi there ! > I've noticed the following problem with python >= 2.3 (actually 2.3.4 and > 2.4): > > [EMAIL PROTECTED]:test$ python > Python 2.3.4 (#2, Sep 24 2004, 08:39:09) > [GCC 3.3.4 (Debian 1:3.3.4-12)] on linux2 > Type "help", "copyright", "credi

Re: generator expressions: performance anomaly?

2005-01-18 Thread Steve Holden
Antoon Pardon wrote: Op 2005-01-18, Steve Holden schreef <[EMAIL PROTECTED]>: Python is *designed* as a dynamic language. I wish you would embrace this aspect rather than continually trying to shoehorn it into a static straitjacket. Efficiency is good. Flexibility is better. Flexibility is bett

Re: bind error!!!!!

2005-01-18 Thread Steve Holden
Perrin Aybara wrote: hi.. my code was working pretty well until yesterday.suddenly it started giving me bind error: address already in use. but i have logged out and again logged in, but still the problem is not solved can somebody give me solution for this thankx perrin Next time, please ask a sli

script to automate GUI application (newbie)

2005-01-18 Thread bogdan romocea
Dear Python experts, I have a GUI application (Windows; apparently written in Java) which I want to use through a script (without a mouse or keyboard). First, one of several buttons needs to be clicked (no keyboard shortcuts available, but I can measure the coordinates in pixels from the top left

Re: Integration with java (Jpype vs. JPE)

2005-01-18 Thread Istvan Albert
Steve Menard wrote: To asnwer your question more fully, the jpype-specific cide is only for looking up the Classes and startting/stopping the environment. For everything else, Java objects and classes are used as regular Python objects. Thanks for the response. Currently I don't need to use java

Re: bind error!!!!!

2005-01-18 Thread Fredrik Lundh
Perrin Aybara wrote: > my code was working pretty well until yesterday.suddenly it started > giving me bind error: address already in use. google has the details: http://hea-www.harvard.edu/~fine/Tech/addrinuse.html > but i have logged out and again logged in, but still the problem is not s

RE: script to automate GUI application (newbie)

2005-01-18 Thread Tim Golden
[bogdan romocea] | I have a GUI application (Windows; apparently written in Java) which I | want to use through a script (without a mouse or keyboard). First, one | of several buttons needs to be clicked (no keyboard shortcuts | available, but I can measure the coordinates in pixels from the top |

Re: how to find site-packages path

2005-01-18 Thread Eric S. Johansson
Michael Hoffman wrote: Philippe C. Martin wrote: I am using my own install script for my software and am looking for a flawless way to figure out where python, and more specifically site-packages is installed. The flawless way would be to use distutils. In fact you shouldn't even need your own ins

Re: Integration with java (Jpype vs. JPE)

2005-01-18 Thread Joachim Boomberschloss
Thanks for the info. I understand now the background and possibilities, but would like to refine my query: As I see it, writing a hybrid Java/Python application faces approximately three possibilities: (i) write the core in Java and do some scripting with Jython, (ii) write independent code in Java

Re: Advice to a Junior in High School?

2005-01-18 Thread Peter Hansen
collegebabe2004 wrote: I would suggest taking Japanese because you will have to work with them eventually if you do decide to choose compsci as your proffesion. Over what time frame should I expect this requirement to become critical? I'd like to know so I can reserve a spot in the next Japanese c

Re: MemoryError with parser.suite and wrong encoding declaration

2005-01-18 Thread Sylvain Thenault
On Tue, 18 Jan 2005 16:16:32 +0100, Thomas Heller wrote: > Sylvain Thenault <[EMAIL PROTECTED]> writes: > >> Hi there ! >> I've noticed the following problem with python >= 2.3 (actually 2.3.4 >> and 2.4): >> >> [EMAIL PROTECTED]:test$ python >> Python 2.3.4 (#2, Sep 24 2004, 08:39:09) [GCC 3.3.4

Re: script to automate GUI application (newbie)

2005-01-18 Thread Grig Gheorghiu
Bogdan, If your app is written in Java, take a look at Marathon (http://marathonman.sourceforge.net/). It uses Jython as its scripting language and it's pretty smart about how it does automation (i.e. it doesn't look at screen coordinates, but at control names). It also offers a capture/replay fun

simultaneous multiple requests to very simple database

2005-01-18 Thread Eric S. Johansson
I have an application where I need a very simple database, effectively a very large dictionary. The very large dictionary must be accessed from multiple processes simultaneously. I need to be able to lock records within the very large dictionary when records are written to. Estimated number

Re: Advice to a Junior in High School? [OT]

2005-01-18 Thread TZOTZIOY
On Tue, 18 Jan 2005 11:04:01 -0500, rumours say that Peter Hansen <[EMAIL PROTECTED]> might have written: >collegebabe2004 wrote: >> I would suggest taking Japanese because you will have to work with them >> eventually if you do decide to choose compsci as your proffesion. [Peter] >Over what time

makepy crashing

2005-01-18 Thread markscottwright
Has anyone sucessfully run makepy and Microsoft Word Object Library (9.0)? Mine crashes under XP Pro and Python 2.4. It only seems to be word that has the problem, though. I get a dialog that says that pythonwin.exe has crashed: AppName: pythonwin.exe AppVer: 0.0.0.0 ModName: ntdll.dll

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Tassilo v. Parseval
Also sprach Jürgen Exner: > Xah Lee wrote: >> © %a = ('john',3, 'mary', 4, 'jane', 5, 'vicky',7); >> © use Data::Dumper qw(Dumper); >> © print Dumper \%a; > > Wow, my compliments. The very first time that using Data::Dumper actually > may do something useful (formats the data more nicely). Still

RE: simultaneous multiple requests to very simple database

2005-01-18 Thread Robert Brewer
Eric S. Johansson wrote: > I have an application where I need a very simple database, > effectively a very large dictionary. The very large > dictionary must be accessed from multiple processes > simultaneously. I need to be able to lock records within > the very large dictionary when records ar

One-Shot Property?

2005-01-18 Thread Kevin Smith
I have many cases in my code where I use a property for calculating a value on-demand. Quite a few of these only need to be called once. After that the value is always the same. In these properties, I set a variable in the instance as a cached value and return that value on subsequent calls

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Reinhold Birkenfeld
Jay Tilton wrote: >: # the syntax of keyed list in Perl is too complex >: # to be covered in a short message. JFTR: "keyed lists" are called dictionaries in Python. > > [1]Message-ID: <[EMAIL PROTECTED]> > This guy's wish-wash is starting to be funny, after all! Reinhold -- http://mail.pyth

Tkinter in thread hangs on windows but not on Linux

2005-01-18 Thread Philippe C. Martin
Hi, I need to pop-up in a "modless" manner some windows from an existing Tkinter loop. The following code works OK under Linux: the second window opens, shows the information, and quits cleanly when destroyed. However, under windows, I get the second window without the content (so I hang in run I

Re: [perl-python] 20050118 keyed list

2005-01-18 Thread Reinhold Birkenfeld
Jürgen Exner wrote: >> © # see "perldoc perldata" for an unix-styled course. > > Excuse me? Do you mind explaining where exactly perldata is "Unix-styled"? Remember: Perl == Unix == Satan. Reinhold -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous multiple requests to very simple database

2005-01-18 Thread Eric S. Johansson
Robert Brewer wrote: Eric S. Johansson wrote: I have an application where I need a very simple database, effectively a very large dictionary. The very large dictionary must be accessed from multiple processes simultaneously. I need to be able to lock records within the very large dictionary when

Re: One-Shot Property?

2005-01-18 Thread Dave Benjamin
Kevin Smith wrote: I have many cases in my code where I use a property for calculating a value on-demand. Quite a few of these only need to be called once. After that the value is always the same. In these properties, I set a variable in the instance as a cached value and return that value on

Re: script to automate GUI application (newbie)

2005-01-18 Thread Jim
It sounds like a case for the Expect program, to me. Try Google-ing for "Expect". If you are looking for a Python approach, then try googling for "Expect Python". Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: One-Shot Property?

2005-01-18 Thread Daniel Dittmar
Kevin Smith wrote: I have many cases in my code where I use a property for calculating a value on-demand. Quite a few of these only need to be called once. After that the value is always the same. In these properties, I set a variable in the instance as a cached value and return that value on

Re: generator expressions: performance anomaly?

2005-01-18 Thread Jeremy Bowers
On Tue, 18 Jan 2005 14:05:15 +, Antoon Pardon wrote: > I don't see how generating byte code for a = 9; when seeing the > expression a = 3 + 6, would be a problem for non-functional > languages. To answer nearly every post you've made to this thread, "because Python doesn't have the resources t

Re: ANNOUNCE: Altova ... blah blah blah

2005-01-18 Thread Irmen de Jong
Altova Announcements wrote: Altova Unveils . [spam] Well now, I didn't like their products very much already, but this spam has certainly made them drop another few steps down on my scale. Hmpf. --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: One-Shot Property?

2005-01-18 Thread Leif K-Brooks
Kevin Smith wrote: I have many cases in my code where I use a property for calculating a value on-demand. Quite a few of these only need to be called once. After that the value is always the same. In these properties, I set a variable in the instance as a cached value and return that value on

Re: Integration with java (Jpype vs. JPE)

2005-01-18 Thread Irmen de Jong
Joachim Boomberschloss wrote: Option iii would also enable writing independent packages in Python and Java, but its glue layer will be distributed between Python and Java using Jython and Pyro (I chose Pyro because it works in both CPython and Jython, and can be used to communicate between them). P

Re: One-Shot Property?

2005-01-18 Thread John Lenton
On Tue, Jan 18, 2005 at 04:54:56PM +, Kevin Smith wrote: > > I have many cases in my code where I use a property for calculating a > value on-demand. Quite a few of these only need to be called once. > After that the value is always the same. In these properties, I set a > variable in th

Print to Windows default Printer

2005-01-18 Thread Samantha
I am new to Python and I am having considerable trouble trying to print (using a simple script) to the default printer rather than the screen. Thanks for any help. S -- http://mail.python.org/mailman/listinfo/python-list

Re: Print to Windows default Printer

2005-01-18 Thread Peter Hansen
Samantha wrote: I am new to Python and I am having considerable trouble trying to print (using a simple script) to the default printer rather than the screen. Thanks for any help. Please show some example code, and explain in more detail what you are trying to do. There are perhaps *dozens* of di

hex notation funtion

2005-01-18 Thread tertius
Hi, Is there a builtin function that will enable me to display the hex notation of a given binary string? (example below) many thanks Tertius () 02 11 00 00 46 5A 1A 82 02 11 00 39 36 39 33 39 FZ.96939 0016(0010) 36 39 33 00 0A 30 33 37 34 34 39 35 38 25 DD 01 693..0374495

pickling extension class

2005-01-18 Thread harold fellermann
Hi all, I have a problem pickling an extension class. As written in the Extending/Embedding Manual, I provided a function __reduce__ that returns the appropreate tuple. This seams to work fine, but I still cannot pickle because of the following error: >>> from model import hyper >>> g = hyper.Pe

Re: hex notation funtion

2005-01-18 Thread Irmen de Jong
tertius wrote: Hi, Is there a builtin function that will enable me to display the hex notation of a given binary string? (example below) Does this help: >>> "hello".encode("hex") '68656c6c6f' >>> "deadbeef".decode("hex") '\xde\xad\xbe\xef' ? --Irmen -- http://mail.python.org/mailman/listinfo/pytho

Re: hex notation funtion

2005-01-18 Thread Philippe C. Martin
Would that do it? for i in my_byte_string: = atoi(binascii.hexlify(i),16) Regards, Philippe On Tue, 18 Jan 2005 20:43:44 +0200, tertius wrote: > Hi, > > Is there a builtin function that will enable me to display the hex > notation of a given binary string? (example below) > > man

  1   2   >