Re: Grouping pairs - suggested tools

2010-09-20 Thread Ian Kelly
On Tue, Sep 21, 2010 at 12:19 AM, Alf P. Steinbach /Usenet < alf.p.steinbach+use...@gmail.com >wrote: > Uhm, thinking about it (it must have been my unconscious mind doing the > work, it just popped into my head), if you first sort each individual > equivalence relation so that you never have e.g.

Re: Grouping pairs - suggested tools

2010-09-20 Thread Alf P. Steinbach /Usenet
* Alf P. Steinbach /Usenet, on 21.09.2010 01:09: * Astley Le Jasper, on 20.09.2010 23:42: I have a list of tuples that indicate a relationship, ie a is related to b, b is related to c etc etc. What I want to do is cluster these relationships into groups. An item will only be associated with a si

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread Seebs
On 2010-09-21, Steven D'Aprano wrote: > Yes, I know that. I sympathized with your experience and explicitly said > I was talking about "generic you". Hah! Then it was *I* who wasn't reading carefully enough! I bet you didn't expect *THAT*! -s -- Copyright 2010, all wrongs reversed. Peter Se

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread Steven D'Aprano
On Tue, 21 Sep 2010 05:11:37 +, Seebs wrote: > On 2010-09-21, Steven D'Aprano > wrote: >> On Tue, 21 Sep 2010 03:01:53 +, Seebs wrote: >>> On 2010-09-21, geremy condra wrote: Then I posted >>> a question on an IRC channel. I had done a ton of searching already, >>> and I started by expl

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread Seebs
On 2010-09-21, Steven D'Aprano wrote: > On Tue, 21 Sep 2010 03:01:53 +, Seebs wrote: >> On 2010-09-21, geremy condra wrote: >> Then I posted a question on an IRC channel. I had done a ton of >> searching already, and I started by explaining the top three >> near-solutions I'd found and why e

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread Steven D'Aprano
On Tue, 21 Sep 2010 03:01:53 +, Seebs wrote: > On 2010-09-21, geremy condra wrote: >> I use them when I want to conceal the target of the link. Usually here >> that just means its a letmegooglethatforyou.com link, which I find more >> amusing than is probably healthy. > > I thought the idea

Re: re and locale/unicode

2010-09-20 Thread MRAB
On 21/09/2010 04:21, Jerry Fleming wrote: Hi, Having the following python code: import locale import re locale.setlocale(locale.LC_ALL, 'zh_CN.utf8') re.findall('(?uL)\s+', u'\u2001\u3000\x20', re.U|re.L) re.findall('\s+', u'\u2001\u3000\x20', re.U|re.L) re.findall('(?uL)\s+', u'\u2001\u3000\

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread geremy condra
On Mon, Sep 20, 2010 at 8:01 PM, Seebs wrote: > On 2010-09-21, geremy condra wrote: >> I use them when I want to conceal the target of the link. Usually here >> that just means its a letmegooglethatforyou.com link, which I find >> more amusing than is probably healthy. > > I thought the idea was

re and locale/unicode

2010-09-20 Thread Jerry Fleming
Hi, Having the following python code: import locale import re locale.setlocale(locale.LC_ALL, 'zh_CN.utf8') re.findall('(?uL)\s+', u'\u2001\u3000\x20', re.U|re.L) re.findall('\s+', u'\u2001\u3000\x20', re.U|re.L) re.findall('(?uL)\s+', u'\u2001\u3000\x20') I was wondering why doesn't it find

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread geremy condra
On Mon, Sep 20, 2010 at 7:55 PM, Lawrence D'Oliveiro wrote: > In message , geremy > condra wrote: > >> Usually here that just means its a letmegooglethatforyou.com link, which I >> find more amusing than is probably healthy. > > Why hold back, I also use fuckinggoogleit.com. :) Yeah, I need to st

Re: Down with tinyurl!

2010-09-20 Thread John Bokma
Seebs writes: > And this caused me to realize just how amazingly insulting that can be when > done to someone who *did* already do the research. Exactly. I hate lmgtfy links hidden in a tiny url. It's not only insulting to the OP but also to people who try to learn something and end up on a goog

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread Seebs
On 2010-09-21, geremy condra wrote: > I use them when I want to conceal the target of the link. Usually here > that just means its a letmegooglethatforyou.com link, which I find > more amusing than is probably healthy. I thought the idea was funny at first. Then I posted a question on an IRC cha

Re: Down with tinyurl!

2010-09-20 Thread John Bokma
Tim Chase writes: > On 09/20/10 20:12, John Bokma wrote: >> Steven D'Aprano writes: >>> On Mon, 20 Sep 2010 17:25:09 +, Tim Harig wrote: Usernet users also have the right to use the X-No-Archive header field. >>> >>> They do? Is that right enshrined by law somewhere? Can I go to jail fo

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread Lawrence D'Oliveiro
In message , geremy condra wrote: > Usually here that just means its a letmegooglethatforyou.com link, which I > find more amusing than is probably healthy. Why hold back, I also use fuckinggoogleit.com. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.normcase rationale?

2010-09-20 Thread Ethan Furman
Steven D'Aprano wrote: On Mon, 20 Sep 2010 19:45:37 +0100, Chris Withers wrote: Well, no, that doesn't feel right. Normalisation of case, for me, means "give me the case as the filesystem thinks it should be", What do you mean "the filesystem"? Well, if it were me, it would be either the

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread geremy condra
On Mon, Sep 20, 2010 at 6:55 PM, Lie Ryan wrote: > On 09/20/10 19:59, Tim Harig wrote: >> On 2010-09-20, Steven D'Aprano wrote: >>> On Mon, 20 Sep 2010 05:46:38 +, Tim Harig wrote: >>> > I'm not particularly convinced that these are *significant* complaints > about URL-shorteners.  Bu

Re: Down with tinyurl! (was Re: importing excel data into a pythonmatrix?)

2010-09-20 Thread Lie Ryan
On 09/20/10 19:59, Tim Harig wrote: > On 2010-09-20, Steven D'Aprano wrote: >> On Mon, 20 Sep 2010 05:46:38 +, Tim Harig wrote: >> I'm not particularly convinced that these are *significant* complaints about URL-shorteners. But I will say, of the last couple hundred links I've

Re: Down with tinyurl!

2010-09-20 Thread Tim Chase
On 09/20/10 20:12, John Bokma wrote: Steven D'Aprano writes: On Mon, 20 Sep 2010 17:25:09 +, Tim Harig wrote: Usernet users also have the right to use the X-No-Archive header field. They do? Is that right enshrined by law somewhere? Can I go to jail for human rights abuses if I archive X

Re: Too much code - slicing

2010-09-20 Thread Lie Ryan
On 09/19/10 17:31, Seebs wrote: > Basically, think of what happens as I read each symbol: > > x = x + 1 if condition else x - 1 > > Up through the '1', I have a perfectly ordinary assignment of a value. > The, suddenly, it retroactively turns out that I have misunderstood > everything

Executing wctp script in python 2.7 for windows.

2010-09-20 Thread Nandy
Ok, it could be that im exhausted but I cant figure out how to execute this script in python2.7 for windows. The short: I got the file from here: http://sourceforge.net/projects/wctpxml-python/files/ and I want to execute it to send a text to my att pager using wctp via port 80. I have a commercia

Re: Learning inheritance

2010-09-20 Thread alex23
Bruno Desthuilliers wrote: > alex23 a écrit : > > Python only actually executes a module the first time it's imported, > > Beware of multithreading and modules imported under different names... > There can be issues with both in some web frameowrks. Good points, Bruno, thank you. Niklasro, a goo

Re: Down with tinyurl!

2010-09-20 Thread John Bokma
Steven D'Aprano writes: > On Mon, 20 Sep 2010 17:25:09 +, Tim Harig wrote: > >>> And as a datapoint on the topic of archiving, I search usenet archives >>> regularly when faced with a problem. >> >> Usernet users also have the right to use the X-No-Archive header field. > > They do? Is that

Re: Combinations or Permutations

2010-09-20 Thread Chris Kaynor
One of the advantages of using itertools is that it is written in C rather than Python (at least for CPython) and thus should run significantly faster than a pure Python implementation. Chris On Mon, Sep 20, 2010 at 4:21 PM, Dave Angel wrote: > On 2:59 PM, Seth Leija wrote: > >> I need to kno

Re: Too much code - slicing

2010-09-20 Thread John Bokma
Terry Reedy writes: >> On 09/19/2010 10:32 PM, John Bokma wrote: > >>> the spoiler. Do you fast forward movies as well? > > I sometimes watch movies (or parts thereof) on 1.5x, especially if it > has a lot of 'filler' scenes. But only when my wife is not watching, > as she hates it. Heh, my ques

Re: Too much code - slicing

2010-09-20 Thread Seebs
On 2010-09-21, Steven D'Aprano wrote: > On Mon, 20 Sep 2010 19:28:49 +0200, Antoon Pardon wrote: >> Not necessarily. Some of us have the impression that Guido deliberatly >> chose an ugly format for the ternary operator. > If he did, then he must have changed his mind, because there is nothing >

Re: Too much code - slicing

2010-09-20 Thread Gregory Ewing
AK wrote: One definite advantage would be that if, say, it takes you 70 pages of a given novel to figure out whether you like it enough to continue, If there was that much doubt, I would give up long before reaching the 70 page mark, regardless of reading speed. If I'm not hooked by the first

Re: os.path.normcase rationale?

2010-09-20 Thread Ben Finney
Chris Withers writes: > What I expected it to mean was "give me what the filesystem thinks > this file path is", which doesn't seem unreasonable and would be a lot > more useful, no matter the platform... Two problems with that. One is that the entry specified by the path may not exist on the f

Re: Down with tinyurl! (was Re: importing excel data into a python matrix?)

2010-09-20 Thread Steven D'Aprano
On Mon, 20 Sep 2010 17:25:09 +, Tim Harig wrote: >> And as a datapoint on the topic of archiving, I search usenet archives >> regularly when faced with a problem. > > Usernet users also have the right to use the X-No-Archive header field. They do? Is that right enshrined by law somewhere? Ca

Re: Too much code - slicing

2010-09-20 Thread Steven D'Aprano
On Mon, 20 Sep 2010 19:28:49 +0200, Antoon Pardon wrote: > Not necessarily. Some of us have the impression that Guido deliberatly > chose an ugly format for the ternary operator. If he did, then he must have changed his mind, because there is nothing ugly about the ternary operator we ended up w

Re: os.path.normcase rationale?

2010-09-20 Thread Steven D'Aprano
On Mon, 20 Sep 2010 19:45:37 +0100, Chris Withers wrote: > Well, no, that doesn't feel right. Normalisation of case, for me, means > "give me the case as the filesystem thinks it should be", What do you mean "the filesystem"? If I look at the available devices on my system now, I see: 2 x FAT-

Re: Grouping pairs - suggested tools

2010-09-20 Thread Ian Kelly
On Mon, Sep 20, 2010 at 5:09 PM, Alf P. Steinbach /Usenet < alf.p.steinbach+use...@gmail.com >wrote: > It seems to be the same problem as "equivalence sets". > > This problem was solved early on because e.g. Fortran compilers had to > construct such sets (equivalence partitions of a set). > > I th

Customising Tk widgets

2010-09-20 Thread Peter
I am using Windoze, I suspect the appearance attributes I am asking about here are platform dependent? Using Tkinter, I would like to generate a Checkbutton that is filled in with a solid colour rather than a tick mark when selected. Could somebody provide some pointers as to how I could achieve

Re: Combinations or Permutations

2010-09-20 Thread Dave Angel
On 2:59 PM, Seth Leija wrote: I need to know how to generate a list of combinations/permutations (can't remember which it is). Say I have a list of variables: [a,b,c,d,...,x,y,z] I am curious if there is an optimized way to generate this: [[a,b],[a,c],[a,d],...,[x,z],[y,z]] I currently have

Re: develop for Windows on GNU/Linux, using Python

2010-09-20 Thread CM
On Sep 20, 12:46 pm, Thomas Jollans wrote: > On Monday 20 September 2010, it occurred to Default User to exclaim: > > > > > On Sun, Sep 19, 2010 at 14:31, J.O. Aho wrote: > > > Kev Dwyer wrote: > > > > if you have C-extensions in > > > > your code you'll need to compile them over Windows.  If you

Re: Grouping pairs - suggested tools

2010-09-20 Thread Alf P. Steinbach /Usenet
* Astley Le Jasper, on 20.09.2010 23:42: I have a list of tuples that indicate a relationship, ie a is related to b, b is related to c etc etc. What I want to do is cluster these relationships into groups. An item will only be associated with a single cluster. Before I started, I wondered if th

Re: Arrays and CTYPE

2010-09-20 Thread Chris Rebert
On Mon, Sep 20, 2010 at 3:47 PM, Glenn Pringle wrote: > Ok. I ran into a problem here. I have been dabbling with Python and I > thought that this would be a good exercise but I got stuck. > > I have a DLL and one of the functions(getState) in that DLL returns an > array. I'm having a hard time get

Arrays and CTYPE

2010-09-20 Thread Glenn Pringle
Ok. I ran into a problem here. I have been dabbling with Python and I thought that this would be a good exercise but I got stuck. I have a DLL and one of the functions(getState) in that DLL returns an array. I'm having a hard time getting access to the contents of that array. Python 2.7 (r27:825

Re: Combinations or Permutations

2010-09-20 Thread Seth Leija
On Sep 20, 3:08 pm, Mark Lawrence wrote: > On 20/09/2010 21:54, Seth Leija wrote: > > > > > > > I need to know how to generate a list of combinations/permutations > > (can't remember which it is). Say I have a list of variables: > > > [a,b,c,d,...,x,y,z] > > > I am curious if there is an optimized

Re: hitting TAB inserts ./ in interactive mode ?

2010-09-20 Thread Ned Deily
In article <7b7f018e-b429-448b-94c1-2a812c5f3...@h37g2000pro.googlegroups.com>, Nik Krumm wrote: > The issue isn't with readline. The readline module or rlcompleter > module are both available, and loading them has no effect on the > behavior of tab: > > >>> import readline > [Now i hit tab...]

Grouping pairs - suggested tools

2010-09-20 Thread Astley Le Jasper
I have a list of tuples that indicate a relationship, ie a is related to b, b is related to c etc etc. What I want to do is cluster these relationships into groups. An item will only be associated with a single cluster. Before I started, I wondered if there was any particular tool within Python I

Re: visual studio 2010 question

2010-09-20 Thread Robert Kern
On 9/20/10 3:54 PM, Diez B. Roggisch wrote: David Cournapeau writes: On Mon, Sep 20, 2010 at 3:08 PM, Ralf Haring wrote: After running into the error "Setup script exited with error: Unable to find vcvarsall.bat" when trying to use easy_install / setuptools a little digging showed that the

Re: Combinations or Permutations

2010-09-20 Thread Mark Lawrence
On 20/09/2010 21:54, Seth Leija wrote: I need to know how to generate a list of combinations/permutations (can't remember which it is). Say I have a list of variables: [a,b,c,d,...,x,y,z] I am curious if there is an optimized way to generate this: [[a,b],[a,c],[a,d],...,[x,z],[y,z]] I current

Re: Too much code - slicing

2010-09-20 Thread Mark Lawrence
On 20/09/2010 18:28, Antoon Pardon wrote: On Sun, Sep 19, 2010 at 11:30:32PM +, Seebs wrote: On 2010-09-19, MRAB wrote: On 19/09/2010 22:32, Seebs wrote: On 2010-09-19, AK wrote: Because that's what 'if' and 'else' mean. My point is, I don't want the order of the clauses in if/else

Re: Combinations or Permutations

2010-09-20 Thread Ian Kelly
On Mon, Sep 20, 2010 at 2:54 PM, Seth Leija wrote: > I need to know how to generate a list of combinations/permutations > (can't remember which it is). Say I have a list of variables: > > [a,b,c,d,...,x,y,z] > > I am curious if there is an optimized way to generate this: > > [[a,b],[a,c],[a,d],..

Re: Combinations or Permutations

2010-09-20 Thread Chris Kaynor
The itertools module (http://docs.python.org/library/itertools.html) has both permutations and combinations functionality. Chris On Mon, Sep 20, 2010 at 1:54 PM, Seth Leija wrote: > I need to know how to generate a list of combinations/permutations > (can't remember which it is). Say I have a

Re: os.path.normcase rationale?

2010-09-20 Thread Chris Withers
On 17/09/2010 03:35, Nobody wrote: os.path.normcase(path) Normalize the case of a pathname. On Unix and Mac OS X, this returns the path unchanged; on case-insensitive filesystems, it converts the path to lowercase. On Windows, it also converts forward slashes to backward slash

Re: os.path.normcase rationale?

2010-09-20 Thread Chris Withers
On 16/09/2010 00:14, Gregory Ewing wrote: Ben Finney wrote: it doesn't matter what the case is, so there's no need for anything more complex than all lowercase. Also doing what was suggested would require looking at what's in the file system, which would be a lot of bother to go to for no good

Re: os.path.normcase rationale?

2010-09-20 Thread Chris Withers
On 15/09/2010 22:12, Ben Finney wrote: Chris Withers writes: I'm curious as to why, with a file called "Foo.txt" os.path.normcase('FoO.txt') will return "foo.txt" rather than "Foo.txt"? What kind of answer are you looking for? A direct answer would be: it does that because on case-insensiti

Re: sqlalchemy: how to define association object with declarative style?

2010-09-20 Thread Chris Withers
Hi Jerry, For SQLAlchemy questions, you're better off asking on sqlalch...@googlegroups.com. On 07/09/2010 10:39, Jerry Fleming wrote: class GroupUser(DeclarativeBase, Tablename, TimestampMixin): id = Column(Integer, Sequence('group_user_id_seq'), primary_key=True) user = Column(Int

Re: visual studio 2010 question

2010-09-20 Thread Diez B. Roggisch
David Cournapeau writes: > On Mon, Sep 20, 2010 at 3:08 PM, Ralf Haring wrote: >> >> After running into the error "Setup script exited with error: Unable >> to find vcvarsall.bat" when trying to use easy_install / setuptools a >> little digging showed that the MS compiler files in distutils only

Combinations or Permutations

2010-09-20 Thread Seth Leija
I need to know how to generate a list of combinations/permutations (can't remember which it is). Say I have a list of variables: [a,b,c,d,...,x,y,z] I am curious if there is an optimized way to generate this: [[a,b],[a,c],[a,d],...,[x,z],[y,z]] I currently have an iteration that does this: #li

Re: Python Monitoring

2010-09-20 Thread Diez B. Roggisch
Glazner writes: > On Sep 20, 6:03 pm, de...@web.de (Diez B. Roggisch) wrote: >> Glazner writes: >> > Hi, >> >> > I'm will be writing a distributed program with parallel python and i >> > would like to if there are any good monitoring utilities for python. >> > I would like each remote server to

Re: match pattern

2010-09-20 Thread Diez B. Roggisch
rudikk00 writes: > I remember perl has a match function =~/H/ --> which searches if there > is "H" pattern in line. Is there a reasonable analog of it in python? It's called a regular expression, which can be matched or searched in a string. Take a look at the module "re" in python. http://d

Re: Python and unicode

2010-09-20 Thread Martin v. Loewis
Am 20.09.2010 12:57, schrieb Dotan Cohen: > On Mon, Sep 20, 2010 at 12:20, Peter Otten <__pete...@web.de> wrote: >> It may work by accident, if you declare it as UTF-8, because that is also >> the default in Python 3. >> > > That does seem to be the case. > > Thank you for the enlightenment and i

Re: Too much code - slicing

2010-09-20 Thread Ian Kelly
On Mon, Sep 20, 2010 at 11:28 AM, Antoon Pardon < antoon.par...@rece.vub.ac.be> wrote: > > Not necessarily. Some of us have the impression that Guido deliberatly > chose an ugly format for the ternary operator. Guido has alwasys been > against a ternary operator but the requests kept coming. So ev

Re: match pattern

2010-09-20 Thread Ian Kelly
On Mon, Sep 20, 2010 at 12:58 PM, rudikk00 wrote: > Hi all, > > I remember perl has a match function =~/H/ --> which searches if there > is "H" pattern in line. Is there a reasonable analog of it in python? > Yes, have a look at the re module in the standard library. If all you're interested in

match pattern

2010-09-20 Thread rudikk00
Hi all, I remember perl has a match function =~/H/ --> which searches if there is "H" pattern in line. Is there a reasonable analog of it in python? thanks! Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Too much code - slicing

2010-09-20 Thread Seebs
On 2010-09-20, Antoon Pardon wrote: > Not necessarily. Some of us have the impression that Guido deliberatly > chose an ugly format for the ternary operator. Guido has alwasys been > against a ternary operator but the requests kept coming. So eventually > he introduced one. But the impression is t

Re: Too much code - slicing

2010-09-20 Thread Terry Reedy
On 09/19/2010 10:32 PM, John Bokma wrote: the spoiler. Do you fast forward movies as well? I sometimes watch movies (or parts thereof) on 1.5x, especially if it has a lot of 'filler' scenes. But only when my wife is not watching, as she hates it. -- Terry Jan Reedy -- http://mail.pytho

Re: newbie: class and __dict__ variable.

2010-09-20 Thread Terry Reedy
On 9/20/2010 5:51 AM, Bruno Desthuilliers wrote: Steven D'Aprano a écrit : On Mon, 20 Sep 2010 09:27:25 +0200, Bruno Desthuilliers wrote: If the class has a .__setattr__ method, the first bypasses that method, It also bypasses object.__setattribute__ and - as a consequence - any binding descr

Re: Down with tinyurl! (was Re: importing excel data into a python matrix?)

2010-09-20 Thread Terry Reedy
On 9/19/2010 11:43 PM, Steven D'Aprano wrote: On Sun, 19 Sep 2010 06:16:49 -0700, Aahz wrote: Please don't use tinyurl -- it's opaque and provides zero help to anyone who might later want to look it up (and also no accessibility if tinyurl ever goes down). At the very least, include the origin

Re: Down with tinyurl! (was Re: importing excel data into a python matrix?)

2010-09-20 Thread Seebs
On 2010-09-20, Tim Harig wrote: > You could simply place the filter in slrn; then, any urls that you see in > your reader would already be shown with the preview prefix suitable for cut > and paste mechanisms. If you wanted, you can even have your script > download the preview and automatically c

Re: Python Monitoring

2010-09-20 Thread Glazner
On Sep 20, 6:03 pm, de...@web.de (Diez B. Roggisch) wrote: > Glazner writes: > > Hi, > > > I'm will be writing a distributed program with parallel python and i > > would like to if there are any good monitoring utilities for python. > > I would like each remote server to post messages and to see t

Re: Encoding problem - or bug in couchdb-0.8-py2.7.egg??

2010-09-20 Thread Ian
Thanks Diez, Removing, rebooting and installing the latest version solved the problem. :) Your google-foo is better than mine. Google had not turned that up for me. Thanks again Regards Ian On 20/09/2010 17:00, Diez B. Roggisch wrote: Ian Hobson writes: Hi all, I have hit a probl

Re: Too much code - slicing

2010-09-20 Thread Antoon Pardon
On Sun, Sep 19, 2010 at 11:30:32PM +, Seebs wrote: > On 2010-09-19, MRAB wrote: > > On 19/09/2010 22:32, Seebs wrote: > >> On 2010-09-19, AK wrote: > >>> Because that's what 'if' and 'else' mean. > > >> My point is, I don't want the order of the clauses in if/else to change. > >> If it is so

Re: How to make a web services in python ???

2010-09-20 Thread Ian
On 20/09/2010 16:09, Ariel wrote: Soap web services I think. On Fri, Sep 17, 2010 at 5:35 PM, Hidura > wrote: What kind of web-service you have in mind 2010/9/17, Ariel mailto:isaacr...@gmail.com>>: > Hi everybody, I need some help to find documentati

Re: catching WM_TIMER message

2010-09-20 Thread Tim Golden
On 20/09/2010 5:41 PM, Greg Miller wrote: Thank you for the assist! Quick question though, using the first example is there any need to register for WM_TIMER, ( instead of registering for WM_HOTKEY ), or is extracting the "home grown Windows message loop" enough and just run with that? In shor

Re: hitting TAB inserts ./ in interactive mode ?

2010-09-20 Thread Nik Krumm
On Sep 18, 11:28 am, Ned Deily wrote: > In article , >  Lawrence D'Oliveiro wrote: > > > In message , Ned Deily > > wrote: > > >     try: > > >         importreadline > > >     except ImportError: > > >         print("Modulereadlinenot available.") > > >     else: > > >         import rlcompleter

Re: Down with tinyurl! (was Re: importing excel data into a python matrix?)

2010-09-20 Thread Tim Harig
On 2010-09-20, Brian Victor wrote: > Tim Harig wrote: >> Posting two URLs rather defeats the purpose of using a URL shortening >> service in the first place; but, if that is what you feel is effective, >> then by all means, do so. You are the master of your posts and you have >> the right to post

Re: develop for Windows on GNU/Linux, using Python

2010-09-20 Thread Thomas Jollans
On Monday 20 September 2010, it occurred to Default User to exclaim: > On Sun, Sep 19, 2010 at 14:31, J.O. Aho wrote: > > Kev Dwyer wrote: > > > if you have C-extensions in > > > your code you'll need to compile them over Windows. If you want to > > > program against the Windows API you'll need a

Re: How to make a web services in python ???

2010-09-20 Thread Simon Brunning
On 20 September 2010 16:09, Ariel wrote: > Soap web services I think. I think the cool kids would be using , but for the fact that the cool kids all build REST () rather than SOAP these days. -- Cheers, Simon B. -- http:

Re: catching WM_TIMER message

2010-09-20 Thread Greg Miller
On Sep 20, 11:30 am, Tim Golden wrote: > On 20/09/2010 16:15, Greg Miller wrote: > > > I'm trying to get the following code converted to Python...and am > > stuck > > > if(GetMessage(&msg.NULL,NULL,NULL)) > > { > >       if(msg.message == WM_TIMER) > >       { > >            TranslateMEssage(&

Re: elementwise multiplication of 2 lists of numbers

2010-09-20 Thread Peter Otten
harryos wrote: > I have 2 lists of numbers,say > x=[2,4,3,1] > y=[5,9,10,6] > I need to create another list containing > z=[2*5, 4*9, 3*10, 1*6] ie =[10,36,30,6] > > I did not want to use numpy or any Array types.I tried to implement > this in python .I tried the following > > z=[] > for a,b in

Re: elementwise multiplication of 2 lists of numbers

2010-09-20 Thread Arnaud Delobelle
On Sep 20, 3:02 pm, harryos wrote: > hi > I have 2 lists of numbers,say > x=[2,4,3,1] > y=[5,9,10,6] > I need to create another list containing > z=[2*5, 4*9, 3*10, 1*6]  ie =[10,36,30,6] > > I did not want to use numpy or any Array types.I tried to implement > this in python .I tried the followin

Re: Python Monitoring

2010-09-20 Thread Diez B. Roggisch
Glazner writes: > Hi, > > I'm will be writing a distributed program with parallel python and i > would like to if there are any good monitoring utilities for python. > I would like each remote server to post messages and to see the > messages in a web-broweser or such. > > I googled python monito

Re: Encoding problem - or bug in couchdb-0.8-py2.7.egg??

2010-09-20 Thread Diez B. Roggisch
Ian Hobson writes: > Hi all, > > I have hit a problem and I don't know enough about python to diagnose > things further. Trying to use couchDB from Python. This script:- > > # coding=utf8 > import couchdb > from couchdb.client import Server > server = Server() > dbName = 'python-tests' > try: >

Re: Down with tinyurl! (was Re: importing excel data into a python matrix?)

2010-09-20 Thread Brian Victor
Tim Harig wrote: > Posting two URLs rather defeats the purpose of using a URL shortening > service in the first place; but, if that is what you feel is effective, > then by all means, do so. You are the master of your posts and you have > the right to post them using whatever methods and formating

Re: catching WM_TIMER message

2010-09-20 Thread Tim Golden
On 20/09/2010 16:15, Greg Miller wrote: I'm trying to get the following code converted to Python...and am stuck if(GetMessage(&msg.NULL,NULL,NULL)) { if(msg.message == WM_TIMER) { TranslateMEssage(&msg); DispatchMessage(&msg); } } I think GetMessage i

catching WM_TIMER message

2010-09-20 Thread Greg Miller
I'm trying to get the following code converted to Python...and am stuck if(GetMessage(&msg.NULL,NULL,NULL)) { if(msg.message == WM_TIMER) { TranslateMEssage(&msg); DispatchMessage(&msg); } } I think GetMessage is a canned C or C++ function, and I'm not sure

Re: Overriding dict constructor

2010-09-20 Thread Hrvoje Niksic
Christian Heimes writes: > Am 20.09.2010 13:11, schrieb Steven D'Aprano: >> I have a dict subclass that associates extra data with each value of the >> key/value items: > [...] >> How can I fix this? > > Since the dict class is crucial to the overall performance of Python, > the dict class behav

Re: How to make a web services in python ???

2010-09-20 Thread Ariel
Soap web services I think. On Fri, Sep 17, 2010 at 5:35 PM, Hidura wrote: > What kind of web-service you have in mind > > 2010/9/17, Ariel : > > Hi everybody, I need some help to find documentation about how to > implements > > web services in python, could you help me please ??? > > Regards

Re: Numpy on 2.7

2010-09-20 Thread Robert Kern
On 9/20/10 6:36 AM, Dirk Nachbar wrote: I am trying to install Numpy on Python 2.7 but it only looks for 2.6 folder, how can I change that? You should ask numpy questions on the numpy mailing list: http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole wor

Re: elementwise multiplication of 2 lists of numbers

2010-09-20 Thread harryos
On Sep 20, 7:28 pm, Bruno wrote: >> A list comp comes to mind, as well as using itertools.izip thanks Bruno,thanks Gary.. Should have thought of list comprehension.. Thanks for the pointer about izip harry -- http://mail.python.org/mailman/listinfo/python-list

Re: elementwise multiplication of 2 lists of numbers

2010-09-20 Thread Giacomo Boffi
harryos writes: > hi > I have 2 lists of numbers,say > x=[2,4,3,1] > y=[5,9,10,6] > I need to create another list containing > z=[2*5, 4*9, 3*10, 1*6] ie =[10,36,30,6] > > I did not want to use numpy or any Array types.I tried to implement > this in python .I tried the following > > z=[] > for a

Re: elementwise multiplication of 2 lists of numbers

2010-09-20 Thread Gary Herron
On 09/20/2010 07:02 AM, harryos wrote: hi I have 2 lists of numbers,say x=[2,4,3,1] y=[5,9,10,6] I need to create another list containing z=[2*5, 4*9, 3*10, 1*6] ie =[10,36,30,6] I did not want to use numpy or any Array types.I tried to implement this in python .I tried the following z=[] for

Re: elementwise multiplication of 2 lists of numbers

2010-09-20 Thread Bruno Desthuilliers
harryos a écrit : hi I have 2 lists of numbers,say x=[2,4,3,1] y=[5,9,10,6] I need to create another list containing z=[2*5, 4*9, 3*10, 1*6] ie =[10,36,30,6] I did not want to use numpy or any Array types.I tried to implement this in python .I tried the following z=[] for a,b in zip(x,y):

Re: develop for Windows on GNU/Linux, using Python

2010-09-20 Thread Default User
On Sun, Sep 19, 2010 at 14:31, J.O. Aho wrote: > Kev Dwyer wrote: > > On Sun, 19 Sep 2010 12:55:43 -0500, Default User wrote: > > > >> Consider: > >> > >> Can someone do development of programs for use on Windows systems, but > >> developed totally on a GNU/Linux system, using standard, contempor

elementwise multiplication of 2 lists of numbers

2010-09-20 Thread harryos
hi I have 2 lists of numbers,say x=[2,4,3,1] y=[5,9,10,6] I need to create another list containing z=[2*5, 4*9, 3*10, 1*6] ie =[10,36,30,6] I did not want to use numpy or any Array types.I tried to implement this in python .I tried the following z=[] for a,b in zip(x,y): z.append(a*b) Th

Encoding problem - or bug in couchdb-0.8-py2.7.egg??

2010-09-20 Thread Ian Hobson
Hi all, I have hit a problem and I don't know enough about python to diagnose things further. Trying to use couchDB from Python. This script:- # coding=utf8 import couchdb from couchdb.client import Server server = Server() dbName = 'python-tests' try: db = server.create(dbName) except cou

Re: Numpy on 2.7

2010-09-20 Thread Pekka Niiranen
On 9/20/10 2:36 PM, Dirk Nachbar wrote: I am trying to install Numpy on Python 2.7 but it only looks for 2.6 folder, how can I change that? Dirk http://sourceforge.net/projects/numpy/files/NumPy/1.5.0/numpy-1.5.0-win32-superpack-python2.7.exe/download -- http://mail.python.org/mailman/listinfo

Re: [OT] Speed-reading

2010-09-20 Thread John Bokma
Steven D'Aprano writes: > spelling or grammatical errors and clumsy writing. *Especially* the > spelling errors, they have about the same effect on her reading speed as > a tree trunk lying across a Formula 1 race track. Spelling errors are a disaster, somehow they stand out like they use Comi

Re: Overriding dict constructor

2010-09-20 Thread Steven D'Aprano
On Mon, 20 Sep 2010 11:53:48 +, Duncan Booth wrote: > I was going to suggest overriding items() (or iteritems() for Python > 2.x), but while that is another hole that your values leak out it isn't > the hole used by the dict constructor. Yes, I already override items(), keys(), values(), thei

Re: Too much code - slicing

2010-09-20 Thread John Bokma
Seebs writes: > On 2010-09-20, John Bokma wrote: >> I didn't mean that there are spoilers in the first 70 pages, just that >> to me the excercise would spoil the book, so, I wouldn't do it. I >> consider a book like a meal, I wouldn't gobble down food, regurgitate >> it, and eat it again at a sl

Re: Overriding dict constructor

2010-09-20 Thread Christian Heimes
Am 20.09.2010 13:11, schrieb Steven D'Aprano: > I have a dict subclass that associates extra data with each value of the > key/value items: [...] > How can I fix this? Since the dict class is crucial to the overall performance of Python, the dict class behaves bit different than other classes. I

Re: Down with tinyurl!

2010-09-20 Thread John Bokma
Tim Harig writes: > I question first whether most tinyurl links are really of such an > intransient nature that they need to be long lasting. I personally use > them most when writing paper notes. They only need to last long enough > for me, or whoever I made the note for, to get back to them.

Re: Overriding dict constructor

2010-09-20 Thread Duncan Booth
Steven D'Aprano wrote: > I have a dict subclass that associates extra data with each value of the > key/value items: > > class MyDict(dict): > def __setitem__(self, key, value): > super(MyDict, self).__setitem__(key, (value, "extra_data")) > def __getitem__(self, key): >

Numpy on 2.7

2010-09-20 Thread Dirk Nachbar
I am trying to install Numpy on Python 2.7 but it only looks for 2.6 folder, how can I change that? Dirk -- http://mail.python.org/mailman/listinfo/python-list

Python Monitoring

2010-09-20 Thread Glazner
Hi, I'm will be writing a distributed program with parallel python and i would like to if there are any good monitoring utilities for python. I would like each remote server to post messages and to see the messages in a web-broweser or such. I googled python monitoring and found pymon but it seem

Overriding dict constructor

2010-09-20 Thread Steven D'Aprano
I have a dict subclass that associates extra data with each value of the key/value items: class MyDict(dict): def __setitem__(self, key, value): super(MyDict, self).__setitem__(key, (value, "extra_data")) def __getitem__(self, key): return super(MyDict, self).__getitem__(k

Re: Python and unicode

2010-09-20 Thread Dotan Cohen
On Mon, Sep 20, 2010 at 12:20, Peter Otten <__pete...@web.de> wrote: > It may work by accident, if you declare it as UTF-8, because that is also > the default in Python 3. > That does seem to be the case. Thank you for the enlightenment and information. -- Dotan Cohen http://gibberish.co.il h

  1   2   >