Re: comparison with None

2007-04-19 Thread Steven D'Aprano
On Thu, 19 Apr 2007 02:46:18 +, Alan Isaac wrote: > However, Gary Herron's explanation makes sense: this provides a stable > sort when None is involved, and meets the criterion that objects of > different types must always compare unequal. That's only correct for "sensible" objects that don't

Re: What makes an iterator an iterator?

2007-04-19 Thread Steven D'Aprano
On Wed, 18 Apr 2007 01:45:10 -0700, Paul McGuire wrote: >> For the record, this is what I actually wanted: a four-line self-sorting >> dictionary: >> >> class SortedDict(dict): >> def __iter__(self): >> for key in sorted(self.keys()): >> yield key [snip] > Very neat. Why

Re: 2.5 from source install problem with extensions

2007-04-19 Thread Florian Demmer
On Apr 18, 7:39 pm, Anton Hartl <[EMAIL PROTECTED]> wrote: > Hi, > > On 2007-04-18, Florian Demmer <[EMAIL PROTECTED]> wrote: > > > On Apr 18, 12:36 pm, Florian Demmer <[EMAIL PROTECTED]> wrote: > >> Hi! > > >> I am doing a from source installation of Python 2.5 on some old Debian > >> machine. As

Re: What makes an iterator an iterator?

2007-04-19 Thread Steven D'Aprano
On Wed, 18 Apr 2007 19:45:50 -0700, Alex Martelli wrote: > 7stud <[EMAIL PROTECTED]> wrote: >... >> Can you explain some of the details of why this code fails: >... >> def next(self): >> for word in "Norwegian Blue's have beautiful >> plumage!".split(): >> yield wor

Re: Text Suffix to Prefix Conversion

2007-04-19 Thread Peter Otten
7stud wrote: > On Apr 18, 11:08 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: >> EMC ROY wrote: >> > Original Sentence: An apple for you. >> > Present: An apple for you .<.> >> > Desire:An apple for you <.>. >> >>> text = 'An apple for you .<.>' >> >>> import re >> >>> re.sub

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Michael Bentley
On Apr 18, 2007, at 5:11 PM, Kevin Walzer wrote: > James Stroud wrote: > >> This appears more or less unique to Objective C. It looks that with >> PyObjC, you have to interact with the Objective C runtime to manage >> memory. This is not required, thankfully, with any other GUI tookits >> I've se

Re: unicode and __repr__()

2007-04-19 Thread Martin v. Löwis
Martin Drautzburg schrieb: > I am using UTF-8 and assembling the string expression > manually works okay and the umlaute appear correctly in the browser (so > I could probably write my own serializer and it would work). That's what you should do. Or you can use one that people have already written

Boost.Python create extra functions not in wrapped object

2007-04-19 Thread Stou Sandalski
Hi, I have a python library created by wrapping the C++ library using Boost.Python, the problem is that the wrappers are not very pythonic so I want to add some methods that do not exist in the C+ + implementation, that would create a better Python interface. For example to initialize the dat

Re: Question about Tkinter MenuOption variable

2007-04-19 Thread Rob Wolfe
Chad wrote: > Is there anyway to set the individual options in Tkinter to a > particular variable. For example, I have a menu option(code is below) > which has January, February, March and so on, which I would like to > have corresponding values of 01, 02, 03 and so on. Can someone please > tell

Re: Wanted: Email Client with GUI

2007-04-19 Thread franz . steinhaeusler
Hello, thanks, Chandler looks good, maybe I will give it a try. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Boost.Python create extra functions not in wrapped object

2007-04-19 Thread Roman Yakovenko
On 19 Apr 2007 00:37:36 -0700, Stou Sandalski <[EMAIL PROTECTED]> wrote: Hi, I have a python library created by wrapping the C++ library using Boost.Python, the problem is that the wrappers are not very pythonic so I want to add some methods that do not exist in the C+ + implementation, tha

Re: Beginner: Formatting text output (PyQt4)

2007-04-19 Thread Jeremy Sanders
Glen wrote: > What seems to be happening is that the font that pyqt is using is not > fixed width, so I did this: > qTxtFormat = QTextCharFormat() > qTxtFormat.setFontFixedPitch(True) > ui.textEdit.setCurrentCharFormat(qTxtFormat) Does something like ui.textEdit.setCurrentFont(QFont('fixed')) wor

RELEASED Python 2.5.1, FINAL

2007-04-19 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.5.1 (FINAL) This is the first bugfix release of Python 2.5. Python 2.5 is now in bugfix-only mode; no new features are being added. According to the release notes, over 150 bugs and pat

Re: Boost.Python create extra functions not in wrapped object

2007-04-19 Thread Roman Yakovenko
On 4/19/07, Stou Sandalski <[EMAIL PROTECTED]> wrote: Thanks for the reply, That is what I am doing now, the problem is that I need the code to be in C/C++ inside the wrapper. I am creating a lot of these objects and each time I am iterating over ~1.4 million points... and in python it's quite

About installing new Python version.

2007-04-19 Thread king kikapu
Hi to all, i started with Python at v2.5 and now i see that a new version is released. As i already have a lot of stuff for Python installed in the site- packages directory, which is the correct way to install a new Python version without do any damage ? Remove Python and ALL Python related softw

Re: using the sysloghandler class

2007-04-19 Thread Vinay Sajip
On Apr 18, 11:42 pm, "Nicholas Milkovits" <[EMAIL PROTECTED]> wrote: > Hello all, > > I have a small script which attempts to write to the user.log syslog > > importlogging,logging.handlers > > logger =logging.getLogger('bender') > handler > =logging.handlers.SysLogHandler(('localhost',logging.han

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Antoon Pardon
On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: > > On Apr 18, 2007, at 5:11 PM, Kevin Walzer wrote: > >> James Stroud wrote: >> >>> This appears more or less unique to Objective C. It looks that with >>> PyObjC, you have to interact with the Objective C runtime to manage >>> memory. This

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Michael Bentley
On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote: > On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: >> >> On Apr 18, 2007, at 5:11 PM, Kevin Walzer wrote: >> >>> James Stroud wrote: >>> This appears more or less unique to Objective C. It looks that with PyObjC, you have to int

Re: About installing new Python version.

2007-04-19 Thread half . italian
On Apr 19, 2:03 am, king kikapu <[EMAIL PROTECTED]> wrote: > Hi to all, > > i started with Python at v2.5 and now i see that a new version is > released. > As i already have a lot of stuff for Python installed in the site- > packages directory, which is the correct way to install a new Python > ver

Re: Compiling python from soruce vs RPM ?

2007-04-19 Thread Paul Boddie
On 19 Apr, 04:39, howa <[EMAIL PROTECTED]> wrote: > > One more question: > > How to uninstall using the source package? > > the source package doesn't come with `make uninstall`? Right. That's another pitfall of most source distributions (ie. the Python sources from python.org) compared to system

Re: About installing new Python version.

2007-04-19 Thread king kikapu
On Apr 19, 11:39 am, [EMAIL PROTECTED] wrote: > On Apr 19, 2:03 am, king kikapu <[EMAIL PROTECTED]> wrote: > > > Hi to all, > > > i started with Python at v2.5 and now i see that a new version is > > released. > > As i already have a lot of stuff for Python installed in the site- > > packages direc

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Michael Maibaum
On 18/04/07, Kevin Walzer <[EMAIL PROTECTED]> wrote: James Stroud wrote: > This appears more or less unique to Objective C. It looks that with > PyObjC, you have to interact with the Objective C runtime to manage > memory. This is not required, thankfully, with any other GUI tookits > I've seen

Re: About installing new Python version.

2007-04-19 Thread Ant
> checked and everything seems to working fine. But this is an update > release to 2.5, i do not know what is happening when, for example, a > totally new Python version come out, like 2.6 or 2.7 or... Again just install it - it will by default install alongside Python 2.5 in a different directory

Re: About installing new Python version.

2007-04-19 Thread king kikapu
On Apr 19, 12:10 pm, Ant <[EMAIL PROTECTED]> wrote: > > checked and everything seems to working fine. But this is an update > > release to 2.5, i do not know what is happening when, for example, a > > totally new Python version come out, like 2.6 or 2.7 or... > > Again just install it - it will by

CGI Script using Python

2007-04-19 Thread Ralf
Hello, is there anybody who can help me. I would like to use a Python Script to download Files from a Server to the Client, to update the Client. Thanx Ralf -- http://mail.python.org/mailman/listinfo/python-list

Helpbook and CHM

2007-04-19 Thread Teja
How to create a helpbook and display it using python(in Boa). Also, how to generate CHM files in Boa(Python)??? Any pointers please -- http://mail.python.org/mailman/listinfo/python-list

Re: Helpbook and CHM

2007-04-19 Thread Tim Golden
Teja wrote: > how to generate CHM files in Boa(Python)??? http://www.rutherfurd.net/software/rst2chm/index.html TJG -- http://mail.python.org/mailman/listinfo/python-list

Re: Helpbook and CHM

2007-04-19 Thread Teja
On Apr 19, 3:48 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > Teja wrote: > > how to generate CHM files in Boa(Python)??? > >http://www.rutherfurd.net/software/rst2chm/index.html > > TJG Can't I do it in Boa constructor ??? I have seen an option in Boa to create a new helpbook and compile it to

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Antoon Pardon
On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: > > On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote: > >> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: >>> >>> PyObjC is pretty slick (and since Ronald hasn't made any commits in a >>> while I'm nearly certain it'll show up in

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Michael Bentley
*plonk* -- http://mail.python.org/mailman/listinfo/python-list

using tkinter to display html

2007-04-19 Thread Stephen M. Gava
Hi all, I prefer using tkinter to wxpython (so sue me :) and i need to display a lot of html in a particular app. does anyone know if one of the existing add on tk html widgets have been wrapped for tkinter already? TIA for any reply, Stephen -- http://mail.python.org/mailman/listinfo/python-l

Re: Helpbook and CHM

2007-04-19 Thread Ravi Teja
On Apr 19, 3:58 am, Teja <[EMAIL PROTECTED]> wrote: > On Apr 19, 3:48 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > > > Teja wrote: > > > how to generate CHM files in Boa(Python)??? > > >http://www.rutherfurd.net/software/rst2chm/index.html > > > TJG > > Can't I do it in Boa constructor ??? I hav

Re: What makes an iterator an iterator?

2007-04-19 Thread Steve Holden
7stud wrote: > Hi, > > Thanks for the responses. > >> 7stud <[EMAIL PROTECTED]> wrote: >>> Can you explain some of the details of why this code fails: >> --- >> class Parrot(object): >> def __iter__(self): >> return self >> def __init__(self): >> self.next = self.next().ne

Re: Helpbook and CHM

2007-04-19 Thread Teja
On Apr 19, 4:33 pm, Ravi Teja <[EMAIL PROTECTED]> wrote: > On Apr 19, 3:58 am, Teja <[EMAIL PROTECTED]> wrote: > > > On Apr 19, 3:48 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > > > > Teja wrote: > > > > how to generate CHM files in Boa(Python)??? > > > >http://www.rutherfurd.net/software/rst2ch

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Steve Holden
Michael Bentley wrote: > On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote: > >> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: [...] The >>> learning curve is rather steep IMO, but worth it. >> Just a throw in remark, that you may ignore if you wish, but a steep >> learning curve mean

Re: About installing new Python version.

2007-04-19 Thread Steve Holden
king kikapu wrote: > On Apr 19, 12:10 pm, Ant <[EMAIL PROTECTED]> wrote: >>> checked and everything seems to working fine. But this is an update >>> release to 2.5, i do not know what is happening when, for example, a >>> totally new Python version come out, like 2.6 or 2.7 or... >> Again just inst

Re: About installing new Python version.

2007-04-19 Thread king kikapu
On Apr 19, 1:51 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Good question. kk is right - with a change in *major* version (such as > 2.4 to 3.5, 3.5 to 3.6) the compiled extensions will be incompatible, > and will need to be recompiled. This can take a while, as extension > authors frequently hav

Re: Future Python Gui?

2007-04-19 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: > However, that file is completely useless without instructions on how > to use it, and there are no instructions within the page or file. > > That is: > - exactly where does it get installed In your Python site-packages directory. > - what else needs to get installed

Re: Help Understanding mx.ODBC Error

2007-04-19 Thread Greg Corradini
Steve Holden wrote: > > Greg Corradini wrote: > [actually, her wrote it here but I moved it to the bottom] >> Steve Holden wrote: >>> Greg Corradini wrote: Hello All, A few weeks ago, I wrote two scripts using mx.ODBC on an Access DB. Among other things, both scripts create

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Antoon Pardon
On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote: > Michael Bentley wrote: >> On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote: >> >>> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: > [...] The learning curve is rather steep IMO, but worth it. >>> Just a throw in remark, that

Re: comparison with None

2007-04-19 Thread Steve Holden
Steven Howe wrote: > Alan Isaac wrote: [type comparison stuff] > I love scripting languages ... but sometimes an explicit evaluation that > one would find in > a compiled language is better. "better" in what sense? > Which is why I suggested using the explicit type(x) == types.NoneType as > opp

Re: Do other Python GUI toolkits require this?

2007-04-19 Thread Steve Holden
Antoon Pardon wrote: > On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote: >> Michael Bentley wrote: >>> On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote: >>> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: >> [...] The > learning curve is rather steep IMO, but worth it.

Re: tkinter canvas

2007-04-19 Thread Gigs_
[EMAIL PROTECTED] wrote: > On Apr 18, 3:43 pm, Gigs_ <[EMAIL PROTECTED]> wrote: >> how to write text on canvas. i know that i need to use canvas.create_text, >> but >> how to write text than when i create_text? >> or how to access object ID in canvas and change some options? >> >> thanks in advanc

Re: Python and XML?

2007-04-19 Thread Stefan Behnel
Hi, Leonard J. Reder wrote: > Stefan Behnel wrote: >> http://codespeak.net/lxml/objectify.html > > Looks like this stuff might do what I want. Need to work through the > example. > > Are you the author? Yup! :) > Why is this better then using gnossis? lxml is faster and supports more XML st

Re: Helpbook and CHM

2007-04-19 Thread Ravi Teja
> > > > Teja wrote: > > > > > how to generate CHM files in Boa(Python)??? > > > > >http://www.rutherfurd.net/software/rst2chm/index.html > > > > > TJG > > > > Can't I do it in Boa constructor ??? I have seen an option in Boa to > > > create a new helpbook and compile it to CHm and help files, B

RE: Do other Python GUI toolkits require this?

2007-04-19 Thread Sampson, David
I don't know how this whole things started, But it is funny on both sides. And hilarious from the outside. It sounds like university Banter really. And who can avoid getting their 2 cents in. Honestly And people say computers are all about science. You guys prove that we are all as much tech ge

Re: Question about Tkinter MenuOption variable

2007-04-19 Thread Scott David Daniels
Rob Wolfe wrote: > Chad wrote: >> ... I have a menu option(code is below) I would like to have >> corresponding values of 01, 02, 03 and so on > > What about using dictionary? For example: > OPTIONS = dict(Jan=1, Feb=2, Mar=3, Apr=4, May=5, June=6, July=7, >Aug=8, Se

Re: CGI Script using Python

2007-04-19 Thread Fuzzyman
On Apr 19, 11:34 am, "Ralf" <[EMAIL PROTECTED]> wrote: > Hello, > is there anybody who can help me. > I would like to use a Python Script to download Files from a Server to the > Client, to update the Client. > Downman is an example of a Python CGI which presents files for download. http://www.vo

Re: using tkinter to display html

2007-04-19 Thread kyosohma
On Apr 19, 6:29 am, "Stephen M. Gava" <[EMAIL PROTECTED]> wrote: > Hi all, > > I prefer using tkinter to wxpython (so sue me :) and i need to display a > lot of html in a particular app. does anyone know if one of the existing > add on tk html widgets have been wrapped for tkinter already? > > TIA

Re: comparison with None

2007-04-19 Thread Steven D'Aprano
On Thu, 19 Apr 2007 08:18:30 -0400, Steve Holden wrote: >> Which is why I suggested using the explicit type(x) == types.NoneType as >> opposed to >> x is None >> >> > This seems to go entirely against the spirit of the language. It's about > as sensible as writing > >(3 > 4) == True Ple

Re: comparison with None

2007-04-19 Thread Steven D'Aprano
On Wed, 18 Apr 2007 15:19:26 -0700, Steven Howe wrote: > I've read and found that 'None' comparisons is not always a good idea. You're probably thinking of testing against None with equality: if x == None: do_something() That can go wrong if x is a class that has an overly-broad concept of equa

Byte-Array to String

2007-04-19 Thread Robert Rawlins - Think Blue
Hello Guys, I have a byte array passed to me by dbus and I'm looking to convert it into a string? Is that possible? Sorry for seeming like a putts with these questions, I'm not used to all these complex data types :-D The byte array looks something like this when printed to screen. dbus

Re: Byte-Array to String

2007-04-19 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > I have a byte array passed to me by dbus and I'm looking to convert it into > a string? Is that possible? Sorry for seeming like a putts with these > questions, I'm not used to all these complex data types :-D > > dbus.Array([dbus.Byte(54), dbus.Byte(0), dbus.B

RE: Byte-Array to String

2007-04-19 Thread Robert Rawlins - Think Blue
Thanks for getting back to me on this Tim, *pauses pulling his hair out for a moment. I'm back on this damn API and its driving me crazy I get three options really for returning a service record from the API, they look like this. array{uint32} GetRemoteServiceHandles(string addres

Re: Byte-Array to String

2007-04-19 Thread Tim Golden
Robert Rawlins - Think Blue wrote: [... snip ...] > The first method, when I print its results just gives me > dbus.Array([dbus.UInt32(65547L)], signature=dbus.Signature('u')) the method > gives me that byte array and the third doesn't appear to work at all :-D > > Unfortunately nowhere seems to

Re: Calling private base methods

2007-04-19 Thread Isaac Rodriguez
> You appear to have led a very sheltered life if the only libraries you ever > use are ones where you can always get a change to the library api in a > timely manner. > The thing here is that we are not talking about my life. I may not have expressed my self correctly, but you are not understand

Re: tkinter canvas

2007-04-19 Thread kyosohma
On Apr 19, 7:24 am, Gigs_ <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Apr 18, 3:43 pm, Gigs_ <[EMAIL PROTECTED]> wrote: > >> how to write text on canvas. i know that i need to use canvas.create_text, > >> but > >> how to write text than when i create_text? > >> or how to access ob

python-list@python.org

2007-04-19 Thread Anton Vredegoor
Anton Vredegoor wrote: > [EMAIL PROTECTED] wrote: > >> Try it with >> >> def test(): >> L = 'a', 1, 2, 'a' >> it1, it2 = xsplitter(L, lambda x: x == 'a') >> print it1.next() >> print it2.next() >> print it1.next() >> print it2.next() >> >> >> The last print statement raises

Re: Byte-Array to String

2007-04-19 Thread Steven Howe
Robert Rawlins - Think Blue wrote: Hello Guys, I have a byte array passed to me by dbus and I'm looking to convert it into a string? Is that possible? Sorry for seeming like a putts with these questions, I'm not used to all these complex data types :-D The byte array looks something lik

Python un-plugging the Interpreter

2007-04-19 Thread S.Mohideen
Hi All, I was thinking about the feasbility of adjusting Python as a compiled language. Being said that I feel these are the following advantages of doing so -- 1) Using the powerful easy-to -use feature of Python programming language constructs. 2) Making the program to run at par wi

Re: comparison with None

2007-04-19 Thread Steven Howe
Steven D'Aprano wrote: On Thu, 19 Apr 2007 08:18:30 -0400, Steve Holden wrote: Which is why I suggested using the explicit type(x) == types.NoneType as opposed to x is None This seems to go entirely against the spirit of the language. It's about as sensible as writing (3 > 4)

Re: Python un-plugging the Interpreter

2007-04-19 Thread John Nagle
S.Mohideen wrote: > Hi All, > I was thinking about the feasbility of adjusting Python as a > compiled language. Being said that I feel these are the following > advantages of doing so -- > 1) Using the powerful easy-to -use feature of Python programming > language constructs. > 2) Making

python-list@python.org

2007-04-19 Thread Anton Vredegoor
Anton Vredegoor wrote: > Anton Vredegoor wrote: >> [EMAIL PROTECTED] wrote: >> >>> Try it with >>> >>> def test(): >>> L = 'a', 1, 2, 'a' >>> it1, it2 = xsplitter(L, lambda x: x == 'a') >>> print it1.next() >>> print it2.next() >>> print it1.next() >>> print it2.next() >>> >

Re: Iterate through a dictionary of lists one "line" at a time

2007-04-19 Thread Maric Michaud
wswilson a écrit : > Here is my code: > > listing = {'id': ['a', 'b', 'c'], 'name': ['Joe', 'Jane', 'Bob']} > > I need to output: > > id name > a Joe > b Jane > c Bob > > I could do: > > print 'id', 'name' > for id, name in zip(listing['id'], listing['name']): print id, name > > but that only

Re: Python COM iterator

2007-04-19 Thread Larry Bates
Carsten Haese wrote: >> [...] >>> On Tue, 2007-04-17 at 16:54 -0500, Larry Bates wrote: Does anyone know if there is a way to make a Python COM object act like a proper iterator in VB/Delphi? >> [...] > > After more googling, staring at win32com's code, and a fair bit of trial > and erro

PythonD 2.4.2 for older Windows / DOS / DJGPP

2007-04-19 Thread caddit
Hello. There has been some confusion as to the current version of the python programming language available for DOS. This is partially due to incorrect information kept on python.org, that says "python2.2.1 available for DOS". The actual version is currently 2.4.2. I am also happy to announce th

Re: comparison with None

2007-04-19 Thread Chris Mellon
On 4/19/07, Steven Howe <[EMAIL PROTECTED]> wrote: > > Steven D'Aprano wrote: > On Thu, 19 Apr 2007 08:18:30 -0400, Steve Holden wrote: > > > > > Which is why I suggested using the explicit type(x) == types.NoneType as > opposed to > x is None > > > > This seems to go entirely against the spiri

Re: Compiling python from soruce vs RPM ?

2007-04-19 Thread howa
On 4月19日, 下午5時49分, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 19 Apr, 04:39, howa <[EMAIL PROTECTED]> wrote: > > > > > One more question: > > > How to uninstall using the source package? > > > the source package doesn't come with `make uninstall`? > > Right. That's another pitfall of most source d

Re: Shebang or Hashbang for modules or not?

2007-04-19 Thread Jorgen Grahn
On Fri, 13 Apr 2007 22:46:03 +0200, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Jorgen Grahn a écrit : ... >> If you distribute a >> Python program to Unix users in that form, they may not want to know >> or care which language it's written in. Especially if you decide, a >> few releases late

Re: Python COM iterator

2007-04-19 Thread Steve Holden
Larry Bates wrote: > Carsten Haese wrote: [iterative acess to COM objects] > I tested in VB and by golly it works! What is odd is that this looks > NOTHING like what we got from the docs earlier. No GetEnumerator > method, no MoveNext method. I'm glad it works, but I'm a little > puzzled as to w

Relative import problem

2007-04-19 Thread Jorgen Bodde
Hi all, I want to structure my app so that I have two dirs like; obj/{object files} gui/{gui files} Here comes the catch. From the GUI dir, I would like to access the obj submodule path. I need to go one dir back.. I read there was something like from .. import x in python 2.5 so that I could a

Re: comparison with None

2007-04-19 Thread Alan Isaac
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Steven Howe wrote: > > Alan Isaac wrote: [type comparison stuff] > > I love scripting languages ... but sometimes an explicit evaluation that > > one would find in > > a compiled language is better. Actually all that lang

Re: comparison with None

2007-04-19 Thread Alan Isaac
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You shouldn't expect comparisons between types to > sort the same from one version of Python to another, although they may, > and in the future (Python 3) it is likely to become an error to compare > incomparable objec

Re: comparison with None

2007-04-19 Thread Steve Holden
Steven Howe wrote: > Steven D'Aprano wrote: >> On Thu, 19 Apr 2007 08:18:30 -0400, Steve Holden wrote: >> >> Which is why I suggested using the explicit type(x) == types.NoneType as opposed to x is None >>> This seems to go entirely against the spirit of the

RE: tkinter canvas

2007-04-19 Thread Gigs_
I want to when create text box with objid = self.canvas.create_text(x, y, width=event.x-x, text='') how can i bind KeyPress to objid? I want that text appear on canvas as i write it. dont know do I need to use self.canvas.create_window, and put in that window Tkinter Text widget. Or I can do it

Re: Python un-plugging the Interpreter

2007-04-19 Thread Steve Holden
John Nagle wrote: > S.Mohideen wrote: >> Hi All, >> I was thinking about the feasbility of adjusting Python as a >> compiled language. Being said that I feel these are the following >> advantages of doing so -- >> 1) Using the powerful easy-to -use feature of Python programming >> langua

Re: Using the Python interpreter

2007-04-19 Thread John Zenger
On Apr 18, 8:32 pm, [EMAIL PROTECTED] wrote: > Instead of starting IDLE as I normally do, I started the Python > interpreter and tried to run a program. I got a Python prompt (>>>), > and then tried unsuccessfully to run a Python script named Script1.py > that runs perfectly well in IDLE. Here's wh

Re: Python un-plugging the Interpreter

2007-04-19 Thread Michael Hoffman
S.Mohideen wrote: > I was thinking about the feasbility of adjusting Python as a > compiled language. In addition to the Python compilers listed by Steve, there is also Pyrex, which translates a Python-like language to C, and allows one to interact with it from Python with very little

Re: Relative import problem

2007-04-19 Thread kyosohma
On Apr 19, 11:54 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to structure my app so that I have two dirs like; > > obj/{object files} > > gui/{gui files} > > Here comes the catch. From the GUI dir, I would like to access the obj > submodule path. I need to go one dir back.. I

Re: Future Python Gui?

2007-04-19 Thread [EMAIL PROTECTED]
> It shouldn't change at all. I use Frame for Tkinter frames and > Tile.Frame for Tile frames, since a lot of the widgets have the same > names. Here's a sample: > > from Tkinter import * > import Tile Thanks for all the info. I'm a little confused about using both Tkinter and Tile at the same ti

Re: PythonD 2.4.2 for older Windows / DOS / DJGPP

2007-04-19 Thread Steve Holden
caddit wrote: > Hello. > > There has been some confusion as to the current version of the python > programming language available for DOS. > > This is partially due to incorrect information kept on python.org, that says > "python2.2.1 available for DOS". The actual version is currently 2.4.2. >

Re: Python Feature Request: Explicit variable declarations

2007-04-19 Thread Jorgen Grahn
On 14 Apr 2007 03:21:18 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > I would like to have something like the "option explicit" statement in > Visual Basic which turns on C-like checking for declaration of > variables. This is highly helpful for people who are coming from C/C+ > +, for

Re: Compiling python from soruce vs RPM ?

2007-04-19 Thread Paul Boddie
On 19 Apr, 18:40, howa <[EMAIL PROTECTED]> wrote: > > but i have the source package being installed...so any method/script > to remove them? > > since finally i want to install via RPM ... You could use checkinstall to make a package, install it (forcibly if necessary), then remove it. That might

Re: Future Python Gui?

2007-04-19 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: > What is the benefit of calling similar widgets for both modules within > the same code? Why wouldn't I call everything via Tile? (i.e. "from > Tile import *" and not import Tkinter at all) Because Tile depends on Tkinter, and also, not everything from Tkinter is in T

Re: Relative import problem

2007-04-19 Thread Martin
On Apr 19, 6:54 pm, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to structure my app so that I have two dirs like; > > obj/{object files} > > gui/{gui files} > > Here comes the catch. From the GUI dir, I would like to access the obj > submodule path. I need to go one dir back.. I

Re: Python COM iterator

2007-04-19 Thread Carsten Haese
On Thu, 2007-04-19 at 12:49 -0400, Steve Holden wrote: > Larry Bates wrote: > > Carsten Haese wrote: > [iterative acess to COM objects] > > I tested in VB and by golly it works! What is odd is that this looks > > NOTHING like what we got from the docs earlier. No GetEnumerator > > method, no Move

Creating search engine in Python Good or Bad [in performance]

2007-04-19 Thread Clement
I am now creating IR engine in python which has its own database implementation . For nearly 2GB files it works fast. Can i expect the same speed when my database goes large. Else i have to chose other language[c/c++] for the speed. Please tell me the solution...

Re: Binary file output using python

2007-04-19 Thread Nick Craig-Wood
Peter Otten <[EMAIL PROTECTED]> wrote: > Chi Yin Cheung wrote: > > > Is there a way in python to output binary files? I need to python to > > write out a stream of 5 million floating point numbers, separated by > > some separator, but it seems that all python supports natively is string > > infor

NFS Help

2007-04-19 Thread Clement
how to get the file from NFS share in python.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python COM iterator

2007-04-19 Thread Ross Ridge
Larry Bates wrote: > I tested in VB and by golly it works! What is odd is that this looks > NOTHING like what we got from the docs earlier. No GetEnumerator > method, no MoveNext method. I'm glad it works, but I'm a little > puzzled as to why it works. The documention Carsten Haese referenced e

Re: NFS Help

2007-04-19 Thread Larry Bates
Clement wrote: > how to get the file from NFS share in python.. > NFS share is mounted on your local directory, you get to it the same way you would any other file (e.g. go to the mount point and get the file). -Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating search engine in Python Good or Bad [in performance]

2007-04-19 Thread Larry Bates
Clement wrote: > I am now creating IR engine in python which has its own database > implementation . For nearly 2GB files it works fast. Can i expect the > same speed when my database goes large. Else i have to chose other > language[c/c++] for the speed. > Please tell me the solution..

Re: comparison with None

2007-04-19 Thread Bruno Desthuilliers
Steven Howe a écrit : (snip) > I've read and found that 'None' comparisons is not always a good idea. > Better to: > from types import NoneType > > x = None > if type( x ) == NoneType: ># true >< code > > else: ># false; do something else. >< more code > Actually, None is garantee

Re: Python COM iterator

2007-04-19 Thread Steve Holden
Ross Ridge wrote: > Larry Bates wrote: >> I tested in VB and by golly it works! What is odd is that this looks >> NOTHING like what we got from the docs earlier. No GetEnumerator >> method, no MoveNext method. I'm glad it works, but I'm a little >> puzzled as to why it works. > > The documentio

Re: comparison with None

2007-04-19 Thread Terry Reedy
| Alan Isaac wrote: | > "Terry Reedy" <[EMAIL PROTECTED]> wrote in message | > news:[EMAIL PROTECTED] | > | >> Should be in the reference manual section on comparisons. | > Only to this extent: | > http://www.python.org/doc/2.4/ref/comparisons.html | > | > objects of different types always

HTTP getreply() never returns

2007-04-19 Thread Marko . Cain . 23
Hi, I have the following code which send/receive HTTP request/response: # where sampleUrl is '127.0.0.1' and # url is 'www.cnn.com' h = httplib.HTTP(self.sampleUrl, 8080) h.putrequest('GET', '/sample?url=' + self.url) h.endheaders() errcode, errmsg, headers = h.

Re: NFS Help

2007-04-19 Thread Clement
On Apr 19, 11:44 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > Clement wrote: > > how to get the file from NFS share in python.. > > NFS share is mounted on your local directory, you get to it > the same way you would any other file (e.g. go to the mount > point and get the file). > > -Larry I

Re: NFS Help

2007-04-19 Thread Larry Bates
Clement wrote: > On Apr 19, 11:44 pm, Larry Bates <[EMAIL PROTECTED]> wrote: >> Clement wrote: >>> how to get the file from NFS share in python.. >> NFS share is mounted on your local directory, you get to it >> the same way you would any other file (e.g. go to the mount >> point and get the fi

python-list@python.org

2007-04-19 Thread attn . steven . kuo
On Apr 19, 9:13 am, Anton Vredegoor <[EMAIL PROTECTED]> wrote: (snipped) > > > How about this one? > > No that can result in an infinite loop after yet another > > print it1.next() > > This one however ... > > from collections import deque > > class sentinel(object): > pass > > class myiter

Re: Spawn/Exec with asterisk in argument

2007-04-19 Thread jeremyfee
On Apr 18, 7:24 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote: > If you want to process asterisk the way the shell does, you can pass > things through the shell. os.system is one way of doing that. Probably > better is: > > subprocess.check_call("ls -l *", shell=True) Thanks for the reply Michael

  1   2   >