Re: Fast text display?

2005-06-08 Thread Eric Brunel
On Thu, 09 Jun 2005 02:22:08 +0200, Riccardo Galli <[EMAIL PROTECTED]> wrote: > Using tkinter doesn't need downloading and installing only in Windows. > In *nix is not so common to have tcl/tk installed (and probably in Mac too) > > GUI cross platform need external support, in a OS or in another.

Re: Make Tkinter child window active

2005-06-08 Thread Svennglenn
It's working, thank you very much :) -- http://mail.python.org/mailman/listinfo/python-list

RE: identifying 64-bit Windows from 2.3.5?

2005-06-08 Thread Ivan Shevanski
From: Steven Knight <[EMAIL PROTECTED]> To: python-list@python.org Subject: identifying 64-bit Windows from 2.3.5? Date: Wed, 8 Jun 2005 23:51:15 -0400 (EDT) If I have installed 2.3.5 from the python.org Windows installer, can any one point me to a run-time way to identify whether I'm running o

Re: Saving/retrieving user preferences

2005-06-08 Thread Brian Wallis
(my last post seemed to not get out, sorry if you see it twice) This may be a FAQ,but I cannot find it. I want to save user preferences, window sizes, recently opened file names, etc for a python application and I am looking for a package that does this in a way that is portable across unix/lin

my golf game needs gui

2005-06-08 Thread Mike Hoy
hi i've been writing a golf game in text only. this was to work out some of details. it's great but making a golf course with ---'s and |||'s is kinda silly looking. (at least to some..) now i'm ready to begin shopping for a gui widget to work with python so my players can have some kind of pict

Re: Abstract and concrete syntax

2005-06-08 Thread George Sakkis
"Greg Ewing" wrote: > > More generally, I think there is no abstract distinction between > > statements and expressions. Everything is an expression, can be evaluated > > to a value. > > That's true in a functional language, but Python is not a > functional language. In imperative programming, of

Re: Writing func_closure?

2005-06-08 Thread Fernando Perez
Greg Ewing wrote: > As far as I know, there is currently no supported way > of directly creating or modifying cell objects from Python; > it can only be done by some obscure trickery. So the docs > are telling the truth here, in a way. :-) In a twisted, convoluted way :) But thanks for the clari

Re: Incorrect number of arguments

2005-06-08 Thread Steven D'Aprano
Steven D'Aprano wrote: > I worked around this problem by predicting what error message to expect > given N expected arguments and M supplied arguments. Yuck: this is a > messy, inelegant, ugly hack :-( Thank goodness that functions are first > class objects that support introspection :-) *eure

appending an array to a list in BOOST / Python

2005-06-08 Thread GujuBoy
i have an array in C++ (array[100]) and i want to append that to the list can i just say list1.append(array) without actually traversing through the entire array and appending... how can i do this in BOOST Python please help -- http://mail.python.org/mailman/listinfo/python-list

Incorrect number of arguments

2005-06-08 Thread Steven D'Aprano
I'm trying to keep an open mind, but I am perplexed about something in Python that strikes me as a poor design. py> def func(a,b): py> print a,b py> func(1) Traceback (most recent call last): File "", line 1, in ? TypeError: func() takes exactly 2 arguments (1 given) Why is the exception

Re: anygui,anydb, any opinions?

2005-06-08 Thread Renato Ramonda
Tim Roberts ha scritto: > Renato Ramonda <[EMAIL PROTECTED]> wrote: > >>wxWidgets apps look ALMOST native on windows (combobox and similar >>widgets are emulated, and look really bad), > > > That just isn't true. They use the standard combo box. Then it has changed recently. Mind that most s

Re: Make Tkinter child window active

2005-06-08 Thread Eugene Druker
Try: > > Label(c, text="Child window").grid() c.focus_set() > root = Tk() "Svennglenn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How do i make a child window "active" like the root window? > > from Tkinter import * > > def open_child(): > c = Toplevel(root) >

Re: poker card game revisited (code included)

2005-06-08 Thread Erik Max Francis
John Hazen wrote: > Interesting. I've been thinking about playing with this stuff too, but > hadn't considered masks. So each card has a representation: > > n bits for rank, then m bits for suit. > > 10 0001 = 2 clubs > 01 1000 = K spades > ... You can also deal with t

Re: help with sending mail in Program

2005-06-08 Thread Tim Roberts
Kent Johnson <[EMAIL PROTECTED]> wrote: >Ivan Shevanski wrote: >> Could someone send me a good tutorial for sending mail then? The one I >> found is not what I'm looking for. Also please dont send me the stmp >> definition cause i've looked at that enough. > >Here is a module I use to send mail

Re: Destructive Windows Script

2005-06-08 Thread Tim Roberts
Magnus Lycka <[EMAIL PROTECTED]> wrote: >rbt wrote: >> data = ['0', 'a', '1', 'b', '2', 'c',\ >> '3', 'd', '4', 'e', '5', 'f',\ >> '6', 'g', '7', 'h', '8', 'i',\ >> '9', 'j', '~', '!', '@', '#',\ >> '$', '%

Re: need some cgi help please

2005-06-08 Thread nephish
i fixed it. the program was going nuts because there were spaces in the name of the file. go figgure. anyway, i changed the way i format the timestamp that becomes the file name and removed the spaces. working all better now. thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Abstract and concrete syntax

2005-06-08 Thread Greg Ewing
David Baelde wrote: > Statements are not expressions. > > I feel there are some real problems here. But I can't find anything > absolutely unsolvable. There's no doubt that these problems could be solved in a technical sense, but the real issue is whether the resulting code would be *readable*.

Re: OO re-factoring (was Pythonese/Efficiency/Generalese critique [on Tutor])

2005-06-08 Thread Lee Cullens
Thanks for the comment Dan,Yes, that much I'm aware of.  I just thought I'd refactor my little utility in an OO approach as an exercise.  What I've learned so far is that my non-OO approach is in this situation very efficient, succinct and non-duplicative.  Except for avoiding multiple argument pas

RE: help

2005-06-08 Thread Ivan Shevanski
-Ivan >From: [EMAIL PROTECTED] >To: python-list@python.org >Subject: help >Date: Thu, 2 Jun 2005 11:11:41 EDT > >When i try to open IDLE(python GUI) it says that i have a socket error: >conection refused what do i do to fix this >-- Reinstall my friend. . .Reinstalling is the cure for eve

Re: Annoying behaviour of the != operator

2005-06-08 Thread Greg Ewing
Rocco Moretti wrote: > The main problem is that Python is trying to stick at least three > different concepts onto the same set of operators: equivalence (are > these two objects the same?), ordering (in a sorted list, which comes > first?), and mathematical "size". A possible compromise would

identifying 64-bit Windows from 2.3.5?

2005-06-08 Thread Steven Knight
If I have installed 2.3.5 from the python.org Windows installer, can any one point me to a run-time way to identify whether I'm running on a 32-bit vs. 64-bit version of Windows XP, given that Python itself was built on/for a 32-bit system? I hoped sys.getwindowsversion() was the answer, but it re

Re: Annoying behaviour of the != operator

2005-06-08 Thread Greg Ewing
Jordan Rastrick wrote: > Where are the 'number of situations' where __ne__ cannot be derived > from __eq__? Is it just the floating point one? I must admit, I've > missed any others. The floating point one is just an example, it's not meant to be the entire justification. Some others: * Numeric

Re: Annoying behaviour of the != operator

2005-06-08 Thread Greg Ewing
Jordan Rastrick wrote: > But I explicitly provided a method to test equality. Actually, no, you didn't. You provided a method to define the meaning of the operator spelled '==' when applied to your object. That's the level of abstraction at which Python's __xxx__ methods work. They don't make any

Re: __init__.py in packages

2005-06-08 Thread Greg Ewing
Gary Wilson Jr wrote: I would really like to see an example or situation that makes good use of the __init__.py file. I've attached a non-trivial example, from my PyGUI package. It uses some trickery to switch in one of a number of subdirectories of platform specific code, and then imports a bu

Python Challenge web site

2005-06-08 Thread Andy Leszczynski
Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit http://www.pythonchallenge.com/ anybody get to the level 30? :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: anygui,anydb, any opinions?

2005-06-08 Thread Tim Roberts
Renato Ramonda <[EMAIL PROTECTED]> wrote: > >wxWidgets apps look ALMOST native on windows (combobox and similar >widgets are emulated, and look really bad), That just isn't true. They use the standard combo box. >Last time I looked wx did not have spacers (vbox, hbox and the like)... >this lea

Re: file permissions on windows XP (home)

2005-06-08 Thread Ivan Van Laningham
Hi All-- [EMAIL PROTECTED] wrote: > > I have noticed a bug that if I have a folder open for viewing in > Windows Explorer with Thumbnail view enabled that I often run into > inexplicable problems with modify permissions, say when I want to > rename or delete an item. Changing the view to Detaile

Re: Embedding: many interpreters OR one interpreter with many thread states ?

2005-06-08 Thread Greg Ewing
[EMAIL PROTECTED] wrote: > - creating many sub-interpreters (Py_NewInterpreter) with a thread > state each > > Or > > - creating one interpreter with many thread states (PyThreadState_New) My understanding is that using multiple interpeters isn't really supported properly, despite there being a

Re: \r\n or \n notepad editor end line ???

2005-06-08 Thread Greg Ewing
Peter Hansen wrote: > (I don't believe there's a "wU" and conceptually it's sort > of meaningless anyway, If we ever get quantum computers, presumably "wU" will write the newlines in all possible formats simultaneously... -- Greg Ewing, Computer Science Dept, University of Canterbury, C

Re: circular import Module

2005-06-08 Thread Greg Ewing
Thomas Guettler wrote: > file1.py: > import file2 > > > file2.py: > # import file1 # Does not work! Actually, that *will* work as long as you don't try to use anything from file1 until it has finished being loaded. What won't work is file2.py: from file1 import somename because som

Re: Writing func_closure?

2005-06-08 Thread Greg Ewing
Fernando Perez wrote: > I can reuse the closure from a different > function, but the docs don't say how to make a valid closure tuple. This is > the typical problem of the stdlib docs, which under-specify what is supposed > to > go into a call and don't give at least a specific example. As far

Re: Walking through a mysql db

2005-06-08 Thread Ed Leafe
On Jun 4, 2005, at 9:24 AM, Jeff Elkins wrote: > I'm writing a small wxpython app to display and update a dataset. Have you looked at Dabo (URL is in my sig)? You can create an app to select, edit and update a MySQL database in about 30 seconds. It also wraps wxPython to make creating c

Re: OO re-factoring (was Pythonese/Efficiency/Generalese critique [on Tutor])

2005-06-08 Thread Greg Ewing
Dan Sommers wrote: > I don't remember the original post, but methods and recursion are *not* > mutually exclusive (e.g., an Integer class with a factorial method, or a > binary tree class whose nodes are also binary trees). Also, don't think that you have to make everything OO. OO isn't necessari

Re: Abstract and concrete syntax

2005-06-08 Thread John Roth
"David Baelde" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi, > > I tried python, and do like it. Easy to learn and read (at least for the > commonly used part), has a very large community so great doc and > contributions, and... the design is clean. I come from functional > p

Re: need some cgi help please

2005-06-08 Thread Greg Ewing
[EMAIL PROTECTED] wrote: > IOError: [Errno 2] No such file or directory: > '/var/www/stretch/web_root/SidCrops/tenderloin/Tue Jun 7 20:13:35 > 2005.txt' > args = (2, 'No such file or directory') The web server isn't running in a chrooted environment or anything, is it? Are there any other

Abstract and concrete syntax

2005-06-08 Thread David Baelde
Hi, I tried python, and do like it. Easy to learn and read (at least for the commonly used part), has a very large community so great doc and contributions, and... the design is clean. I come from functional programming languages, and I do like the proper static binding, the first class functions

Re: Decimal Places Incorrect

2005-06-08 Thread Dan Bishop
Tom Haddon wrote: > Hi Folks, > > When I run: > > print "%0.2f" % ((16160698368/1024/1024/1024),) > > I get 15.00 > > I should be getting 15.05. Can anyone tell me why I'm not? Because you forgot to use "from __future__ import division". -- http://mail.python.org/mailman/listinfo/python-list

Re: Fast text display?

2005-06-08 Thread Christopher Subich
Paul Rubin wrote: > We're just talking about a scrolling text window that has to run at > human reading and typing speeds, right? It shouldn't be a problem. > I've used the text widget and found it to be fast enough for what I > was doing, though I didn't exactly stress it. It should have bu

Re: Decimal Places Incorrect

2005-06-08 Thread Christopher Subich
Tom Haddon wrote: > Hi Folks, > > When I run: > > print "%0.2f" % ((16160698368/1024/1024/1024),) > > I get 15.00 > > I should be getting 15.05. Can anyone tell me why I'm not? Short answer: Integer division. Long answer: Integer division. 16160698368/1024 = 15781932L 15781932L/1024 =

Re: Fast text display?

2005-06-08 Thread Paul Rubin
Jp Calderone <[EMAIL PROTECTED]> writes: > What does "included with Python" mean anyway? Different packagers > make different decisions. I mean included with the source distro from python.org. > This applies to other libraries as well, of course. Installing > wxPython on Debian is a 5 second or

Re: Tabnanny?

2005-06-08 Thread John Roth
"Anna M." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank you so much > and so it goes . . . > > from random import randint > > def idxLargest(list, n): >idxMx = 0 > >for i in range(1, n, 1): > >if list[i] > list[idxMx]: >idxMx = i > >return idx

Re: refactoring, unit testing, ant, etc.

2005-06-08 Thread John Roth
"Dave Rose" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all > I've been learning Python for the past few months, reading tutorials and > postings here. I've bought the personal Komodo then downloaded Eclipse > with > Pydev. IDLE also is a staple of everyday use. > > ~1

Re: file permissions on windows XP (home)

2005-06-08 Thread gratzel
I have noticed a bug that if I have a folder open for viewing in Windows Explorer with Thumbnail view enabled that I often run into inexplicable problems with modify permissions, say when I want to rename or delete an item. Changing the view to Detailed or rebooting seems to make the issue go away

Re: Decimal Places Incorrect

2005-06-08 Thread Robert Kern
Tom Haddon wrote: > Hi Folks, > > When I run: > > print "%0.2f" % ((16160698368/1024/1024/1024),) > > I get 15.00 > > I should be getting 15.05. Can anyone tell me why I'm not? Integer division does not yield floats. http://docs.python.org/lib/typesnumeric.html -- Robert Kern [EMAIL PROTECT

Decimal Places Incorrect

2005-06-08 Thread Tom Haddon
Hi Folks, When I run: print "%0.2f" % ((16160698368/1024/1024/1024),) I get 15.00 I should be getting 15.05. Can anyone tell me why I'm not? Thanks, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: Fast text display?

2005-06-08 Thread Jp Calderone
On 08 Jun 2005 17:26:30 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: >Riccardo Galli <[EMAIL PROTECTED]> writes: >> Using tkinter doesn't need downloading and installing only in Windows. >> In *nix is not so common to have tcl/tk installed (and probably in Mac too) > >Hmm, in the Linu

Re: Fast text display?

2005-06-08 Thread Paul Rubin
Riccardo Galli <[EMAIL PROTECTED]> writes: > Using tkinter doesn't need downloading and installing only in Windows. > In *nix is not so common to have tcl/tk installed (and probably in Mac too) Hmm, in the Linux distros that I'm used to, tcl/tk is preinstalled. I had the impression that it was in

Re: Fast text display?

2005-06-08 Thread Riccardo Galli
On Wed, 08 Jun 2005 13:58:00 -0700, Paul Rubin wrote: > Christopher Subich <[EMAIL PROTECTED]> writes: >> > Use tkinter if you care about cross-platform operation. Everything >> > else requires downloading and installing separate toolkits. >> >> Oh, the downloading and installing isn't a big d

Re: Tabnanny?

2005-06-08 Thread Douglas Soares de Andrade
Hi Anna ! >     idx = idxLargest(data, len(data) In this line we have a missing ")", for me, this was the problem. Anyway, Check this line too: passes = len(max) + 1 It is giving me an error. See ya ! -- Douglas Soares de Andrade http://douglasandrade.cjb.net - dsa at unilestemg.br Uniles

Re: Fast text display?

2005-06-08 Thread Diez B. Roggisch
> > That looks quite good, except that Trolltech doesn't yet have a GPL-qt > for Win32. I might take another look at it whenever qt4 comes out, but > in the meantime (since I'm unfortunately developing on a win2k system) > it's not useful. Look at qt feee win edition, available here: http://

Software for System Builders, Resellers, and Hardware Purchasers Only.

2005-06-08 Thread Michael
GET latest softwares, 99% savings. http://djjnjs.b0fqeab48lt0qub.risalafe.com There is a fullness of all things, even of sleep and love. Be not ashamed of mistakes and thus make them crimes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a DOM element's children by type (STUPID)

2005-06-08 Thread Diez B. Roggisch
Tom Anderson wrote: > This strikes me as a rather common thing to want to do, but i can't see > a method for it; it seems i have to go through elem.childNodes myself, > fishing out the ones i want. Or rather, to write exactly the same > three-line helper function that millions of other people mu

Re: MoinMoin WikiName and python regexes

2005-06-08 Thread Paul Bredbury
Ara.T.Howard wrote: > i know nada about python so please forgive me if this is way off base. i'm > trying to fix a bug in MoinMoin whereby > > WordsWithTwoCapsInARowLike I don't think there is such a thing as the perfect "hyperlink vs just-text" convention. In MoinMoin, you can force a custom

RE: Tabnanny?

2005-06-08 Thread Anna M.
Thank you so much and so it goes . . . from random import randint def idxLargest(list, n): idxMx = 0 for i in range(1, n, 1): if list[i] > list[idxMx]: idxMx = i return idxMx def radixSort(data): sorting = [data] tmp = [] for i in range(10):

Re: Tabnanny?

2005-06-08 Thread Douglas Soares de Andrade
Hi Anna ! Please post your code, so we can take a look to see what is happening. See ya ! Em Quarta 08 Junho 2005 23:36, Anna M. escreveu: > Hello, i am very new to this. Only heard of python a week ago and have > never posted before anywhere. But I am trying to rewrite a program that I > made

Tabnanny?

2005-06-08 Thread Anna M.
Hello, i am very new to this.  Only heard of python a week ago and have never posted before anywhere.  But I am trying to rewrite a program that I made in C++ in Python, a radixSort I did as a school project.  I get a Tabnanny Tokenizing Error that says Token Error: EOF in multi-line statem

Saving/retrieving user preferences

2005-06-08 Thread Brian Wallis
This may be a FAQ,but I cannot find it. I want to save user preferences, window sizes, recently opened file names, etc for a python application and I am looking for a package that does this in a way that is portable across unix/linux and windows (and mac would be nice as well). Is there a 'stand

refactoring, unit testing, ant, etc.

2005-06-08 Thread Dave Rose
Hello all I've been learning Python for the past few months, reading tutorials and postings here. I've bought the personal Komodo then downloaded Eclipse with Pydev. IDLE also is a staple of everyday use. ~10 years ago, I had CS as a minor in college. I learned some C and modula-2 to nam

Getting a DOM element's children by type (STUPID)

2005-06-08 Thread Tom Anderson
Hi, If i get myself a DOM tree using xml.dom.minidom (or full-fat xml.dom, i don't mind), is there an easy way to ask a element for its child elements of a particular type? By 'type' i mean 'having a certain tag'. This strikes me as a rather common thing to want to do, but i can't see a method

Re: Annoying behaviour of the != operator

2005-06-08 Thread Steven D'Aprano
On Wed, 08 Jun 2005 11:01:27 -0700, Mahesh wrote: > No, why should Python assume that if you use != without supplying a > __ne__ that this is what you want? Without direction it will compare > the two objects which is the default behavior. Why should Python assume that != means "not is" instead o

Re: poker card game revisited (code included)

2005-06-08 Thread John Hazen
[Erik Max Francis] > > > Searching for straights and flushes is much better done by masks. Interesting. I've been thinking about playing with this stuff too, but hadn't considered masks. So each card has a representation: n bits for rank, then m bits for suit. 10 0001 = 2 clubs 010

Re: Help with SMTP

2005-06-08 Thread Mike Meyer
"Ivan Shevanski" <[EMAIL PROTECTED]> writes: > Ok, all my problems are solved except for one. . .If I want my program > to send a message back to me do I need the from adress? Because I > don't specifically know it for the person using the program. Any help > is appreciated =D You need a from ad

Re: Annoying behaviour of the != operator

2005-06-08 Thread Peter Hansen
Robert Kern wrote: > The problem arises that, in the presence of rich comparisons, (a == b) > is not always a boolean value, while (a is b) is always a boolean value. But that still doesn't mean that in a case where a == b (via __eq__) returns a non-boolean, __ne__ would not be defined as well.

Re: Fast text display?

2005-06-08 Thread Christopher Subich
Jp Calderone wrote: > If you like, you can check out the code: > > http://sourceforge.net/projects/originalgamer > > As MUD clients go, it's pretty weak, but it solves the text display > problem pretty decently. Oooh! Code! Thanks! After taking an extremely quick look, I think I might be kicki

Re: Annoying behaviour of the != operator

2005-06-08 Thread Peter Hansen
Christopher Subich wrote: > Perhaps the language should offer > the sensible default of (!=) == (not ==) if one of them but not the > other is overriden, but still allow overriding of both. I believe that's exactly what Jordan is promoting and, having been bitten in exactly the same way I would

Re: Annoying behaviour of the != operator

2005-06-08 Thread Dan Bishop
Mahesh wrote: > I understand that what makes perfect sense to me might not make perfect > sense to you but it seems a sane default. When you compare two objects, > what is that comparision based on? In the explicit is better than > implicit world, Python can only assume that you *really* do want to

Re: Fast text display?

2005-06-08 Thread Paul Rubin
Christopher Subich <[EMAIL PROTECTED]> writes: > Fair enough. At the moment, the expected user base for the program is > exactly one, but making it easy has its advantages. Since you've > obviously used it yourself, if I end up going with tkinter, are there > any performance gotchas on text rende

Re: Annoying behaviour of the != operator

2005-06-08 Thread John Roth
"Jordan Rastrick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Well, I'll admit I haven't ever used the Numeric module, but since > PEP207 was submitted and accepted, with Numeric as apparently one of > its main motivations, I'm going to assume that the pros and cons for > having

Re: pack heterogeneous data types

2005-06-08 Thread Jp Calderone
On 8 Jun 2005 14:49:00 -0700, [EMAIL PROTECTED] wrote: >Hello, > >How do i pack different data types into a struct or an array. Examples >would be helpful. > >Say i need to pack an unsigned char( 0xFF) and an long( 0x) >into a single array? The reason i need to do this is send a packet over

Re: pack heterogeneous data types

2005-06-08 Thread Christopher Subich
[EMAIL PROTECTED] wrote: > Hello, > > How do i pack different data types into a struct or an array. Examples > would be helpful. > > Say i need to pack an unsigned char( 0xFF) and an long( 0x) > into a single array? The reason i need to do this is send a packet over > a network. Look at

Re: Controlling source IP address within urllib2

2005-06-08 Thread Dan
John, Thanks again for your help! I think that the do_open function in AbstractHTTPHandler does not return the correct object type as required by the opener. When I include the code you recommended, the implementation comes back with the message, "urlopen error unknown url type: http". Strange, b

windows processes

2005-06-08 Thread Veronica Tomescu
I am using Trent's process.py but I have a problem with killing the processes in windows. For example : import process,time p=process.ProcessOpen('C:\Program Files\Windows Media Player\wmplayer')time.sleep(3)p.kill()   will start Media Player without terminating it. Any suggestions? Thanks in adva

killing process in windows

2005-06-08 Thread Veronica Tomescu
Hi,   I am using Trent's process.py but I have a problem with killing the processes in windows. For example :   import process,time   p=process.ProcessOpen('C:\Program Files\Windows Media Player\wmplayer')time.sleep(3)p.kill()   will start Media Player without terminating it. Any suggestions? Than

help

2005-06-08 Thread Baboon1234
When i try to open IDLE(python GUI) it says that i have a socket error: conection refused what do  i do to fix this -- http://mail.python.org/mailman/listinfo/python-list

pack heterogeneous data types

2005-06-08 Thread ashokbellur
Hello, How do i pack different data types into a struct or an array. Examples would be helpful. Say i need to pack an unsigned char( 0xFF) and an long( 0x) into a single array? The reason i need to do this is send a packet over a network. Thanks, -AB -- http://mail.python.org/mailman/l

Re: Fast text display?

2005-06-08 Thread Jp Calderone
On Wed, 08 Jun 2005 14:15:35 -0400, Christopher Subich <[EMAIL PROTECTED]> wrote: >As a hobby project, I'm writing a MUD client -- this scratches an itch, >and is also a good excuse to become familiar with the Python language. >I have a conceptual handle on most of the implementation, but the >big

Re: file permissions on windows XP (home)

2005-06-08 Thread barney
Thanks, I will go the win32security.SetFileSecurity route. It seems a pity that I can't use platform independant code to sort this out but I guess you're saying that I've managed to get my files into a non standard state that needs non standard code to sort it out. I wonder how winamp/itunes manage

Re: Annoying behaviour of the != operator

2005-06-08 Thread Mahesh
I understand that what makes perfect sense to me might not make perfect sense to you but it seems a sane default. When you compare two objects, what is that comparision based on? In the explicit is better than implicit world, Python can only assume that you *really* do want to compare objects unles

Re: Fast text display?

2005-06-08 Thread Andrew Dalke
Christopher Subich wrote: > You're off by a decimal, though, an 80-column line > at 20ms is 4kbytes/sec. D'oh! Yeah, I did hundredths of a second instead of thousands. > My guess is that any faster throughput than > 10kbytes/sec is getting amusing for a mud, which in theory intends for > most

Re: Annoying behaviour of the != operator

2005-06-08 Thread Robert Kern
Jordan Rastrick wrote: > Mahesh raised the argument some posts back that Python should not 'just > guess' what you want. But the problem is, it *already does* - it > guesses you want object identity comparison if you haven't written > __ne__. But if __ne__ is not provided, than the negation of >

Re: anygui,anydb, any opinions?

2005-06-08 Thread Renato Ramonda
Thomas Bartkus ha scritto: > The attractiveness of wxPython here is that it extends the platform > neutrality of Python to GUI interfaces. On a Windows platform, the work > looks like any other Windows program. On Gnome/Linux, the identical code > fits right into the Gnome desktop scheme. *Big*

Re: Fast text display?

2005-06-08 Thread Christopher Subich
Paul Rubin wrote: > No, it's a big pain. I'm a big boy and gave up on trying to install > wxpython for bittorrent on FC3 (the problem was with wxwidgets needing > an obsolete version of gtk, not with wxpython itself). There's just > no compelling reason to want to deal with this stuff. Tkinter

Re: Annoying behaviour of the != operator

2005-06-08 Thread Jordan Rastrick
I'm a Maths and Philosophy undergraduate first and foremost, with Computer Science as a tacked on third; I've studied a fair bit of logic both informally and formally, and am familiar with things such as the non-nessecity of the law of the excluded middle in an arbitrary propositional calculus farm

Re: Fast text display?

2005-06-08 Thread Paul Rubin
Christopher Subich <[EMAIL PROTECTED]> writes: > > Use tkinter if you care about cross-platform operation. Everything > > else requires downloading and installing separate toolkits. > > Oh, the downloading and installing isn't a big deal. If in the > far-flung future anyone else uses this prog

Re: Annoying behaviour of the != operator

2005-06-08 Thread Christopher Subich
Peter Hansen wrote: > I can see only one comment that seems to describe that situation, where it refers to "IEEE 754 floating point numbers do not satisfy [== being the complement of !=]". > > (Though that may be justification enough for the feature...) To my naive eye, that possibility see

Re: Fast text display?

2005-06-08 Thread Christopher Subich
Paul Rubin wrote: > Use tkinter if you care about cross-platform operation. Everything > else requires downloading and installing separate toolkits. Oh, the downloading and installing isn't a big deal. If in the far-flung future anyone else uses this program, they'll be big boys who can ins

Re: Fast text display?

2005-06-08 Thread Christopher Subich
Andrew Dalke wrote: > Christopher Subich wrote: > >> My first requirement is raw speed; none of what I'm doing is processing-intensive, so Python itself shouldn't be a problem here. > > > > There's raw speed and then there's raw speed. Do you want to > display, say, a megacharacter/secon

Re: running distutils installer without admin on windows

2005-06-08 Thread Thomas Heller
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I didn't build the installer, someone else did. I did get the source > and installed cygwin to see if I could recreate it; at least build the > library, but when I tried to do a build_ext I got a message saying I > needed to have the .NET SDK insta

Re: separate IE instances?

2005-06-08 Thread erinhouston
Here is quick and dirty example of what jc talked about. import win32api from win32com.client import Dispatch a = win32api.ShellExecute(0,None,"iexplore.exe",None,None,1) internetExplorerClassIdentity='{9BA05972-F6A8-11CF-A442-00A0C90A8F39}' hwnds = Dispatch(internetExplorerClassIdentity) ieObj =

Re: Annoying behaviour of the != operator

2005-06-08 Thread Rocco Moretti
Matt Warden wrote: > Jordan, > > On 8 Jun 2005 11:44:43 -0700, Jordan Rastrick > <[EMAIL PROTECTED]> wrote: > >>But I explicitly provided a method to test equality. And look at the >>plain english meaning of the term "Not equals" I think its pretty >>reasonable > > > Indeed. Furthermore, it see

Re: Annoying behaviour of the != operator

2005-06-08 Thread Kay Schluehr
Jordan Rastrick wrote: > Just because a behaviour is documented, doesn't mean its not counter > intutitive, potentially confusing, and unnessecary. > > I have spent a fair amount of time reading the Python docs. I have not > yet memorised them. I may have read this particular section of the > ref

Re: __init__.py in packages

2005-06-08 Thread Jarek Zgoda
Gary Wilson Jr napisał(a): > What is intended use for __init__.py files? > Well, I found this: http://www.python.org/doc/essays/packages.html >>From what I can gather it is for initialization of the package when doing an > import, but I would really like to see an example or situation that makes g

Re: MoinMoin WikiName and python regexes

2005-06-08 Thread Ara.T.Howard
On Wed, 8 Jun 2005, Terry Reedy wrote: > > "Ara.T.Howard" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> i'm trying to fix a bug in MoinMoin whereby > > A 'bug' is a discrepancy between promise (specification) and perfomance > (implementation). Have you really found such -- does

Re: Annoying behaviour of the != operator

2005-06-08 Thread Jordan Rastrick
Well, I'll admit I haven't ever used the Numeric module, but since PEP207 was submitted and accepted, with Numeric as apparently one of its main motivations, I'm going to assume that the pros and cons for having == and ilk return things other than True or False have already been discussed at length

Re: different time tuple format

2005-06-08 Thread [EMAIL PROTECTED]
It is probably the best to calculate back to UTC. Assume "2005-06-07 15:07:12" the local time, then convert it as follows to UTC. Use the UTC time to store/manipulate/whatever you want to do. import time t = time.mktime(time.strptime("2005-06-07 15:07:12", "%Y-%m-%d %H:%M:%S")) print time.ctime

Re: Annoying behaviour of the != operator

2005-06-08 Thread George Sakkis
"Jordan Rastrick" wrote: > I'd suggest the only nessecary change is, if objects a,b both define > __eq__ and not __ne__, then a != b should return not (a == b) > > If a class defines __ne__ but not __eq__, well that seems pretty > perverse to me. I don't especially care one way or another how that

Re: Fast text display?

2005-06-08 Thread Paul Rubin
Christopher Subich <[EMAIL PROTECTED]> writes: > The third requirement is cross-platform-osity; if you won't hold it > against me I'll tell you that I'm developing under Cygwin in Win2k, > but I'd really like it if the app could run under 'nix and mac-osx > also. > > I'm pretty open to any graphic

Re: Fast text display?

2005-06-08 Thread Andrew Dalke
Christopher Subich wrote: > My first requirement is raw speed; none of what I'm doing is > processing-intensive, so Python itself shouldn't be a problem here. There's raw speed and then there's raw speed. Do you want to display, say, a megacharacter/second? > it's highly desirable to have very

Re: Annoying behaviour of the != operator

2005-06-08 Thread Robert Kern
Jordan Rastrick wrote: > Are there any other reasonable examples people can give where it makes > sense for != and == not to be each other's complement? __eq__ and __ne__ implement *rich* comparisons. They don't have to return only True or False. In [1]:import Numeric In [2]:a = Numeric.array(

Re: Annoying behaviour of the != operator

2005-06-08 Thread Matt Warden
Jordan, On 8 Jun 2005 11:44:43 -0700, Jordan Rastrick <[EMAIL PROTECTED]> wrote: > But I explicitly provided a method to test equality. And look at the > plain english meaning of the term "Not equals" I think its pretty > reasonable Indeed. Furthermore, it seems quite silly that these would be di

  1   2   >