Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread John Nagle
On 9/21/2010 11:42 AM, Ned Deily wrote: In article<87zkvbytnk@web.de>, de...@web.de (Diez B. Roggisch) wrote: The point is that the distro doesn't care about the python eco system. Which is what I care about, and a lot of people who want to ship software. I don't think that is totally accu

Re: Expanding a vector by replicating elements individually

2010-09-21 Thread Peter Otten
gburde...@gmail.com wrote: > Given > > m=numpy.array([[1, 2, 3]]) > > I want to obtain > > array([[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]]) >>> numpy.array([1,2,3]).repeat(4) array([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]) Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Overriding dict constructor

2010-09-21 Thread Raymond Hettinger
[Steven D'Aprano] > But if I try to create a regular dict from this, dict() doesn't call my > __getitem__ method: > > >>> dict(d) > > {0: ('a', 'extra_data'), 1: ('b', 'extra_data')} > > instead of {0: 'a', 1: 'b'} as I expected. > > How can I fix this? Try using dict(d.items()). Raymond -- ht

[OT] apache customlog (was Re: creating python daemon ?)

2010-09-21 Thread Kushal Kumaran
On 9/21/10, vineet daniel wrote: > Hi > > I have succesfully created daemon with python script and as next step > I am trying to give input to that python script daemon from Apache > Logshere I have got stuck and I have even checked IRC python > channel for solution. Apache is able to call the

Expanding a vector by replicating elements individually

2010-09-21 Thread gburde...@gmail.com
Given m=numpy.array([[1, 2, 3]]) I want to obtain array([[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]]) One way I've found to do this is: numpy.reshape(numpy.tile(m,(4,1)),(12,1),'f').T Another way is: numpy.reshape(numpy.tile(m,(4,1)).flatten(1),(1,12)) Is there a simpler way to do this, without h

Best way for rotating a matrix of data?

2010-09-21 Thread Raphaël Plasson
Hello, after some computations, I obtain a 2D matrix of data, in a numpy array. I can easily plot them using pyplot, and can easily extract either vertical or horizontal slices by plotting a row or a column of this matrix. I would like to be able to plot slices form this data array, but with an ar

Re: Subprocess does not return for longer-running process

2010-09-21 Thread Chris Rebert
On Tue, Sep 21, 2010 at 3:06 PM, Jason Friedman wrote: > Hello, > > The Popen call does not return if the underlying OS call runs longish, > as the example below shows. > wikiu...@dvprwiki1:~> time $HOME/scripts/subprocess_test.py > "/opt/confluence-cli-1.5.0/confluence.sh --action getPageList --

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Ned Deily
In article , de...@web.de (Diez B. Roggisch) wrote: > Ned Deily writes: > > In article <87zkvbytnk@web.de>, de...@web.de (Diez B. Roggisch) > > wrote: > >> The point is that the distro doesn't care about the python eco > >> system. Which is what I care about, and a lot of people who want to

Thank-you (Re: Iterate through a single iterator from multiple places in a loop)

2010-09-21 Thread python
MRAB, > it = iter(some_long_string) Well, that was easy! :) Thanks for your help. Malcolm - Original message - From: "MRAB" To: python-list@python.org Date: Wed, 22 Sep 2010 00:27:25 +0100 Subject: Re: Iterate through a single iterator from multiple places in a loop On 22/09/2010

Re: Iterate through a single iterator from multiple places in a loop

2010-09-21 Thread MRAB
On 22/09/2010 00:10, pyt...@bdurham.com wrote: Is there a pythonic way to loop through a single iterator from > multiple places in a loop? Here's pseudo code for what I would like to do: for char in some_long_string: if char == some_char: for char in some_long_string: <--- using s

Re: creating python daemon ?

2010-09-21 Thread Ben Finney
vineet daniel writes: > I'd appreciate if anybody could share the code that they used for > daemon or used with Apache CustomLog directive. I don't know about using Apache's CustomLog, but the ‘python-daemon’ library is specifically intended for creating a well-behaved Unix daemon http://pypi.py

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Diez B. Roggisch
Ned Deily writes: > In article <87zkvbytnk@web.de>, de...@web.de (Diez B. Roggisch) > wrote: >> The point is that the distro doesn't care about the python eco >> system. Which is what I care about, and a lot of people who want to ship >> software. > > I don't think that is totally accurate o

Re: how to get partition information of a hard disk with python

2010-09-21 Thread MRAB
On 21/09/2010 23:31, Hellmut Weber wrote: Hi list, I'm looking for a possibility to access the partiton inforamtion of a hard disk of my computer from within a python program. Googling I found the module 'parted' but didn't see any possibility to get the desired information. Is there any reasona

Iterate through a single iterator from multiple places in a loop

2010-09-21 Thread python
Is there a pythonic way to loop through a single iterator from multiple places in a loop? Here's pseudo code for what I would like to do: for char in some_long_string: if char == some_char: for char in some_long_string: <--- using same iterator as above # continue to pull

lists and list item matches (ghost wodgame)

2010-09-21 Thread Baba
Hi query level: beginner as part of a learning exercise i have written code that: a) asks for a single letter input (assumption: only 1 letter wil be entered) b) adds that letter to list1 and then goes through list2 and checks: 1) if any item in list2 starts with list1 > if False: break

how to get partition information of a hard disk with python

2010-09-21 Thread Hellmut Weber
Hi list, I'm looking for a possibility to access the partiton inforamtion of a hard disk of my computer from within a python program. Googling I found the module 'parted' but didn't see any possibility to get the desired information. Is there any reasonable documentation for the parted module? An

Re: naming the main module in embedded Python

2010-09-21 Thread Burton Samograd
Tomasz Koziara writes: > I am embedding Python as an interpret in my code. Now, whenever my > code or Python itself issues an error/warning message I am getting > something like: > > File "", line 1, in > > or > > __main__:46: RuntimeWarning: My warning message > > I am using PyRun_SimpleString t

Subprocess does not return for longer-running process

2010-09-21 Thread Jason Friedman
Hello, The Popen call does not return if the underlying OS call runs longish, as the example below shows. Although, if the underlying OS call is merely "sleep N" it will return even after quite a long time. wikiu...@dvprwiki1:~> python --version Python 2.6.4 wikiu...@dvprwiki1:~> time /opt/confl

ncurses pad question

2010-09-21 Thread Mag Gam
I am having some trouble understanding how padding/windowing works for Python curses. According to this example on http://docs.python.org/howto/curses.html I see: pad = curses.newpad(100, 100) # These loops fill the pad with letters; this is # explained in the next section for y in range(0, 100):

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Ant
On Sep 21, 2:04 pm, Philip Semanchuk wrote: > On Sep 21, 2010, at 8:29 AM, Ant wrote: > Don't know about Python 3 on Fedora (I use a Mac), but distrowatch.org > reports that Fedora has been using Python >= 2.6 since Fedora 11 which was > released in June of 2009. Yes you are right - I've checke

Re: basic 2 player wordgame

2010-09-21 Thread Baba
On Sep 21, 1:39 pm, Mel wrote: > Baba wrote: > > I am working on a simple wordgame exercise: 2 players form a word by > > alternating turns saying a letter, which is added on to the end of the > > word fragment. > > > I am familiar with loops, iterations etc but i need a hint as to how > > to appr

Re: Combinations or Permutations

2010-09-21 Thread Raymond Hettinger
On Sep 20, 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 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]]

Re: Grouping pairs - suggested tools

2010-09-21 Thread Arnaud Delobelle
On 21 Sep, 11:13, Peter Otten <__pete...@web.de> wrote: [...] > > A straightforward implementation: > > $ cat group_edges.py > def find_groups(edges): >     lookup = {} # node --> group >     groups = {} # id(group) --> group >     for a, b in edges:               >         if a in lookup:        

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

2010-09-21 Thread Brian Curtin
On Tue, Sep 21, 2010 at 03:36, Lawrence D'Oliveiro wrote: > In message , Kev > Dwyer > wrote: > > > To be confident that your code is good you need to test it on a Windows > > box (we all test, right?). > > Preferably more than one. Test with Seven as well as Vista (yes, there are > still some Vi

Re: Grouping pairs - suggested tools

2010-09-21 Thread Astley Le Jasper
> I think you have the same bug as Alf's code, you never merge existing > groups. Have you tried Arnaud's counterexample? > > By the way, are ('a', 'b') and ('b', 'a') to be considered equivalent for > your problem? > > Peter Hi Peter, Yes. I realise that this doesn't take into account existing

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Ned Deily
In article <87zkvbytnk@web.de>, de...@web.de (Diez B. Roggisch) wrote: > The point is that the distro doesn't care about the python eco > system. Which is what I care about, and a lot of people who want to ship > software. I don't think that is totally accurate or fair. There is regular par

Re: polymorphic function question

2010-09-21 Thread Gregor Horvath
Am Tue, 21 Sep 2010 11:35:14 -0700 (PDT) schrieb joblack : > Let's say I've got a function with > > def doesSomething(A='bla'): > ... > > and I try to call it with a non existent variable with > > doesSomething(DoesNotExist) > > What will happen? Will it throw an exception or will it take the

polymorphic function question

2010-09-21 Thread joblack
Let's say I've got a function with def doesSomething(A='bla'): ... and I try to call it with a non existent variable with doesSomething(DoesNotExist) What will happen? Will it throw an exception or will it take the defautl value? -- http://mail.python.org/mailman/listinfo/python-list

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

2010-09-21 Thread Emile van Sebille
On 9/20/2010 7:55 PM Lawrence D'Oliveiro said... 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. :) more than just a joke fuckinggoogleit.co

Re: creating python daemon ?

2010-09-21 Thread vineet daniel
On Sep 21, 9:47 pm, de...@web.de (Diez B. Roggisch) wrote: > vineet daniel writes: > > Hi > > > I have succesfully created daemon with python script and as next step > > I am trying to give input to that python script daemon from Apache > > Logshere I have got stuck and I have even checked IRC

Re: Down with tinyurl!

2010-09-21 Thread geremy condra
On Tue, Sep 21, 2010 at 10:53 AM, John Bokma wrote: > geremy condra writes: > >> It's a joke. Admittedly it's a bit pointed, but it's a joke >> nonetheless, and it does at least provide what I consider to be two >> valuable pieces of information: that you should have googled this >> before asking

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Emile van Sebille
On 9/21/2010 5:29 AM Ant said... Is there a solution to this that anyone knows of? Has Zed jumped to conclusions? Have I? I'd say the error was in selecting something other that the lowest common subset of python functions when designing and writing a python version dependent Mongrel2. There

Re: Down with tinyurl!

2010-09-21 Thread John Bokma
Lawrence D'Oliveiro writes: > In message <87aanbx5lq@castleamber.com>, John Bokma wrote: > >> I never saw the point of the whole X-No-Archive: Yes thing. What happens >> if I quote such a message? It's archived, right? > > Where did they come from? > Posting fragments, followed up-- > Origina

Re: Down with tinyurl!

2010-09-21 Thread John Bokma
Dennis Lee Bieber writes: > On Mon, 20 Sep 2010 20:12:01 -0500, John Bokma > declaimed the following in gmane.comp.python.general: > > >> I never saw the point of the whole X-No-Archive: Yes thing. What happens >> if I quote such a message? It's archived, right? > > Compliant clients (like

Re: Down with tinyurl!

2010-09-21 Thread John Bokma
Dennis Lee Bieber writes: > On 21 Sep 2010 05:01:45 GMT, Steven D'Aprano > declaimed the following in > gmane.comp.python.general: > > >> Hey, that would be an *awesome* google bombing project... to get lmgtfy >> to come up as the first link for "self-righteous dicks". 4chan, where are >> you

Re: Down with tinyurl!

2010-09-21 Thread John Bokma
Steven D'Aprano writes: > I prefer the old fashioned version: > > "Google Is Your Friend" > > followed by a URL to the appropriate google's search results page. Or > even more to the point: > > "Did you bother to google for the answer first? Because the very first > page that comes up gives exa

Re: Down with tinyurl!

2010-09-21 Thread John Bokma
geremy condra writes: > It's a joke. Admittedly it's a bit pointed, but it's a joke > nonetheless, and it does at least provide what I consider to be two > valuable pieces of information: that you should have googled this > before asking, and what you should have googled for. If I miss and > you'

naming the main module in embedded Python

2010-09-21 Thread Tomasz Koziara
Hi I am embedding Python as an interpret in my code. Now, whenever my code or Python itself issues an error/warning message I am getting something like: File "", line 1, in or __main__:46: RuntimeWarning: My warning message I am using PyRun_SimpleString to load part of the code and the

Re: Python 2.6 & bsddb

2010-09-21 Thread Sridhar Ratnakumar
On 2010-09-21, at 9:04 AM, garyr wrote: > I recently installed ActivePython 2.6.6 and my programs that use anydbm or > shelve generate import errors because bsddb is missing. I installed bsddb3 > (bsddb3-5.0.0.win32-py2.6.exe) but that didn't change anything. What more do > I need to do? You

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Diez B. Roggisch
David Cournapeau writes: >> >> I don't deny them their experience. Do you deny the experience of other >> people with *other* needs? As I already said: I don't propose to ditch >> the package management. I'm all fine with a distro that carefully >> selects it's packages and dependencies. > > In y

Re: creating python daemon ?

2010-09-21 Thread Diez B. Roggisch
vineet daniel writes: > Hi > > I have succesfully created daemon with python script and as next step > I am trying to give input to that python script daemon from Apache > Logshere I have got stuck and I have even checked IRC python > channel for solution. Apache is able to call the file but

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Diez B. Roggisch
Antoine Pitrou writes: > On Tue, 21 Sep 2010 17:59:27 +0200 > de...@web.de (Diez B. Roggisch) wrote: >> >> The problems explained are simply outdated and crippled python >> versions. >> >> And to me, a python version installed that has not the >> distutils module is *crippled*. You can rationa

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread David Cournapeau
On Wed, Sep 22, 2010 at 12:59 AM, Diez B. Roggisch wrote: > David Cournapeau writes: > >> On Tue, Sep 21, 2010 at 10:23 PM, Diez B. Roggisch wrote: >>> Ant writes: >>> Hi all, I've just seen this: http://sheddingbikes.com/posts/1285063820.html Whatever you think of Zed

Re: Too much code - slicing

2010-09-21 Thread Andreas Waldenburger
On Sat, 18 Sep 2010 19:09:33 -0700 (PDT) Carl Banks wrote: > On Sep 17, 1:01 pm, Andreas Waldenburger > wrote: > > On Thu, 16 Sep 2010 16:20:33 -0400 AK wrote: > > > > > I also like this construct that works, I think, since 2.6: > > > > > code = dir[int(num):] if side == 'l' else dir[:-1*int(nu

weird error with python 2.7 installer under windows 7

2010-09-21 Thread Robin Becker
A colleague gets this error while testing a bdist wininst installer under windows 7 professional. This is on the page where the Post install script output appears. In the upper part I see "Postinstall script finished. Click the Finish button to exit the setup wizard." In the bottom panel whe

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Antoine Pitrou
On Tue, 21 Sep 2010 17:59:27 +0200 de...@web.de (Diez B. Roggisch) wrote: > > The problems explained are simply outdated and crippled python > versions. > > And to me, a python version installed that has not the > distutils module is *crippled*. You can rationalize that as much as you > want thr

Python 2.6 & bsddb

2010-09-21 Thread garyr
I recently installed ActivePython 2.6.6 and my programs that use anydbm or shelve generate import errors because bsddb is missing. I installed bsddb3 (bsddb3-5.0.0.win32-py2.6.exe) but that didn't change anything. What more do I need to do? -- http://mail.python.org/mailman/listinfo/python-l

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Diez B. Roggisch
David Cournapeau writes: > On Tue, Sep 21, 2010 at 10:23 PM, Diez B. Roggisch wrote: >> Ant writes: >> >>> Hi all, >>> >>> I've just seen this: http://sheddingbikes.com/posts/1285063820.html >>> >>> Whatever you think of Zed Shaw (author of the Mongrel Ruby server and >>> relatively recent Pyth

Re: Grouping pairs - suggested tools

2010-09-21 Thread Peter Otten
Astley Le Jasper wrote: > Thanks all. I was playing around with this and came up with another > solution using dictionaries (... comfort zone ...!!) > from operator import itemgetter > > def group_stuff(data): > > group_dic = {} > group_id = 0 > > for line in data: > i = 0

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Neal Becker
Ant wrote: > Hi all, > > I've just seen this: http://sheddingbikes.com/posts/1285063820.html > > Whatever you think of Zed Shaw (author of the Mongrel Ruby server and > relatively recent Python convert), he has a very good point in this. I > run Fedora 12 on my home computers, and find it far to

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread David Cournapeau
On Tue, Sep 21, 2010 at 10:23 PM, Diez B. Roggisch wrote: > Ant writes: > >> Hi all, >> >> I've just seen this: http://sheddingbikes.com/posts/1285063820.html >> >> Whatever you think of Zed Shaw (author of the Mongrel Ruby server and >> relatively recent Python convert), he has a very good point

Re: Grouping pairs - suggested tools

2010-09-21 Thread Astley Le Jasper
Thanks all. I was playing around with this and came up with another solution using dictionaries (... comfort zone ...!!) <<< Code >> from operator import itemgetter def group_stuff(data): group_dic = {} group_id = 0

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread D'Arcy J.M. Cain
On Tue, 21 Sep 2010 15:23:42 +0200 de...@web.de (Diez B. Roggisch) wrote: > So, in summary, I think if anything, Python should liberate itself from > the reigns of distro package management, and fix whatever issues there > are with setuptools (or distutils or pip or distribute or whatever the > coo

Re: Too much code - slicing

2010-09-21 Thread Antoon Pardon
On Tue, Sep 21, 2010 at 12:07:07AM +, 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

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Michele Simionato
On Sep 21, 2:29 pm, Ant wrote: > Hi all, > > I've just seen this:http://sheddingbikes.com/posts/1285063820.html > > Whatever you think of Zed Shaw (author of the Mongrel Ruby server and > relatively recent Python convert), he has a very good point in this. I > run Fedora 12 on my home computers, a

Re: basic 2 player wordgame

2010-09-21 Thread bobicanprogram
On Sep 21, 6:25 am, Baba wrote: > Hi > > I am working on a simple wordgame exercise: 2 players form a word by > alternating turns saying a letter, which is added on to the end of the > word fragment. > > I am familiar with loops, iterations etc but i need a hint as to how > to approach alternating

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Diez B. Roggisch
Ant writes: > Hi all, > > I've just seen this: http://sheddingbikes.com/posts/1285063820.html > > Whatever you think of Zed Shaw (author of the Mongrel Ruby server and > relatively recent Python convert), he has a very good point in this. I > run Fedora 12 on my home computers, and find it far to

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Philip Semanchuk
On Sep 21, 2010, at 8:29 AM, Ant wrote: > Hi all, > > I've just seen this: http://sheddingbikes.com/posts/1285063820.html > > Whatever you think of Zed Shaw (author of the Mongrel Ruby server and > relatively recent Python convert), he has a very good point in this. I > run Fedora 12 on my home

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Philip Semanchuk
On Sep 21, 2010, at 8:29 AM, Ant wrote: > Hi all, > > I've just seen this: http://sheddingbikes.com/posts/1285063820.html > > Whatever you think of Zed Shaw (author of the Mongrel Ruby server and > relatively recent Python convert), he has a very good point in this. I > run Fedora 12 on my home

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Peter Otten
Ant wrote: > I've just seen this: http://sheddingbikes.com/posts/1285063820.html > > Whatever you think of Zed Shaw (author of the Mongrel Ruby server and > relatively recent Python convert), he has a very good point in this. I > run Fedora 12 on my home computers, and find it far too much hassle

creating python daemon ?

2010-09-21 Thread vineet daniel
Hi I have succesfully created daemon with python script and as next step I am trying to give input to that python script daemon from Apache Logshere I have got stuck and I have even checked IRC python channel for solution. Apache is able to call the file but fails to execute it properly and I

Re: basic 2 player wordgame

2010-09-21 Thread Mel
Baba wrote: > I am working on a simple wordgame exercise: 2 players form a word by > alternating turns saying a letter, which is added on to the end of the > word fragment. > > I am familiar with loops, iterations etc but i need a hint as to how > to approach alternating turns when writing this co

Python in Linux - barrier to Python 3.x

2010-09-21 Thread Ant
Hi all, I've just seen this: http://sheddingbikes.com/posts/1285063820.html Whatever you think of Zed Shaw (author of the Mongrel Ruby server and relatively recent Python convert), he has a very good point in this. I run Fedora 12 on my home computers, and find it far too much hassle to try to ge

Re: Arrays and CTYPE

2010-09-21 Thread Nobody
On Mon, 20 Sep 2010 15:47:32 -0700, 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. If the DLL was writte

Re: os.path.normcase rationale?

2010-09-21 Thread Nobody
On Tue, 21 Sep 2010 10:12:27 +1000, Ben Finney wrote: > Another is that filesystems don't have a standard way of determining > whether they are case-sensitive. The operating system's driver for that > particular filesystem knows, I'm not even sure that's true; with a networked filesytem, some par

Re: socket.error: [Errno 98] Address already in use

2010-09-21 Thread Nobody
On Mon, 20 Sep 2010 12:00:41 +1200, Lawrence D'Oliveiro wrote: >> However, some clients choose their own source ports. E.g. rlogin/rsh use >> privileged (low-numbered) ports, and you can't get the kernel to choose a >> random privileged port for you. > > But nobody uses rlogin/rsh any more, They

Re: visual studio 2010 question

2010-09-21 Thread David Cournapeau
On Tue, Sep 21, 2010 at 5:54 AM, 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 >>>

basic 2 player wordgame

2010-09-21 Thread Baba
Hi I am working on a simple wordgame exercise: 2 players form a word by alternating turns saying a letter, which is added on to the end of the word fragment. I am familiar with loops, iterations etc but i need a hint as to how to approach alternating turns when writing this code? exercise source

Re: Grouping pairs - suggested tools

2010-09-21 Thread Peter Otten
Astley Le Jasper wrote: > 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 wa

Re: Grouping pairs - suggested tools

2010-09-21 Thread Alf P. Steinbach /Usenet
* Arnaud Delobelle, on 21.09.2010 11:13: On Sep 21, 7:19 am, "Alf P. Steinbach /Usenet" wrote: * 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.

Re: Grouping pairs - suggested tools

2010-09-21 Thread Arnaud Delobelle
On Sep 21, 7:19 am, "Alf P. Steinbach /Usenet" wrote: > * 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 clus

Re: Grouping pairs - suggested tools

2010-09-21 Thread Astley Le Jasper
Thanks for the feedback both. I'll have a look at these. One of the frustrating things I find about python is that there are so many modules. There have been times when I've spend ages doing something and then some has said, "Oh yeah, there is a module for that". Anyway. Nearly finished. Cheers

utf-8 coding sometimes it works, most of the time it don't work.

2010-09-21 Thread Stef Mientki
hello, I've a pyjamas application (python to javascript translator), that can be run (as pure python) in MSHTML (IE Com interface) . When running this python application from the command line ( or launched from another Python program), the wrong character encoding (probably windows-1252) is us

Newbie: plist & control characters?

2010-09-21 Thread BobAalsma
I'm trying to modify a plist file. The modification works properly, but I'm having difficulties in finding the proper way to restore. The file contains HTML strings like "$#226;" and either this gets replaced by "â" (which I don't want) but the programme completes or the program fails when I try t

Re: Down with tinyurl!

2010-09-21 Thread Lawrence D'Oliveiro
In message <87aanbx5lq@castleamber.com>, John Bokma wrote: > I never saw the point of the whole X-No-Archive: Yes thing. What happens > if I quote such a message? It's archived, right? Where did they come from? Posting fragments, followed up-- Originals? No more. -- http://mail.python.org/m

Re: Down with tinyurl!

2010-09-21 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > On Mon, 20 Sep 2010 20:12:01 -0500, John Bokma > declaimed the following in gmane.comp.python.general: > > >> I never saw the point of the whole X-No-Archive: Yes thing. What happens >> if I quote such a message? It's archived, right? > > Compliant clie

Re: Grouping pairs - suggested tools

2010-09-21 Thread Arnaud Delobelle
On Sep 20, 10:42 pm, Astley Le Jasper wrote: > 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

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

2010-09-21 Thread Lawrence D'Oliveiro
In message , rantingrick wrote: > X No Archive should have never been allowed and should be removed > immediately and forever. What is the point of posting when your words > will be gone form memory in a short time? My words are for now. All I think are fleeting thoughts; Tomorrow I am dust. --

Re: Down with tinyurl!

2010-09-21 Thread Lawrence D'Oliveiro
In message <87r5gn3ino@castleamber.com>, John Bokma wrote: > Well, X-Archive: No is even shorter ;-). X-No-Bananas: Yes -- http://mail.python.org/mailman/listinfo/python-list

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

2010-09-21 Thread Lawrence D'Oliveiro
In message , geremy condra wrote: > ... a shocking number of people don't seem to realize that lmgtfy is a > joke. I had a person a few months ago seriously thank me for giving them a > link that did the typing for them. Tell them to tell all their friends about it. :) -- http://mail.python.org

Re: Customising Tk widgets

2010-09-21 Thread Arndt Roger Schneider
Peter schrieb: 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. tk = Tk() tk.option_add("*Checkbutton.inidca

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

2010-09-21 Thread Lawrence D'Oliveiro
In message , Kev Dwyer wrote: > To be confident that your code is good you need to test it on a Windows > box (we all test, right?). Preferably more than one. Test with Seven as well as Vista (yes, there are still some Vista users out there). What about the difference between Starter versus Ho

Re: This Is International Don’t-Squawk-Like-A-Parrot Day

2010-09-21 Thread Lawrence D'Oliveiro
Next we need an International Surfin’ Bird day, a day to go around and tell everybody that the bird bird bird, the bird is the word. (Yes, *that* FG episode was just on earlier.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Too much code - slicing

2010-09-21 Thread Duncan Booth
Steven D'Aprano wrote: > That's sheer and unadulterated nonsense. The fact is that Guido changed > his mind about ternary if after discovering that the work-around > > true-clause and condition or false-clause > > is buggy -- it gives the wrong answer if true-clause happens to be a > false va

Re: Syntax highlighting [was Re: Too much code - slicing]

2010-09-21 Thread rantingrick
On Sep 20, 1:29 am, Steven D'Aprano wrote: > To my eyes, the feature of syntax highlighting that alone makes it > worthwhile, its killer feature, is that I can set comments and docstrings > to grey. When I'm scanning code, being able to slide my eyes over greyed- > out comments and docstrings and

Re: Overriding dict constructor

2010-09-21 Thread Duncan Booth
Steven D'Aprano wrote: > 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 ove

Re: Customising Tk widgets

2010-09-21 Thread rantingrick
On Sep 20, 6:44 pm, Peter wrote: > I am using Windoze, I suspect the appearance attributes I am asking > about here are platform dependent? not really. > Using Tkinter, I would like to generate a Checkbutton that is filled > in with a solid colour rather than a tick mark when selected. Why, who

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

2010-09-21 Thread rantingrick
On Sep 20, 12:25 pm, Tim Harig wrote: > On 2010-09-20, Brian Victor wrote: > Usernet users also have the right to use the X-No-Archive header field. > Does the fact that *you* happen to search usenet archives make using this > field immoral?  Shouldn't the poster have to right to determine for >