Re: How to avoid using files to store intermediate results

2006-04-26 Thread Peter Otten
André wrote: > Now, I want to be able to test the code using the doctest module. > > I can't use exec as doctest.testmod() will be testing my entire > application, not simply the code in the input window! > While this works, I find it "messy", as it creates some intermediate > files.  I was wond

Re: Introspection Class/Instance Name

2006-04-26 Thread [EMAIL PROTECTED]
What about: py> class A: py. def __init__(self): py. print self.__class__.__name__ py. print str(self) py. def __str__(self): py. return 'instance of %s' % self.__class__.__name__ py. py> a = A() A instance of A py> -- http://mail.python.org/mailman/l

Re: OOP / language design question

2006-04-26 Thread Duncan Booth
Alex Martelli wrote: >> What I think I'm trying to get at is that I believe that most >> situations where someone actually tries to do something in the base >> initialiser which requires calling a virtual method are probably also >> cases where the initialiser is doing too much: i.e. separating th

Re: Zope 3

2006-04-26 Thread Fredrik Lundh
Derick van Niekerk wrote: > Anyway - If some of you can give me a little insight to what you use to > develop on the web using Python, I'd appreciate it. I've heard good > things about cherrypy, django, mod_python, zope, etc., etc. There is > just so little time - I'd gladly sacrifice a little pow

Re: Introspection Class/Instance Name

2006-04-26 Thread Duncan Booth
*binarystar* wrote: > class Bollocks: > > def __init__( self ): > > print self.__method_that_returns_class_name__() > print self.__method_that_returns_instance_name__() > > > instance_of_bollocks = Bollocks() > > # Which outputs > > 'Bollocks' > 'i

Nested Lists Assignment Problem

2006-04-26 Thread Licheng Fang
I wanna use nested lists as an array, but here's the problem: >>> a = [[0]*3]*3 >>> a [[0, 0, 0], [0, 0, 0], [0, 0, 0]] >>> a[0][0] = 1 >>> a [[1, 0, 0], [1, 0, 0], [1, 0, 0]] Could anybody please explain to me why three values were change? I'm bewildered. Thanks! -- http://mail.python.org/mail

Re: Nested Lists Assignment Problem

2006-04-26 Thread tiksin
Le Mercredi 26 Avril 2006 10:13, Licheng Fang a écrit : > I wanna use nested lists as an array, but here's the problem: > >>> a = [[0]*3]*3 > >>> a > > [[0, 0, 0], [0, 0, 0], [0, 0, 0]] > > >>> a[0][0] = 1 > >>> a > > [[1, 0, 0], [1, 0, 0], [1, 0, 0]] > > Could anybody please explain to me why thre

Re: Nested Lists Assignment Problem

2006-04-26 Thread Licheng Fang
Dennis Lee Bieber wrote: > On 26 Apr 2006 01:13:20 -0700, "Licheng Fang" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > > Could anybody please explain to me why three values were change? I'm > > bewildered. Thanks! > > http://www.aifb.uni-karlsruhe.de/Lehrangebot/Winte

Type-Def-ing Python

2006-04-26 Thread brianlum
Dear Python Community, I have been trying to research how to type-def python. I want to type-def python so that I can use it as a static analyzer to check for bugs. I have been going over research on this field and I came upon Brett Cannon's thesis in which he tweaks the compiler and shows that

Re: Type-Def-ing Python

2006-04-26 Thread [EMAIL PROTECTED]
If you are interested in static analysis for bug hunting purposes, then you might want to have a look at Pylint. Cheers, Aurélien. -- http://mail.python.org/mailman/listinfo/python-list

Python UPnP on Linux?

2006-04-26 Thread Paul Sijben
I am writing some client software that needs to accept connections from the Internet. So I am looking for a UPnP implementation for a client of an Internet gateway so I can request the NAT binding. Googling on this I have found win32 implementations and Twisted implementations yet I am looking for

Re: Coming from delphi - looking for an IDE - willing to spend money

2006-04-26 Thread Petr Jakes
Eric3 is great IMHO. http://www.die-offenbachs.de/detlev/eric3.html -- http://mail.python.org/mailman/listinfo/python-list

logging problem

2006-04-26 Thread Shine Anne
  HI All,  I am having an app that needs to display a lot of msgs. These msgs need to kept ina log. I have written it as : D EBUG =1 if DEBUG:     import logging    logging.basicConfig(level=logging.DEBUG,    format='%(asctime)s %(levelname)s %(message)s',    filena

Re: Passing Exceptions Across Threads

2006-04-26 Thread [EMAIL PROTECTED]
have you tried replacing : main = threading._MainThread() with main = threading.currentThread() ? (not sure if that will be sufficient) Well your way to pass exception between threads looks like I would have done myself. But I am no expert. Have you considered using stackless Python ? It pro

Re: OOP / language design question

2006-04-26 Thread bruno at modulix
Duncan Booth wrote: > Alex Martelli wrote: > > >>>What I think I'm trying to get at is that I believe that most >>>situations where someone actually tries to do something in the base >>>initialiser which requires calling a virtual method are probably also >>>cases where the initialiser is doing t

Re: OOP / language design question

2006-04-26 Thread Carl Banks
Duncan Booth wrote: > Alex Martelli wrote: > > >> What I think I'm trying to get at is that I believe that most > >> situations where someone actually tries to do something in the base > >> initialiser which requires calling a virtual method are probably also > >> cases where the initialiser is do

KeybordInterrupts and friends

2006-04-26 Thread [EMAIL PROTECTED]
Hello, I have a problem with the following code fragment : import sys while True: try: raw_input() except EOFError: print "C-d" except KeyboardInterrupt: print "C-c" The following behaviour seems bogus to me : [EMAIL

Re: Counting elements in a list wildcard

2006-04-26 Thread Iain King
Edward Elliott wrote: > John Machin wrote: > > On 25/04/2006 6:26 PM, Iain King wrote: > >> iain = re.compile("(Ia(i)?n|Eoin)") > >> steven = re.compile("Ste(v|ph|f)(e|a)n") > > > > IMHO, the amount of hand-crafting that goes into a *general-purpose* > > phonetic matching algorithm is already bord

Re: OOP / language design question

2006-04-26 Thread Duncan Booth
bruno at modulix wrote: > It's *already* split : __new__ construct the object, __init__ > initialize it. > >> That's why I would go for the 2-phase construction: > > But that's already what you have. Very good point. >> after the first phase >> you have an object which is fully initialised,

Re: MS VC++ Toolkit 2003, where?

2006-04-26 Thread Brian Elmegaard
Robert Kern <[EMAIL PROTECTED]> writes: > Martin v. Löwis wrote: >> Robert Kern wrote: >> >>>Oh, that's right, you need an import library for Python24.dll . >> >> That shouldn't be a problem: that library is included with Python. > > For mingw, too? I.e. a .a not a .lib? It is possible to load

Re: Drawing charts and graphs.

2006-04-26 Thread tooper
I'm quite satisfied with MatPlotLib for scientific plotting. ReportLab has also a very good package for high quality PDF production incl. graphics. For more interactive, Grace plotter has a good Graceplot.py python front-end. -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested Lists Assignment Problem

2006-04-26 Thread Fredrik Lundh
"Licheng Fang" wrote: >I wanna use nested lists as an array, but here's the problem: > a = [[0]*3]*3 a > [[0, 0, 0], [0, 0, 0], [0, 0, 0]] a[0][0] = 1 a > [[1, 0, 0], [1, 0, 0], [1, 0, 0]] > > Could anybody please explain to me why three values were change? I'm > bewildered. Th

Re: Nested Lists Assignment Problem

2006-04-26 Thread Fredrik Lundh
"Licheng Fang" wrote: > But I still wonder why a nested assignment "a = [[0]*3]*3" generates 3 > references to the same list, while the commands below apparently do > not. that's because they're replacing a list item, rather than modifying it. a = [0] * 2 a > [0, 0] <- now you have two

Re: OOP / language design question

2006-04-26 Thread bruno at modulix
Duncan Booth wrote: > bruno at modulix wrote: > > >>It's *already* split : __new__ construct the object, __init__ >>initialize it. >> >>>That's why I would go for the 2-phase construction: >> >>But that's already what you have. > > Very good point. > > >>>after the first phase >>>you have an

Re: how to save python interpreter's command history

2006-04-26 Thread Patrick Bothe
If you're using an operating system supporting the readline utility try: http://www.python.org/doc/current/tut/node15.html I am using a slightly modified version of the given example. The last time I checked the size of my history file it had 4k+ entries. Regards, Patrick -- 2 does no

not quite 1252

2006-04-26 Thread Anton Vredegoor
I'm trying to import text from an open office document (save as .sxw and read the data from content.xml inside the sxw-archive using elementtree and such tools). The encoding that gives me the least problems seems to be cp1252, however it's not completely perfect because there are still chara

Re: The whitespaceless frontend

2006-04-26 Thread Sion Arrowsmith
Edward Elliott <[EMAIL PROTECTED]> wrote: >If compactness is all you want, shorten self to s. Personally I like 'me' >as it's both shorter and more vernacular: > >def do_GET (me): >me.send_response (200, "ok") Absolutely. I've written quite a lot of code (which I wasn't expecting anyone else

Re: KeybordInterrupts and friends

2006-04-26 Thread robert
[EMAIL PROTECTED] wrote: > Hello, > > I have a problem with the following code fragment : > > > import sys > > while True: > try: > raw_input() > except EOFError: > print "C-d" > except KeyboardInterrupt: > print "C-c" > --

Re: Passing Exceptions Across Threads

2006-04-26 Thread robert
Adam Mullins wrote: > Hello, I'm writing a physics simulator back-end with a built-in, > threaded server that for the moment is quite simple. I've faced a few > problems in writing this code, however, as it's the first time I've > played with threading. For the moment, everything works decently, b

Re: I have problems with creating the classic game Wumpus. the file: http://esnips.c

2006-04-26 Thread conny . ledin
I have sent it to you now. Thanks for looking at it. -- http://mail.python.org/mailman/listinfo/python-list

Re: I have problems with creating the classic game Wumpus. the file: http://esnips.c

2006-04-26 Thread conny . ledin
i just mailed it to you. Thanks for looking at it. -- http://mail.python.org/mailman/listinfo/python-list

Re: help finding

2006-04-26 Thread robert
Gary Wessle wrote: > Hi > > I am going through some tutorials, how do I find out about running a > script from the python prompt? > is there a online ref and how to access it? > if you really don't want to start from OS prompt do execfile('myscript.py') -robert -- http://mail.python.org/mailm

win32com short path name on 2k

2006-04-26 Thread bytecolor
Hi people, Using win32com on 2k SP3... >>> import win32com.client as w32c >>> fc = w32c.Dispatch('Featurecam.Application') >>> fc.InstallPath u'C:\\PROGRA~1\\FEATUR~1' >>> Using win32com on XP Professional SP2... >>> import win32com.client as w32c >>> fc = w32c.Dispatch('Featurecam.Application')

Re: win32com short path name on 2k

2006-04-26 Thread Thomas Heller
bytecolor wrote: > Hi people, > > Using win32com on 2k SP3... import win32com.client as w32c fc = w32c.Dispatch('Featurecam.Application') fc.InstallPath > u'C:\\PROGRA~1\\FEATUR~1' > > Using win32com on XP Professional SP2... import win32com.client as w32c fc = w32c.Dispa

Re: KeybordInterrupts and friends

2006-04-26 Thread [EMAIL PROTECTED]
Thanks Robert. But I'm not trying something at all with this, only asking if it is a bug (and it looks like one). I suspect too, that it is related to signal handling. Cheers, Aurélien. -- http://mail.python.org/mailman/listinfo/python-list

wxpython warnings

2006-04-26 Thread Iain King
I have a wxpython program that displays TIF images. Sometimes it will encounter a tag the tiff loader cant handle. Rather than silently ignoring it, it pops up a window: Python Warning unknown field with tag blah blah I don't want it to do this, but I can't work out how to turn it off. Anyone k

Re: Introspection Class/Instance Name

2006-04-26 Thread robert
*binarystar* wrote: > Hello there, > > what method would you use to return the name of the class and/or > instance introspectively eg. > > class Bollocks: > > def __init__( self ): > > print self.__method_that_returns_class_name__() > print self.__method_that_ret

Re: not quite 1252

2006-04-26 Thread Fredrik Lundh
Anton Vredegoor wrote: > I'm trying to import text from an open office document (save as .sxw and > read the data from content.xml inside the sxw-archive using > elementtree and such tools). > > The encoding that gives me the least problems seems to be cp1252, > however it's not completely perfec

Re: KeybordInterrupts and friends

2006-04-26 Thread robert
[EMAIL PROTECTED] wrote: > Thanks Robert. > > But I'm not trying something at all with this, only asking if it is a > bug (and it looks like one). I suspect too, that it is related to > signal handling. > > Cheers, > Aurélien. you not protected all the time during the loop -robert -- http://m

Re: Building a Dynamic Library (libpython.so) for Python 2.4.3 Final

2006-04-26 Thread Andrew MacIntyre
Dean wrote: > I've been trying to make python a dynamic library. I downloaded Python > 2.4.3 Final from the Python web site and I cannot get it to create the > library. > > I've tried using the directive: > > --enable-shared > > and > > --enable-shared=yes > > and both of them had the same e

Inherit from array

2006-04-26 Thread TG
Hi there. I'm trying to create a simple class called Vector which inherit from array. class Vector(array): def __init__(self,length): """initialize a vector of random floats of size length. floats are in interval [0;1]""" array.__init__(self,'f') for _ in xrange(length

pyumlgraph for multiple files.

2006-04-26 Thread Deepan Chakravarthy
Hello, I had used pyumlgraph to generate dot files for single python script. Is it possible to use pyumlgraph to generate dot files for multiple python scripts ??? Or is it automatically done if i generate a dot file for the final python script that imports all other files? Thanks Deepan Chakra

Importing modules through directory shortcuts on Windows

2006-04-26 Thread Brian Quinlan
Recently, I became responsible for maintaining some Python code, which was organized as follows: user/pylib ui ... project2/pylib ui ... project3/pylib ui ... python-packages/user => /user/pylib project2 => /project2/pylib

scipy and py2exe

2006-04-26 Thread [EMAIL PROTECTED]
I am trying to package my application with py2exe. Unfortunately it uses both scipy/numpy and numarray so I'm having to jump through a lot of hoops to get it going. I'm getting problems packaging an app that uses only scipy. See below. Thanks! Janto ===setup.py=== from distutils.core import setup

Re: Inherit from array

2006-04-26 Thread bruno at modulix
TG wrote: > Hi there. > > I'm trying to create a simple class called Vector which inherit from > array. Which array ? [EMAIL PROTECTED] ~ $ python Python 2.4.2 (#1, Feb 9 2006, 02:40:32) [GCC 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)] on linux2 Type "help", "copyright", "credits" or "licen

Re: Importing modules through directory shortcuts on Windows

2006-04-26 Thread Thomas Heller
Brian Quinlan wrote: > Recently, I became responsible for maintaining some Python code, which > was organized as follows: > > user/pylib > ui > ... > project2/pylib > ui > ... > project3/pylib > ui > ... > python-packages/user => /user/pylib >

Re: MinGW and Python

2006-04-26 Thread Neal Becker
Alex Martelli wrote: > sturlamolden <[EMAIL PROTECTED]> wrote: > >> Robert Kern wrote: >> >> > Dunno. Depends on the machine. Depends on the program. Depends on how >> > the interpreter and any extension modules and underlying libraries were >> > built. Depends on which Linux and which Windows.

Re: wxpython warnings

2006-04-26 Thread Philippe Martin
I had a similar but simple problem (the file was missing) and had to check by hand before calling wxPython. Can you check the tag by hand before calling wxPython ? Philippe Iain King wrote: > I have a wxpython program that displays TIF images. Sometimes it will > encounter a tag the tiff l

Re: Inherit from array

2006-04-26 Thread TG
from array import array class Vector(array): def __init__(self,size): print "pouet" array.__init__('f') print "pouet" v = Vector('c') print repr(v) will output : pouet pouet array('c') -- http://mail.python.org/mailman/listinfo/python-list

Re: Inherit from array

2006-04-26 Thread Philippe Martin
I think he did from array import * Philippe bruno at modulix wrote: > TG wrote: >> Hi there. >> >> I'm trying to create a simple class called Vector which inherit from >> array. > > Which array ? > > [EMAIL PROTECTED] ~ $ python > Python 2.4.2 (#1, Feb 9 2006, 02:40:32) > [GCC 3.4.5 (Ge

Re: MinGW and Python

2006-04-26 Thread Fredrik Lundh
Neal Becker wrote: >> What I did just post on another thread over the last couple of days is >> about MacOSX, which also uses gcc: 14% faster pybench using Python 2.4.3 >> under Win2000 under Parallels Workstation beta, compared to 2.4.3 >> Universal directly on MacOSX -- the standard build of 2.4

blob problems in pysqlite

2006-04-26 Thread aldonnelley
Hi there. I'm a long-time lurker and (I think) first time poster. Only relatively new to python, and I'm trying to get pysqlite to work with binary data, and having a tough time of it. I want to set up a table with: - a URL, - some filenames related to that URL, - and some simple generated HTML.

Re: MinGW and Python

2006-04-26 Thread Fredrik Lundh
Neal Becker wrote: >> What I did just post on another thread over the last couple of days is >> about MacOSX, which also uses gcc: 14% faster pybench using Python 2.4.3 >> under Win2000 under Parallels Workstation beta, compared to 2.4.3 >> Universal directly on MacOSX -- the standard build of 2.4

Re: wxpython warnings

2006-04-26 Thread Michele Petrazzo
Philippe Martin wrote: > I had a similar but simple problem (the file was missing) and had to > check by hand before calling wxPython. > > Can you check the tag by hand before calling wxPython ? > > > Philippe > > Hi, also I have the same problem with g3/g4 images. My solution was convert tha

Re: Inherit from array

2006-04-26 Thread TG
Obviously, there is something I didn't catch in python's inheritance. from array import array class Vector(array): def __init__(self,size): print self.typecode array.__init__(self,'f') >>> v = Vector('c') c Here, it says the typecode is 'c' - I thought such an information was

Re: blob problems in pysqlite

2006-04-26 Thread Gerhard Häring
[EMAIL PROTECTED] wrote: > Hi there. > > I'm a long-time lurker and (I think) first time poster. > Only relatively new to python, and I'm trying to get pysqlite to work > with binary data, and having a tough time of it. [...] It seems to me that you're using pysqlite correctly. Where exactly is

A defense for bracket-less code

2006-04-26 Thread Don Taylor
Found in a style guide (http://www.artlogic.com/careers/styleguide.html) --- Another case where "unnecessary" braces should be used is when writing an empty while loop: while (*p++ = *q++) { // this loop intentionally left em

Re: I have problems with creating the classic game Wumpus. the file: http://esnips.c

2006-04-26 Thread Ben Sizer
connyledin wrote: > Im trying to create a version of the game Wumpus. Mine is called > Belzebub. But im STUCK! And its due tuesday 2 maj. Im panicing! Can > some one help me?? > here is the file: > http://esnips.com/webfolder/b71bfe95-d363-4dd3-bfad-3a9e36d0 > > What i have the biggest problems

Re: Importing modules through directory shortcuts on Windows

2006-04-26 Thread Duncan Booth
Brian Quinlan wrote: > Anyway, the problem is that Windows does not have a symlink facility to > accommodate this (AFAIK) and the Python import mechanism does not > resolve shortcuts. Windows does have the equivalent of symlinks provided you are running on NTFS with Windows 2000 or later (Goog

RE: blob problems in pysqlite

2006-04-26 Thread Tim Golden
[EMAIL PROTECTED] | I'm a long-time lurker and (I think) first time poster. | Only relatively new to python, and I'm trying to get pysqlite to work | with binary data, and having a tough time of it. | I want to set up a table with: | - a URL, | - some filenames related to that URL, | - and some si

Re: Python UPnP on Linux?

2006-04-26 Thread Sybren Stuvel
Paul Sijben enlightened us with: > Googling on this I have found win32 implementations and Twisted > implementations yet I am looking for a way to do it on Linux WITHOUT > Twisted. Twisted is Open Source, so you could browse the source and see how they do it. Sybren -- The problem with the world

wxPython and twisted problem

2006-04-26 Thread chris sugden
Hi,   I'm a university student creating a python Chat server and client using twisted. The server works great. However I'm trying to create the client with a gui using wxpython and twisted. The code for the client is attached bellow. I'm working with a partner and he already tried posting our

Re: not quite 1252

2006-04-26 Thread Anton Vredegoor
Fredrik Lundh wrote: > Anton Vredegoor wrote: > >> I'm trying to import text from an open office document (save as .sxw and >> read the data from content.xml inside the sxw-archive using >> elementtree and such tools). >> >> The encoding that gives me the least problems seems to be cp1252, >> ho

Re: Pyrex installation on windows XP: step-by-step guide

2006-04-26 Thread Boris Borcic
Julien Fiore wrote: > Do you wand to install Pyrex on Windows ? > > Here is a step-by-step guide explaining: > > A) how to install Pyrex on Windows XP. > B) how to compile a Pyrex module. > > Julien Fiore, > U. of Geneva Thanks. One detail missing : for this (step b3) to work smooth

Re: A defense for bracket-less code

2006-04-26 Thread [EMAIL PROTECTED]
wrong group -- http://mail.python.org/mailman/listinfo/python-list

Re: KeybordInterrupts and friends

2006-04-26 Thread [EMAIL PROTECTED]
I know it is racey, but the bug is not the race (iow : it is not a matter of pressing twice C-c very quickly). It happens all the time. I let enough time between the key strokes to let the program wait on raw_input. Or maybe you have something else in mind. Care to expand ? Thanks, Aurélien. --

Query : sys.excepthook exception in Python

2006-04-26 Thread Pramod TK
Hi, Sometimes during execution of python scripts below mentioned error string is displayed on the console. "Unhandled exception in thread started by Error in sys.excepthook: Original exception was:" The scripts are not terminated, they continue to execute normally. Is this is a problem with python

Query regarding support for IPv6 in python

2006-04-26 Thread Pramod TK
Hello All, I have some queries related to python support for IPv6. Can you kindly clarify the doubts which I have - 1. Does python support IPv6? [128 bit IP addresses?] 2. Does it support setting of QoS flags? 3. Does it support tunneling of IPv6 on a IPv4 network? 4. If an IPv4 address is given,

Re: MinGW and Python

2006-04-26 Thread Brian Elmegaard
Neal Becker <[EMAIL PROTECTED]> writes: > release. Since mingw is usually current, I haven't checked, but they may > be using 4.1 now. It is not, it is 3.4.2. http://www.mingw.org/download.shtml#hdr2 -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staff/be/be.html http://www.

Re: Inherit from array

2006-04-26 Thread bruno at modulix
TG wrote: > Obviously, there is something I didn't catch in python's inheritance. Nope. Obviously, array.array doesn't respect the usual rules. > from array import array > class Vector(array): > def __init__(self,size): > print self.typecode > array.__init__(self,'f') > > >>

Re: wxPython and twisted problem

2006-04-26 Thread Richie Hindle
[Chris] > [we] already tried posting our problem > on comp.lang.python but we didn't receive a successful reply so I thought I > would try the mailing list. [A bit OT but worth pointing out] The mailing list and the newsgroup gateway to each other - everything sent to one also goes to the other (

Re: Inherit from array

2006-04-26 Thread bruno at modulix
Philippe Martin wrote: > > bruno at modulix wrote: >>TG wrote: >> >>>Hi there. >>> >>>I'm trying to create a simple class called Vector which inherit from >>>array. >> >>Which array ? > > I think he did > > from array import * > > oops ! Sorry, I forgot this was in the standard lib (well, I never

Re: wxpython warnings

2006-04-26 Thread Iain King
Michele Petrazzo wrote: > Philippe Martin wrote: > > I had a similar but simple problem (the file was missing) and had to > > check by hand before calling wxPython. > > > > Can you check the tag by hand before calling wxPython ? > > > > > > Philippe > > > > > > Hi, > also I have the same problem w

Twisted and wxPython integration problems

2006-04-26 Thread Chris Sugden
Hi,   I’m a university student creating a python Chat server and client using twisted. The server works great. However I’m trying to create the client with a gui using wxpython and twisted. The code for the client is attached bellow. I’m working with a partner and he already tried posting

Re: Inherit from array

2006-04-26 Thread Sion Arrowsmith
TG <[EMAIL PROTECTED]> wrote [something like]: >from array import array >class Vector(array): >def __init__(self,size): >array.__init__('f') > >v = Vector('c') >print repr(v) > >will output : > >array('c') Is this a case of new-sytle classes being confusing? Because I'm certainly confu

Re: A defense for bracket-less code

2006-04-26 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > wrong group why? -- http://mail.python.org/mailman/listinfo/python-list

Re: A defense for bracket-less code

2006-04-26 Thread Dave Hansen
On Wed, 26 Apr 2006 10:20:57 -0400 in comp.lang.python, Don Taylor <[EMAIL PROTECTED]> wrote: >Found in a style guide (http://www.artlogic.com/careers/styleguide.html) >--- >Another case where "unnecessary" braces should be used i

Re: Query regarding support for IPv6 in python

2006-04-26 Thread Sybren Stuvel
Pramod TK enlightened us with: > 1. Does python support IPv6? [128 bit IP addresses?] Yes. > 2. Does it support setting of QoS flags? No idea. > 3. Does it support tunneling of IPv6 on a IPv4 network? IIRC that's the OS's job, not Python's. > 4. If an IPv4 address is given, does it support th

Re: KeybordInterrupts and friends

2006-04-26 Thread [EMAIL PROTECTED]
Precision : it does not happen when running interactively. -- http://mail.python.org/mailman/listinfo/python-list

Events in Python?

2006-04-26 Thread redefined . horizons
Here is another non-pythonic question from the Java Developer. (I beg for forgiveness...) Does Python have a mechanism for events/event-driven programming? I'm not necessarily talking about just GUIs either, I'm interested in using events for other parts of an application as well. If there isn't

Re: Events in Python?

2006-04-26 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Here is another non-pythonic question from the Java Developer. (I beg > for forgiveness...) > > Does Python have a mechanism for events/event-driven programming? > > I'm not necessarily talking about just GUIs either, I'm interested in > using events for other parts of

Re: Xah's Edu Corner: Criticism vs Constructive Criticism

2006-04-26 Thread Eli Gottlieb
Xah Lee wrote: > Criticism versus Constructive Criticism > > Xah Lee, 2003-01 > > A lot intelligent people are rather confused about criticism, > especially in our “free-speech” free-for-all internet age. When > they say “constructive criticisms are welcome” they mostly mean > “bitching and compl

Re: Events in Python?

2006-04-26 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > > Does Python have a mechanism for events/event-driven programming? > Probably this is something for you: http://twistedmatrix.com/trac/ -- Servus, Gregor http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP / language design question

2006-04-26 Thread Brian van den Broek
Bruno Desthuilliers said unto the world upon 25/04/06 06:52 PM: > Duncan Booth a écrit : > >>bruno at modulix wrote: >> >> >> >>>class Base(object): >>> def __init__(self, arg1): >>> self.attr1 = arg1 >>> self.dothis() >>> >>> def dothis(self): >>> return self.attr1 >>> >>>class Derived(Base

Re: Events in Python?

2006-04-26 Thread Avizoa
[EMAIL PROTECTED] wrote: > Here is another non-pythonic question from the Java Developer. (I beg > for forgiveness...) > > Does Python have a mechanism for events/event-driven programming? > > I'm not necessarily talking about just GUIs either, I'm interested in > using events for other parts of a

Re: I have problems with creating the classic game Wumpus. the file: http://esnips.c

2006-04-26 Thread Claudio Grondi
Ben Sizer wrote: > connyledin wrote: > >>Im trying to create a version of the game Wumpus. Mine is called >>Belzebub. But im STUCK! And its due tuesday 2 maj. Im panicing! Can >>some one help me?? >>here is the file: >>http://esnips.com/webfolder/b71bfe95-d363-4dd3-bfad-3a9e36d0 >> >>What i ha

Re: wxpython warnings

2006-04-26 Thread Chris Mellon
On 26 Apr 2006 05:32:19 -0700, Iain King <[EMAIL PROTECTED]> wrote: > I have a wxpython program that displays TIF images. Sometimes it will > encounter a tag the tiff loader cant handle. Rather than silently > ignoring it, it pops up a window: > > Python Warning > unknown field with tag blah blah

Re: Inherit from array

2006-04-26 Thread bruno at modulix
Sion Arrowsmith wrote: > TG <[EMAIL PROTECTED]> wrote [something like]: >>from array import array > >>class Vector(array): >> def __init__(self,size): >> array.__init__('f') >> >>v = Vector('c') >>print repr(v) >> >>will output : >> >>array('c') > > > Is this a case of new-sytle classes

Re: OOP / language design question

2006-04-26 Thread bruno at modulix
Brian van den Broek wrote: > Bruno Desthuilliers said unto the world upon 25/04/06 06:52 PM: > >> Duncan Booth a écrit : >> (snip) >>> Apart from the fact that you can delete the method 'dothis' from both >>> classes with no effect on the code? >> >> Mmmm... Oh, I see. Agreed, this is not a very g

SimpleXMLRPCServer runnning as a Windows Service using win32serviceutil

2006-04-26 Thread JDF
I am trying to create a Windows service using SimpleXMLRPCServer and win32serviceutil. The service itself seems to be working properly (starts, stops, etc) and I can connect using an XMLRPC client from the localhost. However when I connect from a remote client, I either get a socket error or an x

Re: MinGW and Python

2006-04-26 Thread Martin v. Löwis
Edward Elliott wrote: >> Well, there is no native C library on Microsoft Windows: the system >> simply doesn't include an official C library (I know there is crtdll.dll >> and msvcrt.dll, but these aren't "endorsed" system C libraries). > > don't know what you mean by "endorsed". does it lack fea

Re: MinGW and Python

2006-04-26 Thread Martin v. Löwis
Ross Ridge wrote: > MSVCRT.DLL has been a standard system compent of Windows since at least > Windows 98. Many other system components depend on it. Essentially, > MSVCRT.DLL is an "undocumented" part of the Windows API. It's not > exactly "endorsed", Microsoft would rather you use it's current

CoderWiki.com - A free online reference manual

2006-04-26 Thread da404LewZer
Anyone interested in helping me build the ultimate programming manual? http://www.coderwiki.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Events in Python?

2006-04-26 Thread John Hunter
> "redefined" == redefined horizons <[EMAIL PROTECTED]> writes: redefined> Here is another non-pythonic question from the Java redefined> Developer. (I beg for forgiveness...) redefined> Does Python have a mechanism for events/event-driven redefined> programming? The enthough

Re: MinGW and Python

2006-04-26 Thread Martin v. Löwis
Ross Ridge wrote: > Not exactly. They're both GCC, but the MinGW compiler that you can > download from MinGW WWW site is a native Win32 appliction, while the > "MinGW" compiler included with Cygwin and invoked by "-mno-cygwin" is a > Cygwin application. Any Cygwin application is a native Win32 ap

Re: Events in Python?

2006-04-26 Thread nikie
[EMAIL PROTECTED] wrote: > Here is another non-pythonic question from the Java Developer. (I beg > for forgiveness...) > > Does Python have a mechanism for events/event-driven programming? > > I'm not necessarily talking about just GUIs either, I'm interested in > using events for other parts of a

Re: Can one query full name (or version) of selected packages at pypi?

2006-04-26 Thread Martin v. Löwis
Caleb Hattingh wrote: > How up-to-date does Debian keep its package list for python addons, > or are you running Unstable? I'm running unstable indeed. > My big problem, being in South Africa, is that I have to get any > distros on cover CDs or order from distro-resellers, and they never > have T

Re: not quite 1252

2006-04-26 Thread Martin v. Löwis
Anton Vredegoor wrote: > The encoding that gives me the least problems seems to be cp1252, > however it's not completely perfect because there are still characters > in it like \93 or \94. Has anyone handled this before? I'd rather not > reinvent the wheel and start translating strings 'by hand'.

[Reported] (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-26 Thread John Bokma
Eli Gottlieb <[EMAIL PROTECTED]> wrote: > Oh, God, not another one. Instead of cross posting more garbage, do as follows: Email a complaint to the email addresses you can look up yourself and include the entire message of Xah: http://www.spamcop.net/sc?track=72.231.179.135 posting hos

Re: Query regarding support for IPv6 in python

2006-04-26 Thread Martin v. Löwis
Pramod TK wrote: > Is this new function getaddrinfo() of IPv6 is supported in Win32 Extensions > for python. Yes, since Python 2.4 (actually, not in the Win32 extensions, but in the standard Python socket module for Win32). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >