Re: OT: regular expression matching multiple occurrences of one group

2009-11-09 Thread Gabriel Genellina
En Mon, 09 Nov 2009 12:59:53 -0300, Jon Clements escribió: On Nov 9, 1:53 pm, pinkisntwell wrote: How can I make a regular expression that will match every occurrence of a group and return each occurrence as a group match? For example, for a string "-c-c-c-c-c", how can I make a regex whic

Re: how to create a pip package

2009-11-09 Thread Gabriel Genellina
En Tue, 10 Nov 2009 00:48:26 -0300, Phlip escribió: I have a single file that I need my crew to pip install. When I Google for "how to create a pip package" I don't hit anything. Of course that info is out there; I can't seem to pick up the trail of breadcrumbs to it. See http://pip.openplan

Re: on "Namespaces"

2009-11-09 Thread Steven D'Aprano
On Sun, 08 Nov 2009 13:20:23 -0800, webtourist wrote: > New bie Question: > in "Zen of Python" - what exactly does the last one mean ? - Namespaces > are one honking great idea -- let's do more of those! > > I mean why the emphasis ? Is it like saying "put modules into packages" > in other progra

Re: Most efficient way to "pre-grow" a list?

2009-11-09 Thread Gabriel Genellina
En Sun, 08 Nov 2009 10:08:35 -0300, gil_johnson escribió: On Nov 6, 8:46 pm, gil_johnson wrote: The problem I was solving was this: I wanted an array of 32-bit integers to be used as a bit array, and I wanted it initialized with all bits set, that is, each member of the array had to be set to

Re: sort values from dictionary of dictionaries python 2.4

2009-11-09 Thread Steven D'Aprano
On Mon, 09 Nov 2009 06:02:09 -0800, J Wolfe wrote: > Hi, > > I would like to sort this dictionary by the values of the inner > dictionary ‘ob’ key. You can't sort dictionaries in Python, because they are unordered hash tables. Giving up the ability to store items in order is one of the things

how to create a pip package

2009-11-09 Thread Phlip
Py hont: I have a single file that I need my crew to pip install. When I Google for "how to create a pip package" I don't hit anything. Of course that info is out there; I can't seem to pick up the trail of breadcrumbs to it. While I'm looking, could someone push the link in here? Purely for pos

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-09 Thread Carl Banks
On Nov 9, 4:47 pm, Ognjen Bezanov wrote: > Hello all, > > Say I have a python variable: > > a = "hello" > > Is it possible for me to get the physical address of that variable (i.e. > where it is in RAM)? > > I know that id(a) will give me it's memory address, but the address > given does not seem

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-09 Thread Dave Angel
Benjamin Kaplan wrote: On Mon, Nov 9, 2009 at 7:47 PM, Ognjen Bezanov wrote: Hello all, Say I have a python variable: a = "hello" Is it possible for me to get the physical address of that variable (i.e. where it is in RAM)? I know that id(a) will give me it's memory address, but the addr

Re: Debugging python in emacs isn't working.

2009-11-09 Thread menomnon
On Nov 8, 6:36 pm, menomnon wrote: > Hi, > > Emacs 22.3, python 2.6.4 > > Put the following into my .emacs: > > (setq pdb-path 'c:\\python26\\lib\\pdb.py >       gud-pdb-command-name (symbol-name pdb-path)) > (defadvice pdb (before gud-query-cmdline activate) >   "Provide a better default command

Re: comparing alternatives to py2exe

2009-11-09 Thread Gabriel Genellina
En Fri, 06 Nov 2009 17:00:17 -0300, Philip Semanchuk escribió: On Nov 3, 2009, at 10:58 AM, Jonathan Hartley wrote: Recently I put together this incomplete comparison chart in an attempt to choose between the different alternatives to py2exe: http://spreadsheets.google.com/pub?key=tZ42hjaRun

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Dave Angel
Victor Subervi wrote: On Mon, Nov 9, 2009 at 2:30 PM, Victor Subervi wrote: On Mon, Nov 9, 2009 at 2:27 PM, Rami Chowdhury wrote: Hold everything. Apparently line-endings got mangled. What I don't understand is why I didn't see them when I opened the file to edit, and why th

Re: pythonw.exe under Windows-7 (Won't run for one admin user)

2009-11-09 Thread Rhodri James
On Fri, 06 Nov 2009 21:19:44 -, SD_V897 wrote: Rhodri James wrote: On Tue, 03 Nov 2009 16:00:16 -, SD_V897 wrote: I have a perplexing issue, I have four users set up on a W7 computer. The program runs fine for all users except the admin user who needs it for school assignments.

Re: NEWB problem with urllib2

2009-11-09 Thread Penn
Thanks Simon! You are right.. I also believe it is something with Eclipse. I've been working since... the module below runs.. but Eclipse is still showing an error when I reference urlopen with a little red X... saying it is an undefined variable in the IDE.. but not giving me an runtime errors.

Re: on "Namespaces"

2009-11-09 Thread Rhodri James
On Sun, 08 Nov 2009 21:20:23 -, webtourist wrote: New bie Question: in "Zen of Python" - what exactly does the last one mean ? - Namespaces are one honking great idea -- let's do more of those! I mean why the emphasis ? Is it like saying "put modules into packages" in other programming

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-09 Thread MRAB
Ognjen Bezanov wrote: Hello all, Say I have a python variable: a = "hello" Is it possible for me to get the physical address of that variable (i.e. where it is in RAM)? I know that id(a) will give me it's memory address, but the address given does not seem to correlate with the physical me

Re: NEWB problem with urllib2

2009-11-09 Thread Simon Forman
On Mon, Nov 9, 2009 at 6:29 PM, Penn wrote: > I just installed PyDev into Eclipse using the 'update' method and did > the standard installation.  I allowed it to Auto Configure itself and > ran a "Hello World" module to make sure I was in the ballpark. > > I got an starting module up and have run

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-09 Thread Benjamin Kaplan
On Mon, Nov 9, 2009 at 7:47 PM, Ognjen Bezanov wrote: > Hello all, > > Say I have a python variable: > > a = "hello" > > Is it possible for me to get the physical address of that variable (i.e. > where it is in RAM)? > > I know that id(a) will give me it's memory address, but the address given > d

Is it possible to get the Physical memory address of a variable in python?

2009-11-09 Thread Ognjen Bezanov
Hello all, Say I have a python variable: a = "hello" Is it possible for me to get the physical address of that variable (i.e. where it is in RAM)? I know that id(a) will give me it's memory address, but the address given does not seem to correlate with the physical memory. Is this even pos

Re: is None or == None ?

2009-11-09 Thread Rhodri James
On Sun, 08 Nov 2009 19:45:31 -, Terry Reedy wrote: I believe the use of tagged pointers has been considered and so far rejected by the CPython developers. And no one else that I know of has developed a fork for that. It would seem more feasible with 64 bit pointers where there seem to

Re: Indentation problems

2009-11-09 Thread Rhodri James
I'm going to make a whole bunch of wild guesses here, since you don't give us a lot to go on. Wild Guess #1: you're using IDLE. On Sun, 08 Nov 2009 19:01:37 -, Ray Holt wrote: I am having problems with indentation some times. When I hit the enter key after if statements or while sta

Socket programming with NetCom serial-to-ethernet module

2009-11-09 Thread Ryan Swindle
Hi, This is my first Python-list post; I hope it's going to the right place. Here's my problem: I've read many tutorials on socket programming, but I can't seem to piece them together for my particular case. I have 3 serial ports, each of which individually connects to a port on a NetCom box, w

Re: PiCloud Beta Release

2009-11-09 Thread Ken Elkabany
On Thu, Nov 5, 2009 at 3:19 PM, Jacob Shaw wrote: > On Nov 1, 5:13 pm, Ken Elkabany wrote: >> Hello, >> >> PiCloud has just released a Python library, cloud, which allows you to >> easily offload the execution of a function to a cluster of servers >> running on Amazon Web Services. As a beta prod

NEWB problem with urllib2

2009-11-09 Thread Penn
I just installed PyDev into Eclipse using the 'update' method and did the standard installation. I allowed it to Auto Configure itself and ran a "Hello World" module to make sure I was in the ballpark. I got an starting module up and have run "Hello World" but now am stuck on getting urlopen to i

Re: Can't Find Module

2009-11-09 Thread Rhodri James
On Sat, 07 Nov 2009 16:59:29 -, Victor Subervi wrote: ImportError: No module named template [snip] I can import this just fine from the python command prompt. So, what gives? Is template.py in your current directory when you run the script from the command line? -- Rhodri James

Re: IDLE python shell freezes after running show() of matplotlib

2009-11-09 Thread Michael
On Oct 28, 11:09 pm, Chris Colbert wrote: > This is a threading issue that is very common when using gui toolkits > with the interactive interpreter. > > You're better off just using ipython, which already has builtin > support for matplotlib when you start it via "ipython -pylab" > > On Wed, Oct

Re: How to set the range for x-axis

2009-11-09 Thread Martin
On Nov 9, 8:45 pm, Robert Kern wrote: > On 2009-11-09 10:43 AM, Moses wrote: > > > > > Hi Chris, > > > I am using python 2.6 and am using scipy and pylab. See the code below. > > You will want to ask matplotlib questions on the matplotlib mailing list: > > https://lists.sourceforge.net/lists/listi

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Victor Subervi
On Mon, Nov 9, 2009 at 2:30 PM, Victor Subervi wrote: > > On Mon, Nov 9, 2009 at 2:27 PM, Rami Chowdhury > wrote: > >> On Mon, 09 Nov 2009 11:24:33 -0800, Victor Subervi < >> victorsube...@gmail.com> wrote: >> >> On Mon, Nov 9, 2009 at 1:53 PM, Rami Chowdhury >> >wrote: >>> >>> On Mon, 09 Nov 2

Re: [PYTHON] How to set the range for x-axis

2009-11-09 Thread Robert Kern
On 2009-11-09 10:43 AM, Moses wrote: Hi Chris, I am using python 2.6 and am using scipy and pylab. See the code below. You will want to ask matplotlib questions on the matplotlib mailing list: https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Robert Kern "I have come to beli

Re: [PYTHON] How to set the range for x-axis

2009-11-09 Thread David Robinow
On Mon, Nov 9, 2009 at 11:46 AM, Moses wrote: > Hi Chris, > > The code is > > from scipy import * > from pylab import * > > x = [0.5,0.6,0.7,0.8,0.9,1.0] > y = [2,6,8,10,10,10] > > plot(x,y,linewidth=5.0) > show() > > and not > > from scipy import * > from pylab import * > > x1 = [0.5,0.6,0.7,0.8,

Re: Choosing GUI Module for Python

2009-11-09 Thread Simon Hibbs
Having tried most of the options out there, personaly I've settled on two. I use Tkinter for ver simple GUIs such as single dialog boxes or results displays. The advantage of it being built-in to Python outweighs it's limitations. For anything more complex, I go for PyQT every time. QTDesigner is

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Rami Chowdhury
On Mon, 09 Nov 2009 11:24:33 -0800, Victor Subervi wrote: On Mon, Nov 9, 2009 at 1:53 PM, Rami Chowdhury wrote: On Mon, 09 Nov 2009 10:36:31 -0800, Victor Subervi < victorsube...@gmail.com> wrote: Of course. Let me start with some updates to httpd.conf, which didn't help anyway: Se

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Victor Subervi
On Mon, Nov 9, 2009 at 1:53 PM, Rami Chowdhury wrote: > On Mon, 09 Nov 2009 10:36:31 -0800, Victor Subervi < > victorsube...@gmail.com> wrote: > > Of course. Let me start with some updates to httpd.conf, which didn't help >> anyway: >> >> >> ServerAdmin m...@creative.vi >> DocumentRoot /var/www/

Re: Re: String prefix question

2009-11-09 Thread Alan Harris-Reid
Benjamin Kaplan wrote: On Sun, Nov 8, 2009 at 9:38 PM, Alan Harris-Reid wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple "Hello World" WSGI application which includes the following method... def hello_world_app(environ, start_response): status ='200 OK' # HTTP

questions regarding stack size use for multi-threaded python programs

2009-11-09 Thread Eyal Gordon
Hi, background: we are using python 2.4.3 on CentOS 5.3 with many threads - and our shell's default stack size limit is set to 10240KB (i.e. ~10MB). we noticed that python's Threading module appears to create threads with this value as their stack size (we ran a sample program that creates 10 thr

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Rami Chowdhury
On Mon, 09 Nov 2009 10:36:31 -0800, Victor Subervi wrote: Of course. Let me start with some updates to httpd.conf, which didn't help anyway: ServerAdmin m...@creative.vi DocumentRoot /var/www/html/angrynates.com ServerName angrynates.com Options +ExecCGI -IncludesNoExec Options +ExecCGI

Re: Req. comments on "first version" ch 2 progr. intro (using Python 3.x in Windows)

2009-11-09 Thread Jon Clements
On Nov 9, 5:22 pm, "Alf P. Steinbach" wrote: > * Jon Clements: > > > > > On Nov 9, 4:10 pm, "Alf P. Steinbach" wrote: > >> Chapter 2 "Basic Concepts" is about 0.666 completed and 30 pages so far. > > >> It's now Python 3.x, and reworked with lots of graphical examples and more > >> explanatory te

Re: Choosing GUI Module for Python

2009-11-09 Thread r
On Nov 9, 3:59 am, Antony wrote: > I would like to know about that pros and cons only ... I'll reiterate what i have said and others have said. WE NEED MORE INFO TO PROPERLY GUIDE YOU!!! Survey: What GUI is right for you? 1. What is your level of GUI programming? (0 1 2 3 4 5) 2. Will you be us

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Victor Subervi
Of course. Let me start with some updates to httpd.conf, which didn't help anyway: ServerAdmin m...@creative.vi DocumentRoot /var/www/html/angrynates.com ServerName angrynates.com Options +ExecCGI -IncludesNoExec Options +ExecCGI AllowOverride All AllowOverride FileInfo #AddHandler mod_pytho

Re: Tax Calculator--Tkinter

2009-11-09 Thread Marcus Gnaß
Someone Something wrote: > > from Tkinter import *; Try to avoid this. Better import Tkinter. And don't forget to import Tkconstants too! > > rate=Frame(root) > > income=Frame(root) > > result=Frame(root) Why do you use three frames? You only need one. And you can make your class TaxCalc inherit

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Rami Chowdhury
On Mon, 09 Nov 2009 09:44:24 -0800, Victor Subervi wrote: Did you give up on me? V On Sun, Nov 8, 2009 at 12:40 PM, Victor Subervi wrote: [r...@13gems angrynates.com]# chcon -R -h unconfined_u:object_r:httpd_sys_content_t global_solutions/* Then I surfed to http://209.216.9.56/global_s

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Simon Forman
On Mon, Nov 9, 2009 at 12:44 PM, Victor Subervi wrote: > Did you give up on me? > V > Please don't top-post. -- http://mail.python.org/mailman/listinfo/python-list

Re: Req. comments on "first version" ch 2 progr. intro (using Python 3.x in Windows)

2009-11-09 Thread Alf P. Steinbach
* sstein...@gmail.com: On Nov 9, 2009, at 11:54 AM, Jon Clements wrote: On Nov 9, 4:10 pm, "Alf P. Steinbach" wrote: First, because as opposed to ch 1 there is quite a bit of code here, and since I'm a Python newbie I may be using non-idiomatic constructs, Welp, there goes my last excuse.

Re: Serious Privileges Problem: Please Help

2009-11-09 Thread Victor Subervi
Did you give up on me? V On Sun, Nov 8, 2009 at 12:40 PM, Victor Subervi wrote: > [r...@13gems angrynates.com]# chcon -R -h > unconfined_u:object_r:httpd_sys_content_t global_solutions/* > > Then I surfed to > http://209.216.9.56/global_solutions/index.py > > [r...@13gems angrynates.com]# tail /v

Re: Re: String prefix question

2009-11-09 Thread Alan Harris-Reid
Gerard Flanagan wrote: Alan Harris-Reid wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status ='200 OK' # HTTP Status headers =(b'Content-type',

Re: Req. comments on "first version" ch 2 progr. intro (using Python 3.x in Windows)

2009-11-09 Thread sstein...@gmail.com
On Nov 9, 2009, at 11:54 AM, Jon Clements wrote: On Nov 9, 4:10 pm, "Alf P. Steinbach" wrote: First, because as opposed to ch 1 there is quite a bit of code here, and since I'm a Python newbie I may be using non-idiomatic constructs, Welp, there goes my last excuse. I'm off to write my b

Re: Req. comments on "first version" ch 2 progr. intro (using Python 3.x in Windows)

2009-11-09 Thread Alf P. Steinbach
* Jon Clements: On Nov 9, 4:10 pm, "Alf P. Steinbach" wrote: Chapter 2 "Basic Concepts" is about 0.666 completed and 30 pages so far. It's now Python 3.x, and reworked with lots of graphical examples and more explanatory text, plus limited in scope to Basic Concepts (which I previously just ha

Re: OT: regular expression matching multiple occurrences of one group

2009-11-09 Thread J�rgen Exner
pinkisntwell wrote: >How can I make a regular expression that will match every occurrence >of a group and return each occurrence as a group match? For example, >for a string "-c-c-c-c-c", how can I make a regex which will return a >group match for each occurrence of "-c"? Where is the problem? Th

Re: OT: regular expression matching multiple occurrences of one group

2009-11-09 Thread sln
On Mon, 9 Nov 2009 05:53:00 -0800 (PST), pinkisntwell wrote: >How can I make a regular expression that will match every occurrence >of a group and return each occurrence as a group match? For example, >for a string "-c-c-c-c-c", how can I make a regex which will return a >group match for each oc

Re: Req. comments on "first version" ch 2 progr. intro (using Python 3.x in Windows)

2009-11-09 Thread Jon Clements
On Nov 9, 4:10 pm, "Alf P. Steinbach" wrote: > Chapter 2 "Basic Concepts" is about 0.666 completed and 30 pages so far. > > It's now Python 3.x, and reworked with lots of graphical examples and more > explanatory text, plus limited in scope to Basic Concepts (which I previously > just had as a fir

Re: String prefix question

2009-11-09 Thread Gerard Flanagan
Alan Harris-Reid wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status = b'200 OK' # HTTP Status headers = [(b'Content-type', b'text/plain; charset

Re: [PYTHON] How to set the range for x-axis

2009-11-09 Thread Moses
Hi Chris, The code is from scipy import * from pylab import * x = [0.5,0.6,0.7,0.8,0.9,1.0] y = [2,6,8,10,10,10] plot(x,y,linewidth=5.0) show() and not from scipy import * from pylab import * x1 = [0.5,0.6,0.7,0.8,0.9,1.0] x2 = [0,1,2,3,4,5,6,7,8,9,10] plot(x1,y01,linewidth=5.0) show() Mo

Re: [PYTHON] How to set the range for x-axis

2009-11-09 Thread Moses
Hi Chris, I am using python 2.6 and am using scipy and pylab. See the code below. Cheers. from scipy import * from pylab import * x1 = [0.5,0.6,0.7,0.8,0.9,1.0] x2 = [0,1,2,3,4,5,6,7,8,9,10] plot(x1,y01,linewidth=5.0) show() Thanks. . On Mon, Nov 9, 2009 at 5:49 PM, Chris Rebert wrote: > O

Req. comments on "first version" ch 2 progr. intro (using Python 3.x in Windows)

2009-11-09 Thread Alf P. Steinbach
Chapter 2 "Basic Concepts" is about 0.666 completed and 30 pages so far. It's now Python 3.x, and reworked with lots of graphical examples and more explanatory text, plus limited in scope to Basic Concepts (which I previously just had as a first ch 2 section -- but there's rather a lot of con

Re: OT: regular expression matching multiple occurrences of one group

2009-11-09 Thread Jon Clements
On Nov 9, 1:53 pm, pinkisntwell wrote: > How can I make a regular expression that will match every occurrence > of a group and return each occurrence as a group match? For example, > for a string "-c-c-c-c-c", how can I make a regex which will return a > group match for each occurrence of "-c"?

Re: CGI vs mod_python

2009-11-09 Thread Victor Subervi
Uuuuh. Thanks! V On Mon, Nov 9, 2009 at 10:45 AM, sstein...@gmail.com wrote: > On Nov 9, 2009, at 10:41 AM, Victor Subervi wrote: > > On Mon, Nov 9, 2009 at 10:29 AM, sstein...@gmail.com > wrote: > >> >> On Nov 9, 2009, at 10:18 AM, Victor Subervi wrote: >> >> Yes, obviously. But if CGI is enab

Re: OT: regular expression matching multiple occurrences of one group

2009-11-09 Thread Diez B. Roggisch
pinkisntwell schrieb: How can I make a regular expression that will match every occurrence of a group and return each occurrence as a group match? For example, for a string "-c-c-c-c-c", how can I make a regex which will return a group match for each occurrence of "-c"? Why is this flagged "OT"

Re: [PYTHON] How to set the range for x-axis

2009-11-09 Thread Chris Rebert
On Mon, Nov 9, 2009 at 7:45 AM, Moses wrote: > I have written a script in python to plot a graph. However, the > range for the x-axis starts from 0.5 to 1.0. However, I would like > to start from 0 to 1. Any pointer to this shall be appreciated. Some /very/ basic information such as what plotting

[PYTHON] How to set the range for x-axis

2009-11-09 Thread Moses
Hi Everyone, I have written a script in python to plot a graph. However, the range for the x-axis starts from 0.5 to 1.0. However, I would like to start from 0 to 1. Any pointer to this shall be appreciated. Thanks, Moses -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI vs mod_python

2009-11-09 Thread sstein...@gmail.com
On Nov 9, 2009, at 10:18 AM, Victor Subervi wrote: Yes, obviously. But if CGI is enabled, it should work anyway, should it not? Depends on what "CGI is enabled" means. Usually, web servers are not set to just handle cgi scripts from anywhere, but only from specific file system locations.

Re: CGI vs mod_python

2009-11-09 Thread Victor Subervi
Yes, obviously. But if CGI is enabled, it should work anyway, should it not? V On Mon, Nov 9, 2009 at 9:46 AM, sstein...@gmail.com wrote: > > On Nov 9, 2009, at 9:32 AM, Victor Subervi wrote: > > Hi; >> I've been told by a server farm that they're having trouble getting my >> scripts to work be

Re: Choosing GUI Module for Python

2009-11-09 Thread Kevin Walzer
On 11/8/09 11:49 PM, Antony wrote: Hi all I just wanted to know which module is best for developing designing interface in python . i have come across some modules which are listed here . please tell your suggestions and comments to choose best one 1. PyGTK 2. PyQT 3. PySide 4. wxPyt

Re: Query about doing fortran-esque repeat formatting

2009-11-09 Thread Rob Briggs
Thanks to the chaps who answered, I knew there would be an efficient answer to this. regards, Rob On Mon, 2009-11-09 at 13:31 +0100, Jean-Michel Pichavant wrote: > Glenn Hutchings wrote: > > Rob Briggs mun.ca> writes: > > > > > > > Is there a way to do a repeat formatting command like

Re: CGI vs mod_python

2009-11-09 Thread sstein...@gmail.com
On Nov 9, 2009, at 9:32 AM, Victor Subervi wrote: Hi; I've been told by a server farm that they're having trouble getting my scripts to work because they're written with cgi calls as opposed to mod_python. Is there a basis for their complaint? These pages serve fine on another server.

CGI vs mod_python

2009-11-09 Thread Victor Subervi
Hi; I've been told by a server farm that they're having trouble getting my scripts to work because they're written with cgi calls as opposed to mod_python. Is there a basis for their complaint? These pages serve fine on another server. TIA, Victor -- http://mail.python.org/mailman/listinfo/python

Re: sort values from dictionary of dictionaries python 2.4

2009-11-09 Thread Peter Otten
J Wolfe wrote: > I would like to sort this dictionary by the values of the inner > dictionary ‘ob’ key. Python's built-in dictionary is unsorted by design. > mydict = > {’WILW1′: {’fx’: ‘8.1′, ‘obtime’: ‘2009-11-07 06:45:00′, ‘ob’: ‘6.9′}, > ‘GRRW1′: {’fx’: ‘12.8′, ‘obtime’: ‘2009-11-07 04:15:0

Re: Choosing GUI Module for Python

2009-11-09 Thread sstein...@gmail.com
On Nov 9, 2009, at 3:59 AM, Antony wrote: You may want to offer a little more info, like what exactly you are looking to do with such GUI. are your needs for a VW, Corvette, or Mercedes? etc, etc. All these kits have pros and cons, some better for this some for that, yadda yadda I would l

OT: regular expression matching multiple occurrences of one group

2009-11-09 Thread pinkisntwell
How can I make a regular expression that will match every occurrence of a group and return each occurrence as a group match? For example, for a string "-c-c-c-c-c", how can I make a regex which will return a group match for each occurrence of "-c"? -- http://mail.python.org/mailman/listinfo/python

Re: advice needed for lazy evaluation mechanism

2009-11-09 Thread markolopa
On Nov 9, 1:34 am, MRAB wrote: > markolopa wrote: > > Hi again, > > > I put a copy of the message and the tarball of the code here (because > > of the problem of line breaks): > > >http://python-advocacy.wikidot.com/comp-lang-python-question > > Here's a slightly different approach: A clean and e

ANN: superpy 1.2.1

2009-11-09 Thread Emin.shopper Martinian.shopper
I am pleased to announce the release of superpy 1.2.1 available from http://code.google.com/p/superpy. As this is the first announcement of superpy, any comments and feedback would be much appreciated. -- Superpy distributes python programs across a cluster of machines or across

Re: Query about doing fortran-esque repeat formatting

2009-11-09 Thread Jean-Michel Pichavant
Glenn Hutchings wrote: Rob Briggs mun.ca> writes: Is there a way to do a repeat formatting command like in Fortran? Rather that doing this: print "%s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f" % (parmName[i], tmp[i][1], tmp[i][2], tmp[i][4], tmp[i][6], tmp[i][7], tmp[i][8], tmp[i

Re: Cancelling a python thread (revisited...)

2009-11-09 Thread Antoine Pitrou
Le Sun, 08 Nov 2009 21:04:06 -0800, John Nagle a écrit : > Antoine Pitrou wrote: >> John Nagle animats.com> writes: >>> I'd argue against general thread cancellation. Inter-thread >>> signals, though, have safety problems no worse than the first-thread >>> only signals we have now. You're al

Re: username/password dialog prompt

2009-11-09 Thread Dan Winsor
On Nov 6, 4:40 pm, Cousin Stanley wrote: > > My Tkinter is very rusty but perhaps you could do it > > something like this :  http://pastebin.com/m5e49da19 > > > I forgot how to get rid of the empty root window > > that appears, sorry. > >   root.withdraw()   # should do it Thanks to you both - ex

Re: how to remove the same words in the paragraph

2009-11-09 Thread Tim Chase
I think simple regex may come handy, p=re.compile(r'(.+) .*\1')#note the space s=p.search("python and i love python") s.groups() (' python',) But that matches for only one double word.Someone else could light up here to extract all the double words.Then they can be removed from the o

Re: Query about doing fortran-esque repeat formatting

2009-11-09 Thread Glenn Hutchings
Rob Briggs mun.ca> writes: > Is there a way to do a repeat formatting command like in Fortran? Rather > that doing this: > > print "%s %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f %-5.3f" % > (parmName[i], tmp[i][1], tmp[i][2], tmp[i][4], tmp[i][6], tmp[i][7], > tmp[i][8], tmp[i][9]) There cert

Re: installing library on MAC OS X 10.5.8

2009-11-09 Thread Diez B. Roggisch
Xbiton schrieb: Hi, I'm new to mac and I'm having a lot of problems installing library on mac ox x 10.5.8. I want to install PyXML and although the install procedure - just done like described on the web page of PyXML - That's a 5-years-old XML package. Don't use it. Your python2.5 already fea

how to close not response win32 IE com interface

2009-11-09 Thread elca
hello, these day im making some script that use win32 IE com interface. one of problem is , my internet line is very slow, so sometimes my IE.navigate("http://www.example.com";) not response timely. it looks hang and open status, not complete status. so my IE.navigate function is not correctly wor

Re: Choosing GUI Module for Python

2009-11-09 Thread Antony
On Nov 9, 11:49 am, r wrote: > On Nov 8, 10:49 pm, Antony wrote: > > > Hi all > >    I just wanted to know which module is best for developing designing > > interface in python . > > i have come across some modules which are listed here . please tell > > your suggestions and comments to choose be

Re: Indentation problems

2009-11-09 Thread r
On Nov 8, 1:48 pm, Tim Chase wrote: > > I am having problems with indentation some times. When I hit the enter key > > after if statements or while statemt there are times when the indentation is > > too much and other times too little. Check for omitted brackets, braces and parenthesis. If you e

Re: Choosing GUI Module for Python

2009-11-09 Thread r
On Nov 8, 10:49 pm, Antony wrote: > Hi all >    I just wanted to know which module is best for developing designing > interface in python . > i have come across some modules which are listed here . please tell > your suggestions and comments to choose best one >  1. PyGTK >  2. PyQT >  3. PySide >

Re: Cancelling a python thread (revisited...)

2009-11-09 Thread John Nagle
Antoine Pitrou wrote: John Nagle animats.com> writes: I'd argue against general thread cancellation. Inter-thread signals, though, have safety problems no worse than the first-thread only signals we have now. You're allowed to raise an exception in a signal handler, which is effectively t

Choosing GUI Module for Python

2009-11-09 Thread Antony
Hi all I just wanted to know which module is best for developing designing interface in python . i have come across some modules which are listed here . please tell your suggestions and comments to choose best one 1. PyGTK 2. PyQT 3. PySide 4. wxPython 5 . TKinter Also i need to know is t

Re: Help with OS X installation

2009-11-09 Thread stephen_b
Thanks all. That did it. -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonw.exe under Windows-7 (Won't run for one admin user)

2009-11-09 Thread SD_V897
Dennis Lee Bieber wrote: On Fri, 06 Nov 2009 21:19:44 GMT, SD_V897 declaimed the following in gmane.comp.python.general: AppPath=C:\Program Files\Utilities\Python Scripting v2.62\pythonw.exe That's an interesting path... Did the install path for Python (from either python.org or ac

Re: String prefix question

2009-11-09 Thread Ben Finney
Alan Harris-Reid writes: > From what I can gather from the documentation the b prefix represents > a bytes literal Yes. In Python 3 there are two types with similar-looking literal syntax: ‘str’ and ‘bytes’. The types are mutually incompatible (though they can be explicitly converted). http

Debugging python in emacs isn't working.

2009-11-09 Thread menomnon
Hi, Emacs 22.3, python 2.6.4 Put the following into my .emacs: (setq pdb-path 'c:\\python26\\lib\\pdb.py gud-pdb-command-name (symbol-name pdb-path)) (defadvice pdb (before gud-query-cmdline activate) "Provide a better default command line when called interactively." (interactive (l