Re: Class initialization from a dictionary, how best?

2005-01-13 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: t2 = Test(dictionary.get('a'), dictionary.get('b'), dictionary.get('c')) print t2 Try this: t2 = Test(**dictionary) This performs keyword argument expansion on the dictionary, matching the dictionary entries with the named arguments to the Test.__init__ function. Cheers,

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

2005-01-13 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > So, precisely how should one go about cleanly embedding something that > cares about whitespace into a context which doesn't care in the > slightest? Treat the macro like a function call whose arguments are thunks made from the macro arguments, or somethi

test

2005-01-13 Thread yuzx
test -- http://mail.python.org/mailman/listinfo/python-list

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

2005-01-13 Thread Nick Coghlan
Paul Rubin wrote: Come on, that is vacuous. The claim was "expressions are not statements". But it turns out that expressions ARE statements. The explanation is "well, that's because they're expression statements". And there is no obvious case of an expression that can't be used as a statement.

Re: Unclear On Class Variables

2005-01-13 Thread Pierre Barbier de Reuille
Antoon Pardon a écrit : Well I find this a confusing behaviour on python's part. The fact that instance.field can mean something different, depending on where in a statement you find it, makes the behaviour inconsistent. I know people in general here are against declarations, but declarations could

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

2005-01-13 Thread Nick Coghlan
Bengt Richter wrote: Problems? (Besides NIH, which I struggle with regularly, and had to overcome to accept Tim's starting point in this ;-) The ideas regarding creating blocks whose name bindings affect a different scope are certainly interesting (and relevant to the 'using' out-of-order executi

Re: Octal notation: severe deprecation

2005-01-13 Thread Bengt Richter
On Thu, 13 Jan 2005 17:43:01 -0600, Jeff Epler <[EMAIL PROTECTED]> wrote: > >--LQksG6bCIzRHxTLp >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >On Thu, Jan 13, 2005 at 11:04:21PM +, Bengt Richter wrote: >> One way to do i

Re: Python.org, Website of Satan

2005-01-13 Thread Peter Renzland
In <[EMAIL PROTECTED]> On 2005-01-12 [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > python.org = 194.109.137.226 > > 194 + 109 + 137 + 226 = 666 > > What is this website with such a demonic name and IP address? What > evils are the programmers who use this language up to? What is the simplest/fa

Re: reference or pointer to some object?

2005-01-13 Thread Torsten Mohr
Hi, thank you all for your explanations. That's really great and helps me a lot. Thanks, Torsten. -- http://mail.python.org/mailman/listinfo/python-list

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

2005-01-13 Thread John Lenton
On Thu, Jan 13, 2005 at 12:19:49AM +0100, Fredrik Lundh wrote: > Chris Lasher wrote: > > > Since the file I'm working with contains tens of thousands of these > > records, I believe I need to find a way to hash this file such that I > > can retrieve the respective sequence more quickly than I coul

Re: Pickled text file causing ValueError (dos/unix issue)

2005-01-13 Thread Paul Rubin
Open the file on windows for writing with "wb" mode, the b is for binary. -- http://mail.python.org/mailman/listinfo/python-list

Pickled text file causing ValueError (dos/unix issue)

2005-01-13 Thread Aki Niimura
Hello everyone, I started to use pickle to store the latest user settings for the tool I wrote. It writes out a pickled text file when it terminates and it restores the settings when it starts. It worked very nicely. However, I got a ValueError when I started the tool from Unix when I previously

import problems *newbie*

2005-01-13 Thread mike kreiner
I am having trouble importing a module I created. I'm running PythonWin on Windows XP if that helps. I saved my module in a folder called my_scripts in the site-packages directory. I edited the python path to include the my_scripts folder (it now reads C:\Python23\Lib;C:\Python23\DLLs;C:\Python23\L

Interesting gDeskCal

2005-01-13 Thread none
I found that gDeskCal is also written in Python. So if I have a theme used by gDesklets, how can I make the whole thing standalone so that it can be similar to the case of gDeskCal?? -- http://mail.python.org/mailman/listinfo/python-list

Re: a ConfigParser wtf moment

2005-01-13 Thread grahamd
True, wasn't thinking. This will affect get() as well. My problem was a slightly different problem. In your case you would have got what you wanted if get()/items() instead of being implemented as: .try: .value = d[option] .except KeyError: .raise NoOptionE

Re: pyPgSQL giving error!

2005-01-13 Thread Gurpreet Sachdeva
And now when I did... cd /usr/local/lib/python2.3/site-packages/pyPgSQL/libpq/ [EMAIL PROTECTED] libpq]# python __init__.py Traceback (most recent call last): File "__init__.py", line 23, in ? from libpq import * ImportError: ./libpqmodule.so: undefined symbol: PyUnicodeUCS2_EncodeDecimal

Re: pyPgSQL giving error!

2005-01-13 Thread Gurpreet Sachdeva
> did you really do ./configure, make and make install? No, I did python setup.py build and python setup.py install > where is libpq.* linpq is there in /usr/lib/python2.3/site-packages/pyPgSQL/ > was a postgres installation present while doing ./configure et all? No, But I installed postgresql-

Class initialization from a dictionary, how best?

2005-01-13 Thread [EMAIL PROTECTED]
# # My problem is that I want to create a # class, but the variables aren't known # all at once. So, I use a dictionary to # store the values in temporarily. # Then when I have a complete set, I want to # init a class from that dictionary. # However, I don't want to specify the # dictionary gets by

file uploading via urllib2 (multipart/form-data)

2005-01-13 Thread Clark C. Evans
Hello. I was wondering if anyone has built a module that works with urllib2 to upload file content via POST multipart/form-data. I'm aware of ASPN 146306, however, I need to use urllib2 beacuse I'm using HTTP Digest over SSL. Cheers, Clark -- http://mail.python.org/mailman/listinfo/python-list

Re: a ConfigParser wtf moment

2005-01-13 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: To avoid this, you need to write something like: . list = [] . for key in configuration.options("core"): . list.append((key,configuration.get("core",substitution)) . print list This cause me problems for a different reason, ie., that user vars keys appear in what ite

Re: a ConfigParser wtf moment

2005-01-13 Thread grahamd
Sort of hard to explain, but if you put another: list = configuration.items("core") print list at the end of the script, you will find that the original config hasn't been changed. It is a quirk of how the items() method is implemented using 'yield' that means that you see what you do. In partic

Re: Pyrex-0.9.3: definition mismatch with distutils of Python24

2005-01-13 Thread David M. Cooke
[EMAIL PROTECTED] (Martin Bless) writes: > 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 exam

a ConfigParser wtf moment

2005-01-13 Thread Eric S. Johansson
I'm not sure if this is a real problem or if I have been staring at code too long. given this code #!/usr/bin/python from ConfigParser import * configuration_file = "test.conf" substitution = {"xyzzy":"maze"} configuration = SafeConfigParser() configuration.readfp(file(configuration_file)) list

Re: newbie ?s

2005-01-13 Thread Larry Bates
You should probably take a look at: http://www.amk.ca/python/code/medusa Larry Bates Syscon, Inc. 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 th

Re: Unicode conversion in 'print'

2005-01-13 Thread Ricardo Bugalho
Hi, thanks for the information. But what I was really looking for was informaion on when and why Python started doing it (previously, it always used sys.getdefaultencoding())) and why it was done only for 'print' when stdout is a terminal instead of always. On Thu, 13 Jan 2005 14:33:20 -0800, Se

Re: Python.org, Website of Satan

2005-01-13 Thread Dan Bishop
DogWalker wrote: > "Luis M. Gonzalez" <[EMAIL PROTECTED]> said: > > >[EMAIL PROTECTED] wrote: > >> python.org = 194.109.137.226 > >> > >> 194 + 109 + 137 + 226 = 666 > >> > >> What is this website with such a demonic name and IP address? What > >> evils are the programmers who use this language up

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

2005-01-13 Thread rbt
Nick Craig-Wood wrote: > Alex Stapleton <[EMAIL PROTECTED]> wrote: >> Whenever I run python I get >> >> "Warning! you are running an untested version of Python." >> >> prepended to the start of any output on stdout. >> >> This is with Debian and python 2.3 (running the debian 2.1 and 2.2 >>

Re: Gecko bindings for Python?

2005-01-13 Thread Cordula's Web
Yes, that's exactly what I needed! Thanks alot! -cpghost. -- Cordula's Web. http://www.cordula.ws/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: module structure and import question

2005-01-13 Thread Rob Emmons
> hi all, > i have question on how to design a module structure. > for example, i have 3 files. > [somewhere]/main.py > [somewhere]/myLib/Base/BaseA.py > [somewhere]/myLib/ClassA.py > > . > It's fine when i run main.py. > however when i run ClassA.py individually, it would fail in import >

Re: porting C code

2005-01-13 Thread Peter Hansen
Peter Hansen wrote: but merely a "b[3]" reference somewhere, it would be referencing the third element of an array called "b", which is possibly a byte, "*Fourth* element... I'll come in again. Amongst our elements..." -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: how to stop google from messing Python code

2005-01-13 Thread Xah Lee
gmane is great! its renaming of newsgroups is quite a headache. i found that comp.lang.python corresponds to gmane.comp.python.general. do you know which one corresponds to comp.lang.perl.misc? there's no .misc or .general... -- i thought there a strick like preceding a line by -- or something tha

query python env

2005-01-13 Thread David Bear
How does one query the python environment, ie pythonhome, pythonpath, etc. also, are there any HOWTO's on keeping multiple versions of python happy? -- http://mail.python.org/mailman/listinfo/python-list

Re: porting C code

2005-01-13 Thread Peter Hansen
Lucas Raab wrote: I have the statement: "typedef unsigned long int word32" and later on: "word32 b[3]" referencing the third bit of the integer. If that's really exactly what you have, then you actually have something defining an array of three unsigned long integers named "b". And even if y

Re: porting C code

2005-01-13 Thread Roy Smith
Lucas Raab <[EMAIL PROTECTED]> 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 word

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

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: 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.

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: 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: 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: 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: 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: 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: 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: [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 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: 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: 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: 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: [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: 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

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: 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

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: 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: 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: 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: 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: 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: 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

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: 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

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: 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: 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: 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: 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: 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: 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: 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 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

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: 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

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: 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: 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

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

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

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

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

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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

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: 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

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: 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: 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: 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.

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: 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

  1   2   3   >