:
n = []
for x in keys:
m = r.match(x)
if m:
n.append(m.group(1))
It is more efficient, but much uglier.
Does anyone have a better solution?
Thank,
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
--- On Fri, 12/11/09, Peter Otten <__pete...@web.de> wrote:
> From: Peter Otten <__pete...@web.de>
> Subject: Re: a list/re problem
> To: python-list@python.org
> Date: Friday, December 11, 2009, 4:24 PM
> Ed Keith wrote:
>
> > I have a problem and I am tryin
I am having a problem when substituting a raw string. When I do the following:
re.sub('abc', r'a\nb\nc', '123abcdefg')
I get
"""
123a
b
cdefg
"""
what I want is
r'123a\nb\ncdefg'
How do I get what I want?
T
--- On Wed, 12/16/09, Gabriel Genellina wrote:
> From: Gabriel Genellina
> Subject: Re: Raw string substitution problem
> To: python-list@python.org
> Date: Wednesday, December 16, 2009, 9:35 AM
> En Wed, 16 Dec 2009 11:09:32 -0300,
> Ed Keith
> escribió:
>
> &
n strange!
I think I'll stick with:
>>> m = re.match('^(.*)abc(.*)$', '123abcdefg')
>>> print m.group(1) + r'a\nb\n.c\a' + m.group(2)
123a\nb\n.c\adefg
It's much less likely to fry the poor maintenance programmer's mind.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
ard that creates a searchable CRUD app
in less than a minute. You can view a screencast of the AppWizard in action at
http://j.mp/6kRp0u. It works with MySQL, SQLite, PostgreSQL, and MS Sql Server.
More information can be found at http://dabodev.com
-- Ed Leafe
--
http://mail.python.org/mailman/listinfo/python-list
eyond the "10-minute introduction" stage.
You need to be clear about what you mean by "clean". Is Python scoping "clean"?
I suspect lots of people would argue either side.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
meter set to a constant 2 you use:
f 2
this give you a function which take only one parameter. Using parenthesis make
currying more complicated, so most functional languages do not use them. It did
take me a LONG time to get used to this, but it is only syntax, I do not let
syntax bother me. Semantics on the other hand, are a big deal.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
>
--
http://mail.python.org/mailman/listinfo/python-list
--- On Sun, 1/31/10, Steven D'Aprano
wrote:
> From: Steven D'Aprano
> Subject: Re: Python and Ruby
> To: python-list@python.org
> Date: Sunday, January 31, 2010, 5:36 PM
> On Sun, 31 Jan 2010 04:28:41 -0800,
> Ed Keith wrote:
>
> > In most functional la
e
> will sometimes
> need to know the time. Whether they are "pure functions"
> (functions in
> the mathematical sense) or impure, they're still functions
> in some sense.
> How do you deal with such impure functions?
>
>
>
You pass it a monad
(http://en.wikipedia.org/wiki/Monad_(functional_programming)).
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
ython.org/mailman/listinfo/python-list
>
Not a bad idea, has anyone tried this for x86 machine code?
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
d me to. ETX and EOT were well established, why no use
one of them? I'd love to know what they were thinking.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
--- On Wed, 3/3/10, David Robinow wrote:
> From: David Robinow
> Subject: Re: Docstrings considered too complicated
> To: python-list@python.org
> Date: Wednesday, March 3, 2010, 2:54 PM
> On Wed, Mar 3, 2010 at 1:01 PM, Ed
> Keith
> wrote:
> > --- On Wed, 3/3/
derstandable; the second
only if you are familiar with that particular programming construct. Explicit
is better than implicit, so I'd go with the first form.
-- Ed Leafe
--
http://mail.python.org/mailman/listinfo/python-list
py it to a new spreadsheet
and write the new spreadsheet, but I can't seem to copy the images, and it
looks like copying the formatting is going to be difficult.
Can anyone give me any tips or advice?
Thanks in advance,
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
of results can be much longer.) I
can think of alternatives (raising exceptions), but they all use deep
indenting.
Ideas?
Ed
--
http://mail.python.org/mailman/listinfo/python-list
on.org/mailman/listinfo/python-list
>From The Matplotlib documentation: "Matplotlib only uses BSD compatible code,
>and its license is based on the PSF license."
BSD and PSF both allow commercial use. There is no "copyleft" restriction.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Just thought I'd add my $0.02 here.
I wrote AsciiLitProg (http://asciilitprog.berlios.de/) in Python. It is a
literate programming tool. It generates code from a document. It can generate
code in any language t
--- On Tue, 5/4/10, Stefan Behnel wrote:
> From: Stefan Behnel
> Subject: Re: Teaching Programming
> To: python-list@python.org
> Date: Tuesday, May 4, 2010, 8:40 AM
> Ed Keith, 04.05.2010 14:15:
> > I wrote AsciiLitProg (http://asciilitprog.berlios.de/) in Python.
--- On Tue, 5/4/10, alex23 wrote:
> From: alex23
> Subject: Re: Teaching Programming
> To: python-list@python.org
> Date: Tuesday, May 4, 2010, 10:06 AM
> Ed Keith
> wrote:
> > For more information on Literate Programming in
> general see the following links.
>
--- On Tue, 5/4/10, James Mills wrote:
> From: James Mills
> Subject: Re: Teaching Programming
> To: "python list"
> Date: Tuesday, May 4, 2010, 10:35 AM
> On Wed, May 5, 2010 at 12:21 AM, Ed
> Keith
> wrote:
> > To deal with indentation I had to
> >
--- On Tue, 5/4/10, Andre Engels wrote:
> From: Andre Engels
> Subject: Re: Teaching Programming
> To: "James Mills"
> Cc: "python list"
> Date: Tuesday, May 4, 2010, 11:00 AM
> On Tue, May 4, 2010 at 4:35 PM, James
> Mills
>
> wrote:
> &g
--- On Tue, 5/4/10, Stefan Behnel wrote:
> From: Stefan Behnel
> Subject: Re: Teaching Programming
> To: python-list@python.org
> Date: Tuesday, May 4, 2010, 11:33 AM
> Ed Keith, 04.05.2010 15:19:
> > --- On Tue, 5/4/10, Stefan Behnel wrote:
> >> Ed Keith, 04.05
--- On Tue, 5/4/10, Stefan Behnel wrote:
> From: Stefan Behnel
> Subject: Re: Teaching Programming
> To: python-list@python.org
> Date: Tuesday, May 4, 2010, 11:52 AM
> Ed Keith, 04.05.2010 17:43:
> > The PITA is having to keep track of the indentation of
> each embedd
tt
> --
> http://mail.python.org/mailman/listinfo/python-list
>
It depends on exactly what you want to do. I'd suggest you look at the
following sites:
http://developer.berlios.de/
http://codepad.org/
http://pastebin.com/
http://ideone.com/
One of them might be what your looking for.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
--- On Tue, 5/4/10, alex23 wrote:
> From: alex23
> Subject: Re: Teaching Programming
> To: python-list@python.org
> Date: Tuesday, May 4, 2010, 8:47 PM
> Ed Keith
> wrote:
> > Knuth wanted the generated source to be unreadable, so
> people would not be tempted
se it, but others might, and you may get paid for
your work.
The bottom line is: if you want the largest possible user base, go with a less
restrictive license; If you hope to profit financially from your work, use the
GPL.
Just my $0.02, I hope it is helpful.
-EdK
Ed Keith
e_...@yaho
LGPL code. So I do not waist my time
learning to use libraries covered by restrictive licenses. So if you want me to
even consider using your library do not use GPL, or LGPL. I favor the Boost
license in this case.
I hope this is useful.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspo
resort of those who have run out of good arguments. The
more you engage in it the weaker you make your position.
This thread is generating more heat than light, and probably should be dropped.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/m
--- On Thu, 5/13/10, Lawrence D'Oliveiro
wrote:
> From: Lawrence D'Oliveiro
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Thursday, May 13, 2010, 8:38 AM
> In message ,
> Ed Keith
> wrote:
>
> > If, on the other hand you are r
y?
I vote for C, but would like to hear any arguments for another position.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
--- On Wed, 5/12/10, Lawrence D'Oliveiro
wrote:
> From: Lawrence D'Oliveiro
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Wednesday, May 12, 2010, 11:48 PM
> In message ,
> Ed Keith
> wrote:
>
> > ... but to claim that putting
com>,
> Patrick
> Maupin wrote:
>
> > On May 12, 10:48 pm, Lawrence D'Oliveiro
> >
> wrote:
> >
> >> In message ,
> Ed
> >> Keith wrote:
> >>
> >> > ... but to claim that putting more
> restrictions on someone give them
gt; prohibitied
> open source derivatives.
If I use MIT licensed code, I can give someone else access to the program with
out binding them to the legal restrictions of the GPL.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
ALWAYS give my client my source code. But I do not want to bind them to the
requirements of the GPL, I want them to be free do do what they want with the
program, so I never incorporate any GPLed code in my projects.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
--- On Thu, 5/13/10, Lawrence D'Oliveiro
wrote:
> From: Lawrence D'Oliveiro
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Thursday, May 13, 2010, 11:06 PM
> In message ,
> Ed Keith
> wrote:
>
> > Assertion I:
> > If per
--- On Thu, 5/13/10, Lawrence D'Oliveiro
wrote:
> From: Lawrence D'Oliveiro
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Thursday, May 13, 2010, 11:07 PM
> In message ,
> Ed Keith
> wrote:
>
> > On Thu, 5/13/10, Lawrence D
--- On Thu, 5/13/10, Patrick Maupin wrote:
> From: Patrick Maupin
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Thursday, May 13, 2010, 11:45 PM
> On May 13, 10:06 pm, Lawrence
> D'Oliveiro central.gen.new_zealand> wrote:
> > I
.
Any MIT licensed code that I may have used is still in the common. My using it
did not reomove it from the common.
Has the fact that Python has been used for many commercial/propitiatory
projects reduced your ability to make use of it? If so how?
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
How exactly does the LGPL lead to a requirement to
> “relink”?
>
> I think this might be a misconception, but I'm not 100%
> sure. Since
> Ed gives his customers full source code, there may not be
> the
> requirement to directly provide the ability to relink,
> because &qu
of
Boost I would not have had this problem?
I use the Boost Libraries (http://www.boost.org/) in most of my code. Do you
believe they are likely to disappear because they are not covered by the GPL?
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
PL
today, I can change my mind and release the same code under the Boost
license tomorrow. But if I release it with the Boost license, while
technically I can release it with the GPL tomorrow, in practice everyone
will use the previously released Boost licensed version.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
by the GPL are a
strict subset of the right granted by the Boost license. So your argument does
not work.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
e license. When I
deliver my code to the client they are always free to do whatever they want
with it.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
disk. And if he give his friend the binary disk, but not the source disk
(which is of no value to him or his friend), then he is in violation of
the law, and he cannot even understand why.
The GPL is fine when all parties concern understand what source code is
and what to do with it. But when
a GPLed version of Python, I think the license is permissive enough to
allow that. If you did, do you think more people would use the GPLed
version?
Personally, I would use the version with the more permissive license, unless
the GPLed version offered a significant advantage of some kind.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
--- On Fri, 5/14/10, Lawrence D'Oliveiro
wrote:
> From: Lawrence D'Oliveiro
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Friday, May 14, 2010, 9:58 PM
> In message ,
> Ed Keith
> wrote:
>
> > Yes, under the GPL every one has
--- On Fri, 5/14/10, Lawrence D'Oliveiro
wrote:
> From: Lawrence D'Oliveiro
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Friday, May 14, 2010, 10:07 PM
> In message ,
> Ed Keith
> wrote:
>
> > That is one good reason for choo
--- On Fri, 5/14/10, Paul Boddie wrote:
> From: Paul Boddie
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Friday, May 14, 2010, 8:12 PM
> On 14 Mai, 21:18, Ed Keith
> wrote:
> >
> > The GPL is fine when all parties concern understand
>
--- On Fri, 5/14/10, Steven D'Aprano
wrote:
> From: Steven D'Aprano
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Friday, May 14, 2010, 10:59 PM
> On Fri, 14 May 2010 06:39:05 -0700,
> Ed Keith wrote:
>
> > Yes, under the GPL every
--- On Thu, 5/13/10, Steven D'Aprano
wrote:
> From: Steven D'Aprano
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Thursday, May 13, 2010, 7:41 PM
> On Thu, 13 May 2010 06:24:04 -0700,
> Ed Keith wrote:
>
> > --- On Thu, 5/13
--- On Sat, 5/15/10, Robert Kern wrote:
> From: Robert Kern
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Saturday, May 15, 2010, 1:10 PM
> On 2010-05-14 21:37 , Steven D'Aprano
> wrote:
> > On Fri, 14 May 2010 06:42:31 -0700, Ed Keith wrote
--- On Sat, 5/15/10, Lawrence D'Oliveiro
wrote:
> From: Lawrence D'Oliveiro
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Saturday, May 15, 2010, 11:06 PM
> In message ,
> Ed Keith
> wrote:
>
> > On Fri, 5/14/10, Lawrence D
—Andy Rooney, _Boston |
> _o__)
>
>
> Globe_ 1982-05-30 |
> Ben Finney
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Why don't your own customers under cut you? If you sell someone GPLed
software they have t
--- On Sat, 5/15/10, Duncan Booth wrote:
> From: Duncan Booth
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Saturday, May 15, 2010, 8:52 AM
> Ed Keith
> wrote:
>
> > I can not imagine anyone being stupid enough to pay me
> for rights
--- On Sat, 5/15/10, Lawrence D'Oliveiro
wrote:
> From: Lawrence D'Oliveiro
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Saturday, May 15, 2010, 11:09 PM
> In message ,
> Ed Keith
> wrote:
>
> > But if my client give someone
--- On Tue, 5/18/10, Robert Kern wrote:
> From: Robert Kern
> Subject: Re: Picking a license
> To: python-list@python.org
> Date: Tuesday, May 18, 2010, 12:03 PM
> On 2010-05-16 09:25 , Ed Keith
> wrote:
> >
> > --- On Sat, 5/15/10, Lawrence D'Oliveir
> }
>
>
>
> />
> />
>
>
>
>
> --
> Cheers
> Anton
> --
> http://mail.python.org/mailman/listinfo/python-list
>
But that is in a fixed size field, can you make the height change based on the
height of the browser window, and still keep it centered?
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Nice! I've been looking for that trick for some time.
Thank you,
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--- On Mon, 6/14/10, AD. wrote:
> From: AD.
> Subject: Re: GUIs - A Modest Proposal
> To: python-list@python.org
> Date: Monday, June 14, 2010, 8:
; --
> http://mail.python.org/mailman/listinfo/python-list
>
I agree you should learn a DIFFERENT programming language. Perl, Python, & Ruby
are all quite similar. If you want to expand your horizons, learn one of the
following:
Forth -lots of fun.
Assembler - give you a m
Dennis Lee
> Bieber AF6VN
> wlfr...@ix.netcom.com
> HTTP://wlfraed.home.netcom.com/
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Try J. It does not require a special keyboard.
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
dev.com/pycon_tutorial
If you have any other questions, join our email discussion list and
post them there. There are many helpful people there to answer your questions.
http://leafe.com/mailman/listinfo/dabo-users
-- Ed Leafe
--
http://mail.python.org/mailman/listinfo/python-list
I downloaded the ISO, but it seems to be just a bit too big to fit on a CD!
This seems odd to me, has anyone else had this problem?
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--- On Tue, 7/6/10, sturlamolden wrote:
> From: sturlamolden
> Subject: Download Microso
Where are you located?
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--- On Fri, 7/9/10, Greg wrote:
> From: Greg
> Subject: python instructor
> To: python-list@python.org
> Date: Friday, July 9, 2010, 10:09 AM
> We're looking for a first-rate python
>
has always bothered me because relinking without recompiling (even when
dynamic linking) in C/C++ is a good way to crash a program. But this should not
be a problem with Python.
> MIT license
This one is good.
> Mozilla Public license 1.1
I avoid this one.
> New BSD Licens
IDE.
>
> I am not seeing how this might be done. Many thanks for your help...
Check out PuDB - I use it all the time. http://pypi.python.org/pypi/pudb
Intro screencast is at http://vimeo.com/5255125
-- Ed Leafe
--
http://mail.python.org/mailman/listinfo/python-list
aced all ... the string "to " (note the space).
awk '{idx=index($0,"to "); tgt=substr($0,1,idx-1); gsub(/ /,"_",tgt);
print tgt substr($0,idx)}' file
Ed.
--
http://mail.python.org/mailman/listinfo/python-list
y now and then. It is however, much like the framework
in question, best kept private and not made public.
Ed
--
http://mail.python.org/mailman/listinfo/python-list
y this works and is it safe to rely on it or is
there a better approach? BTW, this works in a program too, it's not
just an artifact of the command line interpreter globals() = locals()
thing.
Thanks
Ed
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 13, 8:15 pm, Steven D'Aprano
wrote:
> Metaclasses are left as an exercise for the reader.
The parent class has a metaclass, which is why I was trying this
approach instead, since it let me get at the class attributes before
the metaclass did. Overriding the metaclass looked to be a much m
; the term is that it's a static verification technique,
> marketing-speak
> annotating subroutines with pre- and post- conditions that
> can be
> checked with Hoare logic. Runtime checks wouldn't
> qualify as that.
Eiffel throws an exception when a contract is violated.
Dabo encryption
- changed all pathing to be relative to the app's HomeDirectory
- full parameterization of SQL calls
- addition of the dRichTextBox control
- improvement of unicode support with the dabo.lib.ustr() method
You can grab the latest version, as always, from
http://dabodev.com/do
We have hundreds
of developers around the world using Dabo to build many different kinds of
business applications.
-- Ed Leafe
--
http://mail.python.org/mailman/listinfo/python-list
le and consistent.
I see this in python 2.6.4 on Ubuntu 9.10 and also in 2.5.2 on Ubuntu
8.04 (Hardy), both using the installed packages.
I must be missing something. Assistance will be welcome.
Thanks,
Ed Greenberg
--
http://mail.python.org/mailman/listinfo/python-list
On 09/15/2010 02:04 PM, Thomas Jollans wrote:
On Wednesday 15 September 2010, it occurred to Ed Greenberg to exclaim:
I'm pretty new to Python, but I am really enjoying it as an alternative
to Perl and PHP.
When I run the debugger [import pdb; pdb.set_trace()] and then do next
and
? Are there other
options I have overlooked?
-EdK
Ed Keith
e_...@yahoo.com
Blog: edkeith.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
You may want to look at udacity.com CS101. This is a free web based
training program. CS101 introduces Python the next sessions starts the week
of April 16. During the 7 weeks of sessions you will build a web browser.
Ed W LaHay
+1 925 429 1958
-Original Message-
From: python-list
error, you could use a 4xx code.
However, I would prefer to use the standard codes, and add a custom header with
more information on the issue.
-- Ed Leafe
--
https://mail.python.org/mailman/listinfo/python-list
301 - 378 of 378 matches
Mail list logo