Re: Debian says "Warning! you are running an untested version of Python." on 2.3

2005-01-13 Thread Nick Craig-Wood
Gerhard Haering <[EMAIL PROTECTED]> wrote: > ROFL. Are you using testing, sid or experimental? I expect overzealous > patching from Debian developers, but this is the worst I've heard > of. I would have thought that is unlikely given the way packages move (unmodified) from unstable -> testing

Re: from __future__ import decorators

2005-01-13 Thread Jacek Generowicz
Skip Montanaro <[EMAIL PROTECTED]> writes: > Jacek> Crazy idea ... would it be possible to shadow 2.3's parser with > Jacek> one stolen from 2.4 ? > > If you're willing to go to that much trouble, why not just upgrade to 2.4? *I* upgraded to 2.4 sometime when it was in alpha. -- http://

RE: module on files & directories

2005-01-13 Thread Robert Brewer
Sara Fwd wrote: > > Can anybody help me find a module or a function that > > looks in a directory and defines whether the objects > > in there are files or directories? and Simon Brunning replied: > See os.path.isfile() and os.path.isdir() - > . I s

Tix.FileSelectDialog wait for user?

2005-01-13 Thread harold fellermann
Hi, I have a question concerning the Tix file select mechanisms. Unfortunately, I have very little experience with neither tk, Tkinter nor Tix. Somewhere in my GUI I have a save button. What I want is that pressing the button opens a file requester. The user can either select a filename or cancel

Re: dynamically inserting function into an object

2005-01-13 Thread hanz
# class Cell(object): # def __init__(self, initialvalue = 0): #self._func = lambda x: x #self.__value = initialvalue # # def setvalue (self, newvalue): # self.__value = self._func(newvalue) # # def getvalue (self): # return self.__value # # def delval

Re: why are people still using classic classes?

2005-01-13 Thread Michael Hobbs
Simon Wittber <[EMAIL PROTECTED]> wrote: > I've noticed that a few ASPN cookbook recipes, which are recent > additions, use classic classes. > > I've also noticed classic classes are used in many places in the > standard library. > > I've been using new-style classes since Python 2.2, and am supr

Re: Refactoring; arbitrary expression in lists

2005-01-13 Thread Paul McGuire
Despite the regexp alternatives, I refuse to post a pyparsing solution to this! :) -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.3.4 for windows: float("NaN") throws exception

2005-01-13 Thread beliavsky
Tim Peters wrote: >Neither -- all Python behavior in the presence of float NaNs, infinities, or signed zeroes is a platform-dependent accident. C99 and Fortran 2003 have IEEE arithmetic. If CPython could be compiled with a C99 compiler, would it also have IEEE arithmetic? Do Python number-cruncher

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-13 Thread Jeff Shannon
Nick Coghlan wrote: def f(): a = 1 b = 2 print 1, locals() print 3, locals() using: a = 2 c = 3 print 2, locals() print 4, locals() I think the least suprising result would be: 1 {'a': 1, 'b': 2} # Outer scope 2 {'a': 2, 'c': 3} # Inner sc

Re: reference or pointer to some object?

2005-01-13 Thread Jeff Shannon
Antoon Pardon wrote: Op 2005-01-12, Jeff Shannon schreef <[EMAIL PROTECTED]>: It's also rather less necessary to use references in Python than it is in C et. al. You use nothing but references in Python, that is the reason why if you assign a mutable to a new name and modify the object through eit

Re: Free python server.

2005-01-13 Thread rootshell
Thank you very much. Arbornet.org seems to be ok Unforutnately I was convinced that I only have to only copy my *.py file to /public_hml directory and everything will be all right. As you expect I was wrong. R. -- http://mail.python.org/mailman/listinfo/python-list

Re: reference or pointer to some object?

2005-01-13 Thread Alex Martelli
Jeff Shannon <[EMAIL PROTECTED]> wrote: > Because Python uses a fundamentally different concept for variable > names than C/C++/Java (and most other static languages). In those > languages, variables can be passed by value or by reference; neither > term really applies in Python. (Or, if you

Re: Free python server.

2005-01-13 Thread Reinhold Birkenfeld
Kartic wrote: > And yes, they have python installed... Python 2.1! Reinhold -- http://mail.python.org/mailman/listinfo/python-list

Re: Refactoring; arbitrary expression in lists

2005-01-13 Thread Jeff Shannon
Stephen Thorne wrote: As for the overall efficiency concerns, I feel that talking about any of this is premature optimisation. I disagree -- using REs is adding unnecessary complication and dependency. Premature optimization is a matter of using a conceptually more-complicated method when a sim

Re: What strategy for random accession of records in massive FASTA file?

2005-01-13 Thread Jeff Shannon
Chris Lasher wrote: Given that the information content is 2 bits per character that is taking up 8 bits of storage, there must be a good reason for storing and/or transmitting them this way? I.e., it it easy to think up a count-prefixed compressed format packing 4:1 in subsequent data bytes (except

Re: [perl-python] 20050112 while statement

2005-01-13 Thread Peter Hansen
Steven Bethard wrote: Xah Lee wrote: [some Python code] Because you're posting this to newsgroups, it would be advisable to use only spaces for indentation -- tabs are removed by a lot of newsreaders, which means your Python readers are going to complain about IndentationErrors. Unfortunately, t

Re: Re Wide Unicode build for Windows available somewhere?

2005-01-13 Thread News M Claveau /Hamster-P
Hi ! See inconvcodec wrapper, at : http://cjkpython.berlios.de/ (not for Python 2.4) -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating text on images

2005-01-13 Thread morphex
Yes, something like that. I was a bit confused when it came to using truetype fonts, but that was straightforward enough (just pass font objects to the text method). :) -- http://mail.python.org/mailman/listinfo/python-list

Re: [perl-python] 20050112 while statement

2005-01-13 Thread Steven Bethard
Xah Lee wrote: # here's a while statement in python. a,b = 0,1 while b < 20: print b a,b = b,a+b --- # here's the same code in perl ($a,$b)=(0,1); while ($b<20) { print $b, "\n"; ($a,$b)= ($b, $a+$b); } Because you're posting this to newsgroups, it would be advisable to use only spaces

Re: sorted (WAS: lambda)

2005-01-13 Thread Paul Rubin
Steven Bethard <[EMAIL PROTECTED]> writes: > Note that sorted is a builtin function, not a method of a list > object. Oh, same difference. I thought it was a method because I'm not using 2.4 yet. The result is the same, other than that having it as a function instead of a method is another incon

sorted (WAS: lambda)

2005-01-13 Thread Steven Bethard
Paul Rubin wrote: That completely depends on the objects in question. Compare temp = all_posters[:] temp.sort() top_five_posters = temp[-5:] to: top_five_posters = all_posters.sorted()[-5:] which became possible only when .sorted() was added to Python 2.4. I believe you mean "when sort

Re: python 2.3.4 for windows: float("NaN") throws exception

2005-01-13 Thread Tim Peters
[EMAIL PROTECTED] > C99 and Fortran 2003 have IEEE arithmetic. Not that simple (e.g., C99 doesn't *require* it; but it has a pile of specified IEEE behaviors a conforming C99 compiler can choose to support (or not), along with a preprocessor symbol those that do so choose can #define to advertise

Re: Python.org, Website of Satan

2005-01-13 Thread Arich Chanachai
Jane wrote: "Lucas Raab" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Jane wrote: <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] python.org = 194.109.137.226 194 + 109 + 137 + 226 = 666 What is this website with such a demonic name and IP address? What ev

Re: Refactoring; arbitrary expression in lists

2005-01-13 Thread BJörn Lindqvist
> # do other non-extension-related tests here > if basename.find( "Makefile" ) != -1: > return "text/x-makefile" I believe this can be nicelier written as: if "Makefile" in basename: -- mvh Björn -- http://mail.python.org/mailman/listinfo/python-list

Re: sorted (WAS: lambda)

2005-01-13 Thread Fredrik Lundh
Paul Rubin wrote: >> Note that sorted is a builtin function, not a method of a list >> object. > > Oh, same difference. I thought it was a method because I'm not using > 2.4 yet. The result is the same nope. sorted works on any kind of sequence, including forward-only iterators. sorted(open(f

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-13 Thread Craig Ringer
On Thu, 2005-01-13 at 08:39 +, Antoon Pardon wrote: > > At best it would offer new paradigms for existing constructs (violating > > the "there should be one obvious way to do it" zen); at worst it would > > obfuscate the whole language. > > That zen is already broken. Look at the number of

Re: sorted (WAS: lambda)

2005-01-13 Thread Paul Rubin
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > > Oh, same difference. I thought it was a method because I'm not using > > 2.4 yet. The result is the same > > nope. sorted works on any kind of sequence, including forward-only > iterators. sorted(open(filename)) works just fine, for example. Oh

Re: Refactoring; arbitrary expression in lists

2005-01-13 Thread Steven Bethard
BJörn Lindqvist wrote: # do other non-extension-related tests here if basename.find( "Makefile" ) != -1: return "text/x-makefile" I believe this can be nicelier written as: if "Makefile" in basename: +1 for "nicelier" as VOTW (Vocabulation of the week) =) Steve -- http://mail.python.o

Re: finding/replacing a long binary pattern in a .bin file

2005-01-13 Thread Jeff Shannon
Bengt Richter wrote: BTW, I'm sure you could write a generator that would take a file name and oldbinstring and newbinstring as arguments, and read and yield nice os-file-system-friendly disk-sector-multiple chunks, so you could write fout = open('mynewbinfile', 'wb') for buf in updated_fil

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-13 Thread Andrey Tatarinov
Nick Coghlan wrote: Nick Coghlan wrote: Semantics - The code:: with: translates to:: def unique_name(): unique_name() I've come to the conclusion that these semantics aren't what I would expect from the construct. Exactly what I would expect can't really be expressed in cur

Re: python 2.3.4 for windows: float("NaN") throws exception

2005-01-13 Thread John Roth
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi my python 2.3.4 for windows refuse to execute line float("NaN"). It says: float("NaN") Traceback (most recent call last): File "", line 1, in ? ValueError: invalid literal for float(): NaN The same line works as expected on Linux and S

Re: counting items

2005-01-13 Thread Craig Ringer
On Wed, 2005-01-12 at 20:10 +0100, Bernhard Herzog wrote: > "It's me" <[EMAIL PROTECTED]> writes: > > > May be flatten should be build into the language somehow > > That shouldn't be necessary as it can easily be written in a single list > comprehension: > > a = [[1,2,4],4,5,[2,3]] > flat_a

Re: why are people still using classic classes?

2005-01-13 Thread Jarek Zgoda
Paul Rubin wrote: Is there a reason NOT to use them? If a classic class works fine, what incentive is there to switch to new style classes? Perhaps classic classes will eventually disappear? It just means that the formerly "classic" syntax will define a new-style class. Try to write code that w

Embedding Multiplr Python interpreter in C++

2005-01-13 Thread Yogesh Sharma
Hi, I have following setup: OS Linux Fedora Core 3 Python 2.3.4 How can I embed two python interpreters in one C++ program ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda

2005-01-13 Thread Terry Reedy
"Egor Bolonev" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > why functions created with lambda forms cannot contain statements? Because lambda was only ever intended to be an inline abbreviation of simple one-use functions whose body consists of 'return '. It is clear to me th

directory bug on linux; workaround?

2005-01-13 Thread Russell E. Owen
I stumbled across a really strange bug involving directories on linux. os.path.exists(path) can return 0 even after os.path.mkdir(path) succeeds (well after; this isn't a timing issue). For the first file, the directory did not exist, so my code created the directory (successfully) using os.pa

RE: site.here on python 2.4

2005-01-13 Thread Tony Meyer
> can we assume that, on all platforms, the old site.here is > the same as: > > >>> os.path.join(sys.prefix, 'lib', 'python%s' % sys.version[:3]) > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3' > > or is it better to use, as you suggest, > > >>> import os > >>> os.

Re: how to stop google from messing Python code

2005-01-13 Thread Terry Reedy
"Xah Lee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > i'm using groups-beta.google.com to post python code. > > Is there a way to stop google from messing with my format? it seems to > have eaten the spaces in my python code. > thanks. 1. don't post, or 2. don't use google to p

Re: Free python server.

2005-01-13 Thread Craig Ringer
On Thu, 2005-01-13 at 19:07 +0100, [EMAIL PROTECTED] wrote: > Thank you very much. > Arbornet.org seems to be ok > Unforutnately I was convinced that I only have to only copy my *.py file to > /public_hml directory and everything will be all right. Your file probably need to (a) be in the cgi-bin

Re: Refactoring; arbitrary expression in lists

2005-01-13 Thread Peter Maas
Steven Bethard schrieb: BJörn Lindqvist wrote: [...] I believe this can be nicelier written as: if "Makefile" in basename: +1 for "nicelier" as VOTW (Vocabulation of the week) =) Me too, because nicelier is nicer than more nicely. :) -- --

Re: reference or pointer to some object?

2005-01-13 Thread Torsten Mohr
Hi, > Could you give us a more concrete use case? My suspicion is that > anything complicated enough to be passed to a method to be modified will > probably be more than a simple int, float, str or tuple... In which > case, it will probably have methods to allow you to update it... yes, to be m

News Reader

2005-01-13 Thread Daniel Bowett
Is anyone reading this list through thunderbird as news? If so - how did you set it up? -- http://mail.python.org/mailman/listinfo/python-list

Re: Octal notation: severe deprecation

2005-01-13 Thread Dan Sommers
On Thu, 13 Jan 2005 09:56:15 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: > I remember using a langauge (Icon?) in which arbitrary bases up to 36 > could be used with numeric literals. IIRC, the literals had to begin > with the base in decimnal, folowed by a "b" followed by the digits of > the v

Re: News Reader

2005-01-13 Thread Robert Kern
Daniel Bowett wrote: Is anyone reading this list through thunderbird as news? If so - how did you set it up? I subscribed to comp.lang.python under my USENET news server account. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-13 Thread Terry Reedy
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Op 2005-01-13, Fredrik Lundh schreef <[EMAIL PROTECTED]>: >> Antoon Pardon wrote: >> >>> Well, it seems that Guido is wrong then. The documentation clearly >>> states that an expression is a statement. >> >> no, it says

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-13 Thread Bengt Richter
On Thu, 13 Jan 2005 22:41:54 +0300, Andrey Tatarinov <[EMAIL PROTECTED]> wrote: >Nick Coghlan wrote: >> Nick Coghlan wrote: >> >>> Semantics >>> - >>> The code:: >>> >>> with: >>> >>> >>> translates to:: >>> >>> def unique_name(): >>> >>> >>> unique_name() >> I've come to t

Re: News Reader

2005-01-13 Thread Robert Kern
Robert Kern wrote: Daniel Bowett wrote: Is anyone reading this list through thunderbird as news? If so - how did you set it up? I subscribed to comp.lang.python under my USENET news server account. I guess I should add that that's all I did. There's nothing special to set up. -- Robert Kern [EM

Re: sorted (WAS: lambda)

2005-01-13 Thread Terry Reedy
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message news:[EMAIL PROTECTED] > Steven Bethard <[EMAIL PROTECTED]> writes: >> Note that sorted is a builtin function, not a method of a list >> object. > > Oh, same difference. I thought it was a method because I'm not using > 2.4 yet. The

Re: Newbie: Pythonwin

2005-01-13 Thread Brent W. Hughes
Thanks guys! That helps a lot. Brent -- http://mail.python.org/mailman/listinfo/python-list

Re: why not datetime.strptime() ?

2005-01-13 Thread josh
On Thu, Jan 13, 2005 at 08:06:56AM -0600, Skip Montanaro wrote: > > Skip> I just checked in your changes. Thanks for the effort. > > Jeez Skip... That reads poorly. How about "Thanks for your contribution"? > In any case, thanks. My pleasure. Thanks for helping me to help. And I liked the

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-13 Thread Paul Rubin
"Terry Reedy" <[EMAIL PROTECTED]> writes: > >>> Well, it seems that Guido is wrong then. The documentation clearly > >>> states that an expression is a statement. > >> > >> no, it says that an expression statement is a statement. if you don't > >> understand the difference, please *plonk* yourself

Re: reference or pointer to some object?

2005-01-13 Thread Jeff Shannon
Torsten Mohr wrote: But i think my understanding was wrong (though it is not yet clear). If i hand over a large string to a function and the function had the possibility to change it, wouldn't that mean that it is necessary to hand over a _copy_ of the string? Else, how could it be immutable? Anyt

Re: How to install pyparallel

2005-01-13 Thread Michel LE VAN KIEM
The ppdev module is loaded and the lp module is unloaded, but I still have the error message. I used 'lsmod | grep ppdev' to check it. Is it necessary to plug the parallel cable ? Peter Hansen a écrit : Michel LE VAN KIEM wrote: I'm trying to install the pyparallel module for my Python 2.3.4 (run

how to control the mouse pointer with python?

2005-01-13 Thread oglycans
Hi. Anybody know a way to control the mouse pointer (move it around and click on things) using python? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: pyPgSQL giving error!

2005-01-13 Thread Harald Massa
> I am using Redhat 9.0/python2.3. I installed pyPgSQL-2.4.tar.gz and it > was successfull. Now when I am trying to import that module, I got: > Type "help", "copyright", "credits" or "license" for more information. from pyPgSQL import PgSQL > Traceback (most recent call last): > File "", li

Re: What strategy for random accession of records in massive FASTA file?

2005-01-13 Thread Chris Lasher
>And besides, for long-term archiving purposes, I'd expect that zip et >al on a character-stream would provide significantly better >compression than a 4:1 packed format, and that zipping the packed >format wouldn't be all that much more efficient than zipping the >character stream. This 105MB FAS

Dabo Windows Runtime 0.3 Available

2005-01-13 Thread Ed Leafe
For all of you who have been curious about Dabo, but who don't want to go through the work of installing Python, wxPython, MySQLdb, etc., on your machines, I'm pleased to announce the release of the Dabo Runtime for Windows v. 0.3. The Dabo Runtime comes in the form of a standard Windows Inst

win32net help

2005-01-13 Thread Shin
Hi all, I'm new to the python language and I'm having trouble. I'm writing a basic chat script...real basic. It's client-server based and I'm wanting the roles to change -- client becomes server and vice versa. The problem is when I do this, the server switches to the client no problem. How

Re: How to install pyparallel

2005-01-13 Thread Michel LE VAN KIEM
The complete error message is : >>> import parallel /usr/lib/python2.3/site-packages/parallel/parallelppdev.py:32: FutureWarning: x< /usr/lib/python2.3/site-packages/parallel/parallelppdev.py:33: FutureWarning: x< >>> p=parallel.Parallel() File "", line 1, in ? File "/usr/lib/python2.3/site-pack

Re: reference or pointer to some object?

2005-01-13 Thread Reinhold Birkenfeld
Torsten Mohr wrote: > Hi, > >> Could you give us a more concrete use case? My suspicion is that >> anything complicated enough to be passed to a method to be modified will >> probably be more than a simple int, float, str or tuple... In which >> case, it will probably have methods to allow you t

Re: News Reader

2005-01-13 Thread Peter Hansen
Robert Kern wrote: Robert Kern wrote: Daniel Bowett wrote: Is anyone reading this list through thunderbird as news? If so - how did you set it up? I subscribed to comp.lang.python under my USENET news server account. I guess I should add that that's all I did. There's nothing special to set up. H

Re: Octal notation: severe deprecation

2005-01-13 Thread Leif K-Brooks
Tim Roberts wrote: Stephen Thorne <[EMAIL PROTECTED]> wrote: I would actually like to see pychecker pick up conceptual errors like this: import datetime datetime.datetime(2005, 04,04) Why is that a conceptual error? Syntactically, this could be a valid call to a function. Even if you have parsed

Pygtk: How to remove title bar from a window

2005-01-13 Thread Nick Atkins
Hi all, I am writing an application using pyGTK that has several pop-up dialogs that show and hide in succession. I would like to prevent the user from closing the dialog and if possible I'd like to use a "title bar-less" window with a normal border so the X is not even available to click. Is

Re: how to control the mouse pointer with python?

2005-01-13 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote: Anybody know a way to control the mouse pointer (move it around and click on things) using python? It depends on your operating system. For Windows, you'll want to use a Python module to access the Win32 API. The relevant API function is documented at http://tinyurl.com/j

Re: News Reader

2005-01-13 Thread Daniel Bowett
OK, ask a stupid question I wasn't aware I needed a Usenet account. It's simple when you know how. Peter Hansen wrote: Robert Kern wrote: Robert Kern wrote: Daniel Bowett wrote: Is anyone reading this list through thunderbird as news? If so - how did you set it up? I subscribed to comp.lang

Re: how to control the mouse pointer with python?

2005-01-13 Thread oglycans
Sorry, I should have mentioned it's linux (debian). Thanks. > It depends on your operating system. -- http://mail.python.org/mailman/listinfo/python-list

RE: sorted (WAS: lambda)

2005-01-13 Thread Delaney, Timothy C (Timothy)
Terry Reedy wrote: > No, not same difference. A list method would only operate on lists, > as is true of all list methods. Being a function lets it work for > any iterable, as is true of any function of iterable. Big > difference. And consistent. One could argue though that it should > have be

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-13 Thread Bengt Richter
On Fri, 14 Jan 2005 01:48:48 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >Nick Coghlan wrote: >> Semantics >> - >> The code:: >> >> with: >> >> >> translates to:: >> >> def unique_name(): >> >> >> unique_name() > >I've come to the conclusion that these semantics aren't

Re: how to control the mouse pointer with python?

2005-01-13 Thread Grant Edwards
On 2005-01-13, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Sorry, I should have mentioned it's linux (debian). > Thanks. What environment? Console? X11? MGR? ??? -- Grant Edwards grante Yow! My ELBOW is a remote at

Re: Unicode conversion in 'print'

2005-01-13 Thread Serge Orlov
Ricardo Bugalho wrote: > Hello, > I'm using Python 2.3.4 and I noticed that, when stdout is a terminal, > the 'print' statement converts Unicode strings into the encoding > defined by the locales instead of the one returned by > sys.getdefaultencoding(). Sure. It uses the encoding of you console.

Re: News Reader

2005-01-13 Thread Evan Simpson
Daniel Bowett wrote: OK, ask a stupid question I wasn't aware I needed a Usenet account. ...and if you don't have one, like me, there's always GMane (http://www.gmane.org/, nntp://news.gmane.org/). Cheers, Evan @ 4-am -- http://mail.python.org/mailman/listinfo/python-list

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-13 Thread Fredrik Lundh
Paul Rubin wrote: > Huh? Expressions are not statements except when they're "expression > statements"? What kind of expression is not an expression statement? any expression that is used in a content that is not an expression statement, of course. reading the python language reference should h

Re: newbie ?s

2005-01-13 Thread Paul Rubin
"Venkat B" <[EMAIL PROTECTED]> writes: > I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on > Linux. > It is to handle ~25 hits possibly arriving "at once". Content is non-static > and built by the execution of py cgi-scripts talking to a few backend > processes. > > 1) I

Pyrex-0.9.3: definition mismatch with distutils of Python24

2005-01-13 Thread Martin Bless
Now that I've got my extension building machine using the VC++ Toolkit 2003 up and running I'm keen on using Pyrex (Pyrex-0.9.3, Python-2.4.0). But the definition of the swig_sources() method seems to have changed. When I try to build the examples from Pyrex I get a TypeError: c:\Pyrex-0.9.3\De

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-13 Thread Bengt Richter
On Thu, 13 Jan 2005 09:29:49 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >Fredrik Lundh wrote: > >> Antoon Pardon wrote: >> >> >>>Well, it seems that Guido is wrong then. The documentation clearly >>>states that an expression is a statement. >> >> >> no, it says that an expression statement

Re: how to control the mouse pointer with python?

2005-01-13 Thread oglycans
>What environment? It's X. -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Multiplr Python interpreter in C++

2005-01-13 Thread Yogesh Sharma
one more question to add: Is there a way to have 2 local copies of python interpreter ? Yogesh Sharma wrote: Hi, I have following setup: OS Linux Fedora Core 3 Python 2.3.4 How can I embed two python interpreters in one C++ program ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Octal notation: severe deprecation

2005-01-13 Thread Bengt Richter
On Thu, 13 Jan 2005 08:18:25 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> In Mythical Future Python I would like to be able to use any base in >> integer literals, which would be better. Example random syntax: >> >> flags= 2x00011010101001 >> umask= 8x664 >> answer=

Re: newbie ?s

2005-01-13 Thread Peter Hansen
Venkat B wrote: Hi folks, I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on Linux. It is to handle ~25 hits possibly arriving "at once". Content is non-static and built by the execution of py cgi-scripts talking to a few backend processes. Twisted? I'm not sure what, if a

Re: newbie ?s

2005-01-13 Thread Venkat B
> > 1) I was wondering if anyone has opinions on the ability of CGIHTTPServer (a > > forking variant) to be able to handle this. > > Why not use apache? Wanted something with less footprint. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python.org, Website of Satan

2005-01-13 Thread Lucas Raab
Arich Chanachai wrote: Jane wrote: "Lucas Raab" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Jane wrote: <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] python.org = 194.109.137.226 194 + 109 + 137 + 226 = 666 What is this website with such a demonic name and

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-13 Thread Fredrik Lundh
Bengt Richter wrote: > Hm, that makes me wonder, is there an intermediate "returning of value" in >x = y = z = 123 > ? no. that statement evaluates the expression (123 in this case), and assigns the result (the integer object 123) to each target (x, y, z), in order. or to quote the languag

newbie ?s

2005-01-13 Thread Venkat B
Hi folks, I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on Linux. It is to handle ~25 hits possibly arriving "at once". Content is non-static and built by the execution of py cgi-scripts talking to a few backend processes. 1) I was wondering if anyone has opinions on th

Re: XPath and XQuery in Python?

2005-01-13 Thread John Lenton
On Wed, Jan 12, 2005 at 12:09:58AM +, Nelson Minar wrote: > Could someone help me get started using XPath or XQuery in Python? I'm > overwhelmed by all the various options and am lacking guidance on what > the simplest way to go is. What library do I need to enable three line > Python programs

Re: [perl-python] 20050112 while statement

2005-01-13 Thread Abigail
Xah Lee ([EMAIL PROTECTED]) wrote on CLIII September MCMXCIII in news:[EMAIL PROTECTED]>: .. # here's a while statement in python. .. .. a,b = 0,1 .. while b < 20: .. print b IndentationError: expected an indented block .. a,b = b,a+b You have already proven you don't know Perl, but

Re: Octal notation: severe deprecation

2005-01-13 Thread Jeff Epler
On Thu, Jan 13, 2005 at 11:04:21PM +, Bengt Richter wrote: > One way to do it consistently is to have a sign digit as the first > digit after the x, which is either 0 or base-1 -- e.g., +3 and -3 would be > > 2x011 2x101 > 8x03 8x75 > 16x03 16xfd > 10x03 10x97 ... so that 0x8

Re: python and macros (again) [Was: python3: 'where' keyword]

2005-01-13 Thread Paul Rubin
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > > Huh? Expressions are not statements except when they're "expression > > statements"? What kind of expression is not an expression statement? > > any expression that is used in a content that is not an expression statement, > of course. Come on, th

Re: Pygtk: How to remove title bar from a window

2005-01-13 Thread Diez B. Roggisch
Nick Atkins wrote: > Hi all, > > I am writing an application using pyGTK that has several pop-up dialogs > that show and hide in succession. I would like to prevent the user > from closing the dialog and if possible I'd like to use a "title > bar-less" window with a normal border so the X is n

Re: directory bug on linux; workaround?

2005-01-13 Thread Jeff Epler
Python is at the whim of the services the OS provides. Maybe you should ask in a linux-related newsgroup or mailing list, they might know more about the specifics of both detecting and working around "weird" filesystems like "fat". To find the type of a filesystem, Linux provides the statfs(2) fu

Re: [perl-python] 20050112 while statement

2005-01-13 Thread Charlton Wilbur
> "b" == brianr <[EMAIL PROTECTED]> writes: b> (As a matter of interest, is this sequence of posts intended to b> demonstrate ignorance of both languages, or just one?) Intentional fallacy -- there's no necessary correlation between what he *intends* to do and what he actually succee

Re: directory bug on linux; workaround?

2005-01-13 Thread John Lenton
On Thu, Jan 13, 2005 at 12:07:04PM -0800, Russell E. Owen wrote: > I stumbled across a really strange bug involving directories on linux. > > os.path.exists(path) can return 0 even after os.path.mkdir(path) > succeeds (well after; this isn't a timing issue). > > For the first file, the directory

Re: newbie q

2005-01-13 Thread Bengt Richter
On Thu, 13 Jan 2005 09:16:40 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: [...] > >Any statement of the form > > for i in [x for x in something]: > >can be rewritten as > > for i in something: > >Note that this doesn't mean you never want to iterate over a list >comprehension. It's the e

Re: how to control the mouse pointer with python?

2005-01-13 Thread John Lenton
On Thu, Jan 13, 2005 at 01:07:18PM -0800, [EMAIL PROTECTED] wrote: > Hi. > Anybody know a way to control the mouse pointer > (move it around and click on things) using python? in X11, you could use Xlib to do so. In debian unstable, that's "apt-get install python-xlib{,-doc}", and start reading.

Re: how to control the mouse pointer with python?

2005-01-13 Thread Tomasz Rola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13 Jan 2005 [EMAIL PROTECTED] wrote: > >What environment? > > It's X. So, for X under Debian, try: apt-get install xwit man xwit It's not python, but you can either use xwit command or read the source code and get knowlegde from it. (hint: -war

Re: What strategy for random accession of records in massive FASTA file?

2005-01-13 Thread Jeff Shannon
Chris Lasher wrote: And besides, for long-term archiving purposes, I'd expect that zip et al on a character-stream would provide significantly better compression than a 4:1 packed format, and that zipping the packed format wouldn't be all that much more efficient than zipping the character stream.

Re: What strategy for random accession of records in massive FASTA file?

2005-01-13 Thread Robert Kern
Jeff Shannon wrote: (Plus, if this format might be used for RNA sequences as well as DNA sequences, you've got at least a fifth base to represent, which means you need at least three bits per base, which means only two bases per byte (or else base-encodings split across byte-boundaries) That

Re: finding/replacing a long binary pattern in a .bin file

2005-01-13 Thread Bengt Richter
On Thu, 13 Jan 2005 11:40:52 -0800, Jeff Shannon <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >> BTW, I'm sure you could write a generator that would take a file name >> and oldbinstring and newbinstring as arguments, and read and yield nice >> os-file-system-friendly disk-sector-multiple ch

Re: Pygtk: How to remove title bar from a window

2005-01-13 Thread Nick Atkins
Thanks for the reply Diez. I'm not sure I can draw a border on its own with pyGTK but admittedly I am not yet an expert. I have the following minimal test program which opens a window and I cannot get it to draw a window with no title bar, just a border: #!/usr/bin/env python import pygtk pygtk.

porting C code

2005-01-13 Thread Lucas Raab
I am currently in the process of porting some C code into Python and am stuck. I don't claim to be the greatest C/C++ programmer; in fact, my skills at C are rudimentary at best. My question is I have the statement: "typedef unsigned long int word32" and later on: "word32 b[3]" referencing t

Re: porting C code

2005-01-13 Thread Steven Bethard
Lucas Raab wrote: I am currently in the process of porting some C code into Python and am stuck. I don't claim to be the greatest C/C++ programmer; in fact, my skills at C are rudimentary at best. My question is I have the statement: "typedef unsigned long int word32" and later on: "word32 b

<    1   2   3   >