map in Python

2005-01-21 Thread Stu
I have recently switched over to Python from Perl. I want to do something like this in Python: @test = ("a1", "a2", "a3"); map {s/[a-z]//g} @test; print @test; However, I take it there is no equivalent to $_ in Python. But in that case how does map pass the elements of a sequence to a function? I

Re: Looking for the Perfect Editor

2006-09-13 Thread stu
jedit http://www.jedit.org/ much better than textpad by a longshot. but whatever you choose... -stu -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for the Perfect Editor

2006-09-13 Thread stu
is crap. textpad requires payment, and if someone is gonna pay for it they might as well buy ultraedit instead.. but they need to atleast checkout jedit first :) with its plugins for jython + jpydebug... -stu -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for the Perfect Editor

2006-09-14 Thread stu
port from the buffer or load it.. or fire jython up from the plugin menu there is also a colour scheme plugin that gives you colour defaults if you want it to look lke emacs or jbuilder or idea etc etc etc jedit is pretty rich with its plugins. -stu -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for the Perfect Editor

2006-09-14 Thread stu
one long line. In other words, an > editor that separates how the text is DISPLAYED from how it's SAVED. > jEdit.. cough.. does this just fine... sticky indent without adding linebreaks... or you can have sticky indent with linebreaks... its up to you -stu -- http://mail.python.org/mailman/listinfo/python-list

Great example of a python module/package following up to date conventions.

2010-01-28 Thread Big Stu
I'm hoping someone on here can point me to an example of a python package that is a great example of how to put it all together. I'm hoping for example code that demonstrates: -Strict adherence to PEP 8 -thorough use of Docstrings -Conventional directory structure/package layout -Appropriate use

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread Big Stu
On Jan 28, 2:28 pm, Josh Holland wrote: > On 2010-01-28, Big Stu wrote: > > > I'm hoping someone on here can point me to an example of a python > > package that is a great example of how to put it all together.  I'm > > hoping for example code that demonstrate

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread Big Stu
> Have you actually looked at any of the standard library? > > Jean-Paul I'm looking at urllib2 right now and it is covering a bunch of the bases I'm looking for. And grepping in the /usr/lib/python2.5/ folder for import statements on various things I'm interested in is bringing up some good exa