Re: Python setup not working on Windows XP

2008-01-08 Thread Graham Dumpleton
On Jan 8, 5:31 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > Gowri <[EMAIL PROTECTED]> wrote: > > >I am new to Python and am trying to setup Apache to serve Python using > >mod_python. I'm using a Windows XP box. here is a list of steps i > >followed for the installation: > > >1. Installed Apache 2.

Re: Open source English dictionary to use programmatically w/ python

2008-01-08 Thread Tobiah
dgoldsmith_89 wrote: > Can anyone point me to a downloadable open source English dictionary > suitable for programmatic use with python: I'm programming a puzzle > generator, and I need to be able to generate more or less complete > lists of English words, alphabetized. Thanks! DG If all you wan

'Borg' and multiple threads.

2008-01-08 Thread Tobiah
I have a class that I call Borg that starts like this: class Borg(dict): static_state = {} def __init__(self): self.__dict__ = self.static_state so that I can access the same data from anywhere within any module or function just by instantiating one. This is use

Spring Python 0.3.2 is release!

2008-01-08 Thread Goldfish
Spring Python (http://springpython.python-hosting.com) version 0.3.2 was released yesterday. It contains a patch to an error discovered 12/19/2007 in XmlApplicationContext, that broke when PROTOTYPE scoping was used. Test cases have been updated to detect this bug, and in turn the correction was m

Spaces and tabs messing up code

2008-01-08 Thread mobiledreamers
my friend uses vim and i use xemacs so our shared python code is a mix of tabs and spaces and it is hard for him to edit it in vim any idea on how to make it clean convert it all to 4 spaces? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: popen question

2008-01-08 Thread Karthik Gurusamy
On Jan 8, 1:20 am, Robert Latest <[EMAIL PROTECTED]> wrote: > Hello, > > look at this function: > > -- > def test(): > child = os.popen('./slow') > for line in child: > print line > - > > The program "slow" just writes the numbers 0 through 9 on stdout, one l

Help wanted with GTK+ program

2008-01-08 Thread Hollaburoo
I'm working on a simple GTK+ wrapper around the flash Pandora Radio player (Pandora.com). It's very basic right now but I've got it almost working. I'm using gtkmozembed to fetch and use the player and dbus to detect multimedia keys. The only problem I'm having is that the mozembed widget doesn't

Re: [Tutor] Spaces and tabs messing up code

2008-01-08 Thread Bill Campbell
On Tue, Jan 08, 2008, [EMAIL PROTECTED] wrote: > > my friend uses vim > > and i use xemacs > > so our shared python code is a mix of tabs and spaces and it is hard > for him to edit it in vim > > any idea on how to make it clean > > convert it all to 4 spaces? Do that, and in his ~/.vi

ctypes

2008-01-08 Thread hkimball
I am trying to call a function in a third party dll that spawns an exe and I am using ctypes. Python does not complain at all but the other process does not get spawned. It appears that I am gaining access to the functions but with no results. Any ideas? Thanks in advance. >>> from ctypes impo

Re: 'Borg' and multiple threads.

2008-01-08 Thread Mike Mazur
Hi, On Jan 8, 2008 7:24 AM, Tobiah <[EMAIL PROTECTED]> wrote: > I have a class that I call Borg that starts like this: > > class Borg(dict): > > static_state = {} > def __init__(self): > self.__dict__ = self.static_state > > > so that I can access the same data from

user friendly datetime features

2008-01-08 Thread Daniel Fetchinson
Many times a more user friendly date format is convenient than the pure date and time. For example for a date that is yesterday I would like to see "yesterday" instead of the date itself. And for a date that was 2 days ago I would like to see "2 days ago" but for something that was 4 days ago I wou

Re: [Tutor] Spaces and tabs messing up code

2008-01-08 Thread Bill Burns
[EMAIL PROTECTED] wrote: > my friend uses vim > and i use xemacs > so our shared python code is a mix of tabs and spaces and it is hard for > him to edit it in vim > > any idea on how to make it clean > convert it all to 4 spaces? > > Thanks > Take a look at reindent.py. This script lives in

site promotion

2008-01-08 Thread justin . evans2
hello, i would like to advertise a few sites their all pretty healthy t make improvements to your life! one of them is www.bigleagueplayersclub.com/3clicks/published/67153/196170 thanks check it ut thers more verious things to see -- http://mail.python.org/mailman/listinfo/python-list

Natural-language datetime parsing and display (was: user friendly datetime features)

2008-01-08 Thread Ben Finney
"Daniel Fetchinson" <[EMAIL PROTECTED]> writes: > I'm guessing this feature is needed so often in so many projects that > it has been implemented already by several people. Does anyone know of > such a stand alone module? The 'python-dateutil' library allows easy *programmatic* manipulation of re

Re: Open a List of Files

2008-01-08 Thread BJ Swope
On Jan 8, 2008 7:22 AM, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Fredrik Lundh <[EMAIL PROTECTED]> writes: > > > BJ Swope wrote: > > > >> the code looks ok. please define "not working". > >> > >> Yep, defining "not working" is always helpful! :) > >> > >> I want to have all 3 files open at

Re: [Tutor] Spaces and tabs messing up code

2008-01-08 Thread Reed O'Brien
On Jan 8, 2008, at 7:49 PM, Bill Campbell wrote: > On Tue, Jan 08, 2008, [EMAIL PROTECTED] wrote: >> >> my friend uses vim Small editors for small minds;) >> >> and i use xemacs >> >> so our shared python code is a mix of tabs and spaces and it is >> hard >> for him to edit it in vim >

Collecting Rich Data Structures for students

2008-01-08 Thread [EMAIL PROTECTED]
Greetings Pythoneers -- Some of us over on edu-sig, one of the community actives, have been brainstorming around this Rich Data Structures idea, by which we mean Python data structures already populated with non-trivial data about various topics such as: periodic table (proton, neutron counts);

Re: Open a List of Files

2008-01-08 Thread Terry Jones
Hi BJ > > Fredrik Lundh <[EMAIL PROTECTED]> writes: > > Or in a dict: > > > > open_files = {} > > for fn in ['messages', 'recipients', 'viruses']: > >open_files[fn] = open(getfilename(fn), 'w') > > I decided that I was just trying to be "too smooth by 1/2" so I fell back > to ... > > message

Re: Spaces and tabs messing up code

2008-01-08 Thread Robert Hicks
[EMAIL PROTECTED] wrote: > my friend uses vim > and i use xemacs > so our shared python code is a mix of tabs and spaces and it is hard for > him to edit it in vim > > any idea on how to make it clean > convert it all to 4 spaces? > > Thanks > :set ts=4 :retab! :h retab -- http://mail.pyt

Re: Open a List of Files

2008-01-08 Thread Tim Chase
> I decided that I was just trying to be "too smooth by 1/2" so I fell back to > > messages = open(os.path.join(host_path,'messages.txt'), 'wb') > deliveries = open(os.path.join(host_path,'deliveries.txt'), 'wb') > actions = open(os.path.join(host_path,'actions.txt'), 'wb') > parts = open(os.path.

Re: Python's great, in a word

2008-01-08 Thread Basilisk96
On Jan 7, 8:09 am, [EMAIL PROTECTED] wrote: > I'm a Java guy who's been doing Python for a month now and I'm > convinced that > > 1) a multi-paradigm language is inherently better than a mono-paradigm > language > > 2) Python writes like a talented figure skater skates. > > Would you Python old-tim

Re: Spaces and tabs messing up code

2008-01-08 Thread Ben Finney
Robert Hicks <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > my friend uses vim > > and i use xemacs > > so our shared python code is a mix of tabs and spaces and it is hard > > for him to edit it in vim > > any idea on how to make it clean > > convert it all to 4 spaces? > > Thanks >

Pyflakes pre-commit hook in subversion

2008-01-08 Thread Mark
http://tarekziade.wordpress.com/2006/11/01/protecting-a-python-svn-code-base-with-the-pre-commit-hook/ Is it possible to check code in python before committing to svn   using pyflakes, pythontidy Pyflakes and Subversion Pyflakes is a nice little utility that checks your Python code for err

Default location of python on OS X

2008-01-08 Thread Stephen_B
I've installed the latest 2.5 python today from python.org, and I think it ended up in "/Applications/MacPython 2.5". I also have a "/Applications/MacPython 2.4" and a "/Applications/ MacPython-2.4". Can I delete these, or did one of them come with Leopard? I still have a "/Library/Python/2.3" an

module pickle

2008-01-08 Thread Beema shafreen
Hi I am beginner in python. and I am not able to understand the Pickle concept in python can. some body explain me about the use of this module, few examples. which will help me a lot. regards shafreen -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] Pyflakes pre-commit hook in subversion

2008-01-08 Thread mobiledreamers
yes the link is broken and hence i sent it in since it is a conf file for svn pre-commit hook so pyflakes is run of your tree and it emits an error if python files have any error preventing bad commits poisoning svn tree so dev can fix the bug and recommit On Jan 8, 2008 8:08 PM, Kent Johnson <[EM

Re: pipes python cgi and gnupg

2008-01-08 Thread alisonken1
On Dec 28 2007, 7:07 pm, [EMAIL PROTECTED] wrote: > form = cgi.FieldStorage() > if not form.has_key("pass"): >print "Enter password" > > filename = "test.gpg" > pass = form.getvalue("pass").strip() > os.system("gpg --version > gpg.out") > os.system("echo %s | gpg --batch --password-fd 0 --decr

Re: Default location of python on OS X

2008-01-08 Thread Tommy Nordgren
On 9 jan 2008, at 04.43, Stephen_B wrote: > I've installed the latest 2.5 python today from python.org, and I > think it ended up in "/Applications/MacPython 2.5". > > I also have a "/Applications/MacPython 2.4" and a "/Applications/ > MacPython-2.4". Can I delete these, or did one of them come w

Re: copy a numpy array

2008-01-08 Thread jimgardener
thanx guys for the replies need a little clarification srcarray=array([1.2,2.3,3.4,4.5,5.6]) destarray=array(srcarray,copy=False) then srcarray[2]=99.9 will cause the change to be reflected in both src and dest. doesn't that mean data is shared between both arrays? but if i do destarray=array(sr

Re: Open a List of Files

2008-01-08 Thread BJ Swope
On Jan 8, 2008 9:34 PM, Terry Jones <[EMAIL PROTECTED]> wrote: > > I think you should revisit this decision. Something like Fredrik's code > is > the way to go. It has multiple advantages: > > - It's much shorter. > - It's arguably easier to add/remove to/from. > - It has less risk of error (

Re: Default location of python on OS X

2008-01-08 Thread Stephen_B
On Jan 8, 11:33 pm, Tommy Nordgren <[EMAIL PROTECTED]> wrote: > > I still have a "/Library/Python/2.3" and a "/Library/Python/2.5". > > > Thanks. > > > Stephen > Leopard INCLUDES Python 2.5, there is no need to install it. Thanks -- that made the decision easy. I didn't need all those MacP

Re: module pickle

2008-01-08 Thread Nikola Stjelja
On Jan 9, 2008 5:29 AM, Beema shafreen <[EMAIL PROTECTED]> wrote: > Hi I am beginner in python. and I am not able to understand the Pickle > concept in python can. some body explain me about the use of this module, > few examples. which will help me a lot. > > regards > shafreen > > -- > http://m

Re: Pet Store

2008-01-08 Thread Nikola Stjelja
On Jan 8, 2008 7:32 PM, George Maggessy <[EMAIL PROTECTED]> wrote: > Yeap. It is. I'm looking for something like that app. Smth that I > could base my future developments on. > > On Jan 8, 1:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > On Mon, 07 Jan 2008 22:21:53 -0800, George M

Congratulations to the CPython Developers on an outstanding codebase

2008-01-08 Thread Paddy
It looks a bit like an add for Coverity, but under all that, they seem to have picked Python as one of the OS projects to test with their improved testing software because our developers were so good at working on any "bugs" reported by their earlier tool. Good job guys. http://scan.coverity.com

Re: Pet Store

2008-01-08 Thread Jeroen Ruigrok van der Werven
-On [20080108 19:36], George Maggessy ([EMAIL PROTECTED]) wrote: >Yeap. It is. I'm looking for something like that app. Smth that I >could base my future developments on. If you want to go the Ruby on Rails-like road then you have Django, Pylons, TurboGears, Zope, to name four of the

Re: Collecting Rich Data Structures for students

2008-01-08 Thread Paddy
On Jan 9, 2:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Greetings Pythoneers -- > > Some of us over on edu-sig, one of the community actives, > have been brainstorming around this Rich Data Structures > idea, by which we mean Python data structures already > populated with non-trivial d

Re: hkimball's question on ctypes

2008-01-08 Thread oyster
2008/1/9, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Date: Tue, 8 Jan 2008 17:11:18 -0800 (PST) > Subject: ctypes 1. please make your title more specific > >>> from ctypes import * > >>> cdecl = > cdll.LoadLibrary("c:\projects\python\geinterface.dll") 2. are you sure '\' is ok? cdll.LoadLibrary(r"c:

Re: Open a List of Files

2008-01-08 Thread Fredrik Lundh
Terry Jones wrote: > I think you should revisit this decision. Something like Fredrik's code is > the way to go. He used my suggestion, just for a few more files than he had in his original post. Seriously, for a limited number of files, the dictionary approach is mostly pointless; you end up

Tracking colors

2008-01-08 Thread dongie . agnir
I'm just getting started with Python, and I want to do a bit of color tracking using VideoCapture. However, I've never worked with video or images, so I'm a little at a loss. How would I use VideoCapture to track a specified color, and its coordinates? -- http://mail.python.org/mailman/listinfo/

<    1   2