Re: Markov process representation

2006-03-16 Thread Max M
Jack Diederich wrote: > On Wed, Mar 15, 2006 at 04:50:31PM -0800, Paul Rubin wrote: > >>"kpp9c" <[EMAIL PROTECTED]> writes: >> >>>self._all_states |= set(key[i] for key in probabilities) >>>I am running: >>>Python 2.3 (#1, Sep 13 2003, 00:49:11) >> >>generator comprehensions are new in 2.4. T

Re: Is it better to use class variables or pass parameters?

2006-03-16 Thread Eric Brunel
On 15 Mar 2006 15:04:19 -0800, Derek Basch <[EMAIL PROTECTED]> wrote: > One more question everybody. Say you have a class that performs a > series of evaluations on several strings of peptides. Errr..., no? A class does not perform some operations. A class is a template for objects. What are yo

Re: Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-16 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > The problem I'm trying to solve is. > There is a 5x5 grid. > You need to fit 5 queens on the board such that when placed there are > three spots left that are not threatened by the queen. when you're done with your homework (?), you can compare it with Guido's solution:

Re: Tried Ruby (or, "what Python *really* needs" or "perldoc!")

2006-03-16 Thread Nick Craig-Wood
Jason Earl <[EMAIL PROTECTED]> wrote: > Why don't you instead install the info version of the Python > documentation on your server. Then you can do "info Python2.3-lib" > and have at it. I didn't know about that. Its very good. Its still not all the documentation for all the installed modul

can httplib.HTTPConnection use proxy?

2006-03-16 Thread JuHui
how to use httplib.HTTPConnection with http proxy? -- http://mail.python.org/mailman/listinfo/python-list

can httplib.HTTPConnection use proxy?

2006-03-16 Thread JuHui
how to use httplib.HTTPConnection with http proxy? -- http://mail.python.org/mailman/listinfo/python-list

asyncore/asynchat do not notify connection errors on Wintel?

2006-03-16 Thread Z. Kotzer
I can not get error notifications when an asynchat based client tries to connect to a non-responsive address. To validate the problem I changed lib/test/test_asynchat.py as follows: class echo_client(asynchat.async_chat): def __init__(self): asynchat.async_chat.__init__(self)

Re: Is it better to use class variables or pass parameters?

2006-03-16 Thread Steve Holden
Derek Basch wrote: > So, if I am understanding what everyone is saying here. I should do my > best to distinguish between values that are part of the "state" of an > object and values that are more disposable and can change for each > computation of a value. So if I create an instance of a "wallet"

Re: Printable string for 'self'

2006-03-16 Thread Duncan Booth
Michael Tobis wrote: > I got in some trouble in these parts a few months back for advocating > some sort of immutable reference, like > > fred -> C("fred") > > where any reassignment of the refernce during the lifetime of the > referent would raise an exception. This seems to be seen as wronghea

Re: Installing PySQLite on OS X 10.4

2006-03-16 Thread Rob Cowie
Cheers. I should have read the installation notes more carefully :) Rob C -- http://mail.python.org/mailman/listinfo/python-list

Re: Button and Key Event

2006-03-16 Thread lux
Thanks, I think that the solution for my problem is only to use an AcceleratorTable. In this way I can capture the key pressed event without the "button problem" Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Install Universal Encoding Detector

2006-03-16 Thread Jacob
How do I uninstall? /Jacob -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Debugger / IDE ??

2006-03-16 Thread Ritesh Raj Sarraf
Can you please point some good documents (need not be Python specific) on best practices with writing code this way ? Thanks, Ritesh -- http://mail.python.org/mailman/listinfo/python-list

Re: comparing huge files

2006-03-16 Thread s99999999s2003
thanks for the reply, I have used another method to solve my problem. ie 1) get the total count of the first file 2) write this total count to basecnt eg basecnt 3) get another file, get the total count of this file. eg filecnt 4) if filecnt > basecnt, read in the values from file[basecnt:filecnt]

Re: Other languages for PVM

2006-03-16 Thread Diez B. Roggisch
Ravi Teja wrote: > Yes! But not many. > > http://www.livelogix.net/logix/ Interesting. > > Logix also allows you to create your own custom languages for Python's > VM. But for some reason, there does not seem to be much interest in > it's development. Odd, given that it has great potential. I

Re: recycling internationalized garbage

2006-03-16 Thread Fredrik Lundh
"Martin v. Löwis" wrote: >> It should be obvious that any 8-bit single-byte character set can >> produce byte sequences that are valid in UTF-8. > > It is certainly possible to interpret UTF-8 data as if they were > in a specific single-byte encoding. However, the text you then > obtain is not mea

Re: Install Universal Encoding Detector

2006-03-16 Thread Kent Johnson
Jacob wrote: > How do I uninstall? Delete the chardet folder from site-packages (Python24\Lib\site-packages on Windows, not sure of the exact path on other OS's). Kent -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python installation

2006-03-16 Thread Kai Schulte
The Debian stable package tree has only libapache2-mod-python2.3 (3.1.3-3). You can look at http://packages.debian.org/stable/python/ for a detailed list. If you really want to use python2.4 you can either try to use the ubuntu package (http://packages.ubuntu.org.cn/breezy/python/libapache2-mo

Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
The python code below generates a cartesian product subject to any logical combination of wildcard exclusions. For example, suppose I want to generate a cartesian product S^n, n>=3, of [a,b,c,d] that excludes '*a*b*' and '*c*d*a*'. See below for details. CHALLENGE: generate an equivalent in ruby,

Re: Is it better to use class variables or pass parameters?

2006-03-16 Thread Terry Hancock
On 15 Mar 2006 15:04:19 -0800 "Derek Basch" <[EMAIL PROTECTED]> wrote: > > class PeptideEvaluator: > > def evaluate(self, peptide): > [...] > > So, you instantiate a class called "PeptideEvaluator" and > pass in each string to its "evaluate" method. Now you have > to repeatedly pass the pept

Re: Cheese Shop: some history for the new-comers

2006-03-16 Thread Terry Hancock
On Sun, 12 Mar 2006 11:58:05 -0500 "Peter Decker" <[EMAIL PROTECTED]> wrote: > Of course, you're straying so far from the original > thought behind this thread, and that is that the Python > website is using some terms differently than the majority > of people who will eventually use the site would

Re: Cheese Shop: some history for the new-comers

2006-03-16 Thread Terry Hancock
On Tue, 14 Mar 2006 13:22:09 -0700 Steven Bethard <[EMAIL PROTECTED]> wrote: > A.M. Kuchling wrote: > > On Sun, 12 Mar 2006 10:25:19 +0100, > > Fredrik Lundh <[EMAIL PROTECTED]> wrote: > >> and while you're at it, change "python-dev" to > >"developers" and > "psf" to "foundation" (or use a tit

Re: Tried Ruby (or, "what Python *really* needs" or "perldoc!")

2006-03-16 Thread Terry Hancock
On Wed, 15 Mar 2006 23:10:16 +0100 "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Diez B. Roggisch wrote: > > >> Yes, I'm trying to make time to look at the docutils > >code and the > pydoc command to see what's involved. > >Unfortunately, my spare > time is vanish

int <-> str asymmetric

2006-03-16 Thread Schüle Daniel
Hello what I sometimes miss in Python is the possibility to switch tha base of a number for example this is how it's done in Ruby irb(main):099:0* a = 10.to_s(2) => "1010" irb(main):100:0> a.to_i(2) => 10 irb(main):101:0> irb(main):102:0* a = 10.to_s(3) => "101" irb(main):103:0> a.to_i(3) => 10

Re: Python compiler

2006-03-16 Thread M�ta-MCI
Hi! Bonjour ! Après, vous pourrez aussi fréquenter le newsgroup : fr.comp.lang.python qui a l'avantage d'être en français. à bientôt. Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: MS word document generator

2006-03-16 Thread M�ta-MCI
Hi! Yes, I have an idea. But... I has no time, actually. Perhaps in 2 or 3 weeks... Sorry. Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

A Frame-space syntax ? - Re: global, globals(), _global ?

2006-03-16 Thread robert
Alex Martelli wrote: > robert <[EMAIL PROTECTED]> wrote: >... >>I think its good to leave the default global binding (that is probably >>whats Guido doesn't want to give up for good reason) > > > Then, on the principle that there should be preferably only one obvious > way to do something, w

Re: MS word document generator

2006-03-16 Thread paron
You might also consider OpenOffice, which writes to ODF. That way, you're working to a standard. You can script OpenOffice in Python (http://udk.openoffice.org/python/python-bridge.html) . OpenOffice can save in .doc, and does a pretty good job of making a file that most MS Word versions will rende

Re: Cheese Shop: some history for the new-comers

2006-03-16 Thread Tim Parkin
Terry Hancock wrote: > On Tue, 14 Mar 2006 13:22:09 -0700 > Steven Bethard <[EMAIL PROTECTED]> wrote: > >>A.M. Kuchling wrote: >> >>>On Sun, 12 Mar 2006 10:25:19 +0100, >>> Fredrik Lundh <[EMAIL PROTECTED]> wrote: >>> and while you're at it, change "python-dev" to >>> >>>"developers" and

Re: can httplib.HTTPConnection use proxy?

2006-03-16 Thread robert
JuHui wrote: > how to use httplib.HTTPConnection with http proxy? > simply connect to the proxy? - and ask using the full url and original Host: - for HTTPS do a CONNECT . Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: asyncore/asynchat do not notify connection errors on Wintel?

2006-03-16 Thread Abdullah Yoldas
Normally when you make a nonblocking connect, socket gets EINPROGRESS, later the result of this request will appear after select returns.   I think asyncore/asynchat incorrectly interprets asychronous connects. Reading Steven's book, I did some modifications to asyncore.dispatcher and asynchat.asyn

Re: can httplib.HTTPConnection use proxy?

2006-03-16 Thread JuHui
sorry, would you please give a sample code? I want to use HTTPConnection to get a html page content via a http proxy. thanks. -- http://mail.python.org/mailman/listinfo/python-list

bisect and Queue modules in Python 2.4

2006-03-16 Thread SA Trygubenko
Dear All, Python 2.4 (#1, Mar 22 2005, 21:42:42) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Queue >>> q=Queue.Queue() >>> type(q.queue) >>> q.queue used to be a list, and now it is something else?

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Tomasz Zielonka
[EMAIL PROTECTED] wrote: > The python code below generates a cartesian product subject to any > logical combination of wildcard exclusions. For example, suppose I want > to generate a cartesian product S^n, n>=3, of [a,b,c,d] that excludes > '*a*b*' and '*c*d*a*'. See below for details. > > CHALLEN

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Tomasz Zielonka
Tomasz Zielonka wrote: > putStrLn (concat (intersperse " " ["generateMatching", show a, show > b, show c])) Minor correction: it should be "generateNotMatching". Best regards Tomasz -- I am searching for programmers who are good at least in (Haskell || ML) && (Linux || FreeBSD || math)

Re: bisect and Queue modules in Python 2.4

2006-03-16 Thread Peter Otten
SA Trygubenko wrote: > q.queue used to be a list, and now it is something else? > > I was using bisect module to implement min priority queue, as described > in python library reference (see > http://www.python.org/doc/2.3.5/lib/bisect-example.html). I have found > out that in Python 2.4 q.queue

Re: can httplib.HTTPConnection use proxy?

2006-03-16 Thread adam
>>> import httplib >>> h = httplib.HTTPConnection("www.google.ca") >>> h.connect() Traceback (most recent call last): File "", line 1, in ? File "C:\Python24\lib\httplib.py", line 627, in connect raise socket.error, msg error: (10061, 'Connection refused') >>> h2 = httplib.HTTPConnection("m

Re: looking for atomixlib

2006-03-16 Thread Rocco
here you'll find it in svn. http://trac.defuze.org/browser/oss -- http://mail.python.org/mailman/listinfo/python-list

Re: Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-16 Thread Michael Spencer
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > >> The problem I'm trying to solve is. >> There is a 5x5 grid. >> You need to fit 5 queens on the board such that when placed there are >> three spots left that are not threatened by the queen. > > when you're done with your homework (?), you can

Python Documentation Standards

2006-03-16 Thread Colin J. Williams
Doc strings provide us with a great opportunity to illuminate our code. In the example below, __init__ refers us to the class's documentation, but the class doc doesn't help much. Are there any guideline which cover such things? PEP 8 has general advice

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Tomasz Zielonka
Major correction (missing case): Tomasz Zielonka wrote: > generateMatching :: (Ord a) => Int -> Set a -> [Pat a] -> [[a]] > generateMatching 0 _[]= [[]] generateMatching 0 alphabet (All:ps) = generateMatching 0 alphabet ps > generateMatching 0 _(_:_) = [] Best regards

Re: python debugging question

2006-03-16 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > I am a python newbie. I have writen some 500 lines of code. There are 4 > classes and in all 5 files. > > Now, I am trying to run the program. I am getting wrong values for the > simulation results. If you first write 500 lines of code, and *then* try to run it, it seem

Re: int <-> str asymmetric

2006-03-16 Thread Steven Bethard
Schüle Daniel wrote: > however we lack the reverse functionality > the logical > > >>> str(10,2) > Traceback (most recent call last): > File "", line 1, in ? > TypeError: str() takes at most 1 argument (2 given) > >>> > > fails > > it would not break anything if str interface would be change

Re: Python Debugger / IDE ??

2006-03-16 Thread Don Taylor
Christoph Zwerschke wrote: > [EMAIL PROTECTED] wrote: > >>I like the Pyscripter, is there any Linux version or something of it. > > > Sorry, I forgot to mention that there is a snag in it. Since PyScripter > is based on Python for Delphi, it is available for Windows only. > Is there a free or

Re: Python Documentation Standards

2006-03-16 Thread Steven Bethard
Colin J. Williams wrote: > Doc strings provide us with a great opportunity to illuminate our code. > > In the example below, __init__ refers us to the class's documentation, > but the class doc doesn't help much. It doesn't? >>> print list.__doc__ list() -> new list list(sequence) -> new list i

Re: Tried Ruby (or, "what Python *really* needs" or "perldoc!")

2006-03-16 Thread Steve Juranich
[EMAIL PROTECTED] wrote: > This "release" is as alpha as alpha gets. It's so alpha it > actually loops back around to zeta -- but it's a start, and I > think it's exactly what the Python community needs. Not to pick nits, but that should actually be "... so alpha that it actually loops back aroun

Re: A Frame-space syntax ? - Re: global, globals(), _global ?

2006-03-16 Thread Alex Martelli
robert <[EMAIL PROTECTED]> wrote: ... > > Not sure I entirely understand what you're proposing, but locals access > > must remain compile-time-optimized for crucial practical reasons, so > > "writing to locals()" just will not work right. > > Why will a definite write to _certain_ top local dic

Re: bisect and Queue modules in Python 2.4

2006-03-16 Thread Alex Martelli
Peter Otten <[EMAIL PROTECTED]> wrote: > SA Trygubenko wrote: > > > q.queue used to be a list, and now it is something else? > > > > I was using bisect module to implement min priority queue, as described > > in python library reference (see > > http://www.python.org/doc/2.3.5/lib/bisect-example

Re: bisect and Queue modules in Python 2.4

2006-03-16 Thread Abdullah Yoldas
I had a similar problem when i was using asynchat.fifo, it had a list in the past now it has a deque. So in order to put something to zeroth location (to be compatible with python 2.3 and python 2.4) I did something like: class fifo(asynchat.fifo):     def __init__(self, list=None):    asynch

Computing correlations with SciPy

2006-03-16 Thread tkpmep
I want to compute the correlation between two sequences X and Y, and tried using SciPy to do so without success.l Here's what I have, how can I correct it? >>> X = [1, 2, 3, 4, 5] >>> Y = [5, 4, 3, 2, 1] >>> import scipy >>> scipy.corrcoef(X,Y) Traceback (most recent call last): File "", line 1,

Re: Computing correlations with SciPy

2006-03-16 Thread Felipe Almeida Lessa
Em Qui, 2006-03-16 às 07:49 -0800, [EMAIL PROTECTED] escreveu: > I want to compute the correlation between two sequences X and Y, and > tried using SciPy to do so without success.l Here's what I have, how > can I correct it? $ python2.4 Python 2.4.2 (#2, Nov 20 2005, 17:04:48) [GCC 4.0.3 2005

Re: Python Documentation Standards

2006-03-16 Thread Duncan Booth
Steven Bethard wrote: > Colin J. Williams wrote: >> Doc strings provide us with a great opportunity to illuminate our code. >> >> In the example below, __init__ refers us to the class's documentation, >> but the class doc doesn't help much. > > It doesn't? > > >>> print list.__doc__ > list() ->

Re: can't send large messages over SSL socket

2006-03-16 Thread [EMAIL PROTECTED]
Well the first thing to note is that the maximum record length in SSL is exactly 16384. SSL/TLS does not preserve message boundaries - it is up to the application to determine if there are multiple messages in a single record, or a single message spanning multiple records. Sounds like the particu

Re: Computing correlations with SciPy

2006-03-16 Thread John Hunter
> "tkpmep" == tkpmep <[EMAIL PROTECTED]> writes: tkpmep> I want to compute the correlation between two sequences X tkpmep> and Y, and tried using SciPy to do so without success.l tkpmep> Here's what I have, how can I correct it? X = [1, 2, 3, 4, 5] Y = [5, 4, 3, 2, 1] im

Re: python2.4.2 + win95, import socket dll error

2006-03-16 Thread John Pote
Dennis, Thanks for the info. Found winsock2.0 on the MS knowledge base site. Downloaded, installed (with the y2k upgrade as recommended) and, amazingly, all is working. My simple socket server works no problem as does a test http client sending data to my web site. This latter program seems a li

what's going on here?

2006-03-16 Thread John Salerno
This might be confusing to explain, because it's a question about an example in Beginning Python and I'll try to provide all the info I can. First off, I'm reading a chapter on using the ReportLab modules to create a line graph from a set of data. The first implementation of the program uses a

Re: Tried Ruby (or, "what Python *really* needs" or "perldoc!")

2006-03-16 Thread john_sips_tea
Jason Earl wrote: > "msoulier" <[EMAIL PROTECTED]> writes: > > >> I have found the Python sidebar VERY helpful: > > > > Personally, I can't use local docs on my desktop as they may not be > > the same version of the docs for the Python distro running on the > > server that I'm deploying on. I usua

Re: what's going on here?

2006-03-16 Thread Schüle Daniel
[...] > So finally here's my question: If you are using data.append(), doesn't > that just put all the numbers into one long list? no, append appends extend does what you think How are the tuples > still being created in this case so that the list comprehensions still > work? It seems like th

Re: what's going on here?

2006-03-16 Thread Felipe Almeida Lessa
Em Qui, 2006-03-16 às 16:31 +, John Salerno escreveu: > So finally here's my question: If you are using data.append(), doesn't > that just put all the numbers into one long list? How are the tuples > still being created in this case so that the list comprehensions still > work? It seems like

Executing a DOS program from within Python

2006-03-16 Thread Randy Kreuziger
This is probably a newbie question but I need a kick start to get going. I need to run a DOS (sdetable) program from within a Python program. I'll use command line switches so I will not need to interact with the program however it would be nice if I could capture its exit code. Thanks Rand

Re: what's going on here?

2006-03-16 Thread John Salerno
Felipe Almeida Lessa wrote: > # Suppose line is "200412 34.235.233.2" > # for our comments > > # Creates a list, like ["2004", "12", "34.2", "35.2", "33.2"] > splitted = line.split() Thanks guys! I think what I forgot was that split() returns a list, so that's when the 'rows'

Re: Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-16 Thread [EMAIL PROTECTED]
Thank you very much guys! Just for clarification it wasn't homework, just extra credit :) I can't beleive I didn't realize that I didn't clear the GLOBAL variable :D -- http://mail.python.org/mailman/listinfo/python-list

Re: email package 4.0a2

2006-03-16 Thread Konrad Hinsen
On Mar 5, 2006, at 22:10, Barry Warsaw wrote: > I'm happy to announce the release of the email 4.0a2 standalone > package. > This is the latest version of the email package and will be released > with Python 2.5. The major changes between this version and email 3.0 > (released with Python 2.4)

Re: Executing a DOS program from within Python

2006-03-16 Thread Gary Herron
Randy Kreuziger wrote: >This is probably a newbie question but I need a kick start to get going. > >I need to run a DOS (sdetable) program from within a Python program. I'll use >command line switches so I will not need to interact with the program however >it would be nice if I could capture

Re: Cheese Shop: some history for the new-comers

2006-03-16 Thread Harald Armin Massa
Tim, > For most people 'developers' would mean people developing *with* python, > not developing python. one of the richest people on earth did define what developers are: http://www.ntk.net/ballmer/mirrors.html people developing with something. So, unless we get /F or BDFL to do an even more a

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
Flame war? Absolutely not. My reason is to learn. There are many sites dedicated to reasonably objective comparisons between languages. Here are two examples: http://www.smallscript.org/Language%20Comparison%20Chart.asp http://www.jvoegele.com/software/langcomp.html The wildcard exclusion problem

Re: Large algorithm issue -- 5x5 grid, need to fit 5 queens plus some squares

2006-03-16 Thread Felipe Almeida Lessa
Em Qui, 2006-03-16 às 09:20 +0100, Fredrik Lundh escreveu: > when you're done with your homework (?), you can compare it with > Guido's solution: > > http://svn.python.org/view/python/trunk/Demo/scripts/queens.py Just a curiosity. Running the script as the site lists on my computer: $ time p

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
The point is to submit elegant code that showcases the features of each language. And the problem is, just to clarify, given a set WC of wildcards in any logical combination, and if WC(S^n) is the set all s in S^n that matches the wildcards, then efficiently generate the complement S^n\WC(S^n). You

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > There are many sites > dedicated to reasonably objective comparisons between languages. Here > are two examples: > > http://www.smallscript.org/Language%20Comparison%20Chart.asp > http://www.jvoegele.com/software/langcomp.html http://shootout.alioth.debian.org/ -

Re: "pow" (power) function

2006-03-16 Thread Mike Ressler
On Wed, 2006-03-15 at 18:46 -0800, Ben Cartwright wrote: > Anyway, if you want to see the int vs. float issue in action, try this: > > >>> from timeit import Timer > >>> Timer('2**2').timeit() > 0.12681011582321844 > >>> Timer('2.0**2.0').timeit() > 0.6011743438121 > >>> Timer('2.

Re: Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations

2006-03-16 Thread Roedy Green
On 15 Mar 2006 22:20:52 -0800, "Xah Lee" <[EMAIL PROTECTED]> wrote, quoted or indirectly quoted someone who said : >e. For example, the in-fix >notation =E2=80=9C(3+(2*5))>7=E2=80=9D is written as =E2=80=9C3 2 5 * + 7 >= >=E2=80=9D, where the Not that Mr. Lee has ever shown much interest in feedb

Re: Queue limitations?

2006-03-16 Thread mateom
I am creating the images by reading from texture memory using glGetTexImage(). As an experiment, I tried calling glGetTexImage() only once and letting imagQueue use that same reference over and over, but the images were all the same. So, this leads me to believe that the references returned by glG

Re: Cheese Shop: some history for the new-comers

2006-03-16 Thread Paul Boddie
Harald Armin Massa wrote: > > one of the richest people on earth did define what developers are: > > http://www.ntk.net/ballmer/mirrors.html I was wondering when someone would mention the "developers, developers, developers" Ballmer song-and-dance incident: clearly, he isn't chanting about intern

Re: Is Forth for real?

2006-03-16 Thread astrobe
[EMAIL PROTECTED] a écrit : > rickman wrote: > > The original post seems to be missing, but my answer to the title > > question is, No, Forth is not real. > > Not for real, for Integer. No, it's for me and you (well, perhaps more for you than for me). But 4IM is forever mine :) Amicalement,

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Wade Humeniuk
Without much testing. Common Lisp Pattern exclusions are made lispy. (defun all-lists (list length) (unless (zerop length) (if (= length 1) (mapcar #'list list) (loop for elt in list nconc (mapcar (lambda (rest) (cons elt rest))

Re: email package 4.0a2

2006-03-16 Thread Tony Meyer
[Barry Warsaw] >> I'm happy to announce the release of the email 4.0a2 standalone >> package. [Konrad Hinsen] > My interpretation of the above paragraph is that it will be > impossible to write Python code using the email module (and possibly > other evolving modules) that works with both Python 2

Re: Cheese Shop: some history for the new-comers

2006-03-16 Thread Fredrik Lundh
Paul Boddie wrote: > > one of the richest people on earth did define what developers are: > > > > http://www.ntk.net/ballmer/mirrors.html > > I was wondering when someone would mention the "developers, developers, > developers" Ballmer song-and-dance incident: clearly, he isn't chanting > about in

Re: Executing a DOS program from within Python

2006-03-16 Thread iapain
Use os.system and if you wanna get rid of console window use subprocess as gary said, you could have better options like killing proc if it hang/stuck using win32api (if you are using windows) else process timeout. ret = os.system('sample.exe') # ret will have return code and os.system execute sam

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread [EMAIL PROTECTED]
What I have in mind is the efficient, generation of the complement S^n/WC(S^n). A good program should initialize, generate, and terminate. T=cartprodex(S,n,WC); //initialize for all i in T do what you want with i test to see if any more terminate if not and it should do this without explic

Re: Cheese Shop -> BSOL?

2006-03-16 Thread Christos Georgiou
On 11 Mar 2006 03:22:42 -0800, rumours say that "Paul Boddie" <[EMAIL PROTECTED]> might have written: >Tim Churches wrote: >> Would it be possible to rename "Cheese Shop" as "Bright Side of Life"? [Paul] >So should a service for finding Python packages have a distinct >identity? It is possible

Counting nested loop iterations

2006-03-16 Thread Derek Basch
What is the best way to count nested loop iterations? I can only figure to use an index but that seems kludgy. index = 0 for animal in zoo: for color in animal: index += 1 Thanks, Derek Basch -- http://mail.python.org/mailman/listinfo/python-list

Python / glade fundamentals

2006-03-16 Thread Doug
Hi all, Can someone tell me why I do not get a connection between the events and the functions in the sample below. GUI window appears OK, just no connections seem to be made. I am new to this so may be missing something fundamental. Thanks, Doug file pgtest.glade = http://

Re: OCR question

2006-03-16 Thread Duncan Watson <[EMAIL PROTECTED]>
Excellent suggestion. I found it. I will see what I can do about some edge detection to crop the images so that gocr has an easier time of it. Thanks -Duncan -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting nested loop iterations

2006-03-16 Thread Fredrik Lundh
Derek Basch wrote: > What is the best way to count nested loop iterations? I can only figure > to use an index but that seems kludgy. > > index = 0 > for animal in zoo: > for color in animal: > index += 1 what's kludgy with using a counter to count things ? (the real question here is

accessing attributes when inheriting?

2006-03-16 Thread Peter Bismuti
How do you access attributes of a class when inheriting from it? Can't you just say: self.attribute?  Help?! ... #!/usr/bin/python from Dialog import Dialog import enscmd class RatDialog(Dialog

accessing attributes when inheriting?

2006-03-16 Thread Peter J. Bismuti
How do you access attributes of a class when inheriting from it? Can't you just say: self.attribute? Help?! ... #!/usr/bin/python from Dialog import Dialog import enscmd class RatDialog(Dial

Re: Counting nested loop iterations

2006-03-16 Thread Jeffrey Schwab
Derek Basch wrote: > What is the best way to count nested loop iterations? I can only figure > to use an index but that seems kludgy. > > index = 0 > for animal in zoo: > for color in animal: > index += 1 Depending on the types of the containers in question, you could use: le

Re: Counting nested loop iterations

2006-03-16 Thread Derek Basch
Fredrik Lundh wrote: > what's kludgy with using a counter to count things ? Ohhh, nothing in particular. Just seeing if there is a better way to do it. > (the real question here is of course why you need the counter. what's > the loop doing? if the code you posted is all you have, you can rep

Re: accessing attributes when inheriting?

2006-03-16 Thread James Stroud
Peter J. Bismuti wrote: > > How do you access attributes of a class when inheriting from it? Can't you > just say: > > self.attribute? > > Help?! > ... > #!/usr/bin/python > > from Dialog impo

Re: Counting nested loop iterations

2006-03-16 Thread Derek Basch
> Depending on the types of the containers in question, you could use: > > len(zoo) * len(animal) I think this would give me the total iterations but I wouldn't be able to get a running count. Correct? Thanks for the reply, Derek Basch -- http://mail.python.org/mailman/listinfo/python-lis

Binary python extensions with Free Pascal Compiler

2006-03-16 Thread Caleb Hattingh
Hi all I want to write python extensions with FPC (Free Pascal Compiler, http://www.freepascal.org). In Delphi, this is trivially easy due to the great work of the P4D (Python-for-Delphi, http://mmm-experts.com/) guys; however, when aiming for cross-platform binary extensions, that strategy nat

Re: Counting nested loop iterations

2006-03-16 Thread Caleb Hattingh
Hi Derek I went for an embarrassingly long time without knowing about "enumerate()". It doesn't directly answer your question about counting *within* nests, but I am going to tell you this on the off chance you don't know yet (and apologies if you do): This: count = 0 for animal in zoo: a =

Re: Binary python extensions with Free Pascal Compiler

2006-03-16 Thread Ravi Teja
I posted this a few days ago. According to the website (http://mmm-experts.com/VersionHistory.aspx?ProductId=3), FPC support has been added since version 3.29. -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting nested loop iterations

2006-03-16 Thread Kent Johnson
Derek Basch wrote: > Fredrik Lundh wrote: >>(the real question here is of course why you need the counter. what's >>the loop doing? if the code you posted is all you have, you can replace >>it with index = sum(len(animal) for animal in zoo), but I assume you want >>to do more stuff in there...) >

Re: Binary python extensions with Free Pascal Compiler

2006-03-16 Thread Caleb Hattingh
Well, there it is: * Added support for Free Pascal Compiler (http://www.freepascal.org/) and Lazarus Project (http://www.lazarus.freepascal.org/) Thanks to Michiel du Toit ([EMAIL PROTECTED]) That was easy. I just saw the new support for D2k6 recently. thx Ravi Caleb -- http://mail.python.or

Re: Other languages for PVM

2006-03-16 Thread Ravi Teja
I did not mean the lack of interest on part of the developer. That was explained here. http://www.livelogix.net/logix/future-work.html His complaints were Efficiency and Security. I was wondering why the Python community did not show interest in this. There is tremendous potential in this product.

Re: Counting nested loop iterations

2006-03-16 Thread Duncan Booth
Derek Basch wrote: > index = 0 > for animal in zoo: > for color in animal: > index += 1 # assuming there is something more goes here... > You could do this, but it kind of depends what the loop *really* looks like: for index, color in enumerate(color

Re: Python Debugger / IDE ??

2006-03-16 Thread Rowdy
Don Taylor wrote: > Is there a free or low-cost version of Delphi for Windows available > anywhere? > There used to be a Delphi 6 Personal Edition that was available free (for non-commercial use). You might still find it around somewhere. Rowdy -- http://mail.python.org/mailman/listinfo/pyt

Re: Counting nested loop iterations

2006-03-16 Thread Carl Banks
Derek Basch wrote: > What is the best way to count nested loop iterations? I can only figure > to use an index but that seems kludgy. > > index = 0 > for animal in zoo: > for color in animal: > index += 1 I don't know if it's kludgy, but I do prefer to set counters in the for statement

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread funkyj
here is my version of the same. REPL output: CL-USER> (tests) set = (1 2) n= 3 patterns = ((1 ANY 2)) --- (1 1 1) (1 2 1) (2 1 1) (2 1 2) (2 2 1) (2 2 2) set = (A B) n= 3 patterns = ((A ANY B) (B ANY A)) --- (A A A) (A B A) (B

  1   2   >