standard used by millions; the spec is pretty much irrelevant (unless
you're a compiler writer or language theorist).
George
--
http://mail.python.org/mailman/listinfo/python-list
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 Maggessy wrote:
I'm an experience Java developer trying to learn Python. I
On Jan 7, 9:27 am, Kay Schluehr [EMAIL PROTECTED] wrote:
On Jan 7, 12:53 pm, Berco Beute [EMAIL PROTECTED] wrote:
Cool! We knew it would happen one day :)
What could be the reason? Python 3? Jython 2.2? Java's loss of
sexiness?
Python eats Perls lunch as a scripting language.
Even
to agree on a word or two that
completes:
The best thing about Python is ___.
... it's a pleasure to write *and* read.
... it keeps simple things simple and makes hard things doable.
... it's the language that sucks the least.
George
--
http://mail.python.org/mailman/listinfo/python-list
Hi Guys,
Is there a python user group in the bay area?
Cheers,
George
--
http://mail.python.org/mailman/listinfo/python-list
think that would help me to fill up some gaps in my
learning process. Does anybody know any app like that?
Cheers,
George
--
http://mail.python.org/mailman/listinfo/python-list
and (maybe) easier to read
but perhaps not as flexible and general. Regardless, it's a good
example of takewhile/dropwhile.
George
--
http://mail.python.org/mailman/listinfo/python-list
-intuitive design
choices.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 28 Dec 2007 22:07:12 -0800 (PST), [EMAIL PROTECTED] wrote:
Ada is airline/dod blessed.
Airline blessed maybe. The DOD revoked its Ada only edict because
they couldn't find enough Ada programmers. AFAIK, Ada is still the
preferred language, but it is not required.
George
--
for email
not everyone
works in RT, but I can't possibly be alone in developing applications
that are hard to restart effectively.
That all said, online compilation such as in Lisp is only one of
several ways of replacing running code. Whether it is the best way is
open for debate.
George
--
for email reply
combs.py, line 54, in module
for c in combinations(xrange(4), 3): print c
File combs.py, line 12, in combinations
for cc in combinations(seq[i+1:], n-1):
TypeError: sequence index must be integer, not 'slice'
George
--
http://mail.python.org/mailman/listinfo/python-list
a fiction writer by any chance ? Nice story but I somehow
doubt that the number of lines of the form name = 0x ever written in
Python is greater than a single digit (with zero the most likely one).
George
--
http://mail.python.org/mailman/listinfo/python-list
.
Here's the relevant thread: http://preview.tinyurl.com/2aeswn. Note
that the builtin eval() is around 5x faster than this parser, and from
the statement above, 50x faster than the pyparsing solution.
George
--
http://mail.python.org/mailman/listinfo/python-list
new style classes to worry about when the
very standard library includes lots of legacy code.
George
--
http://mail.python.org/mailman/listinfo/python-list
they are the 3rd party here ;-)) module.
Even if it's technically possible and the change doesn't break other
things, I'd rather not have to maintain a patched version of the
stdlib.
George
--
http://mail.python.org/mailman/listinfo/python-list
itertools import islice, chain, repeat
def unpack(iterable, n, default=None):
return islice(chain(iterable,repeat(default)), n)
a, b, c = unpack(seq, 3)
George
--
http://mail.python.org/mailman/listinfo/python-list
csvutils is a single Python module for easily transforming csv (or csv-
like) generated rows. The release is available at
http://pypi.python.org/pypi/csvutils/0.1.
Regards,
George
What is csvutils?
The standard csv module is very useful for parsing tabular data in CSV
for rationals as
for decimals (mainly money counting).
George
--
http://mail.python.org/mailman/listinfo/python-list
such framework as well.
Looking forward for suggestions Python community!
You may want to check out these first:
http://dirtsimple.org/2004/12/python-is-not-java.html
http://www.razorvine.net/python/PythonComparedToJava
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 14, 9:57 am, Stargaming [EMAIL PROTECTED] wrote:
On Tue, 11 Dec 2007 08:57:16 -0800, George Sakkis wrote:
Closer, but still wrong; for some weird reason, __import__ for modules
in packages returns the top level package by default; you have to use
the 'fromlist' argument
and time again people
cared about some syntax for properties without any change so far. The
result is a handful of different ways to spell out properties; python
2.6 will add yet another variation (http://mail.python.org/pipermail/
python-dev/2007-October/075057.html).
George
--
http
, it was too much ahead of its time.. who knows, it might
revive on some 3.x version.
George
--
http://mail.python.org/mailman/listinfo/python-list
._foo
def fset(self, value):
self._foo = value
That's almost identical to a recipe I had written once upon a time,
without requiring a syntax change:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410698
George
--
http://mail.python.org/mailman/listinfo/python-list
support for
properties.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 12, 2:23 pm, Chris Mellon [EMAIL PROTECTED] wrote:
On Dec 12, 2007 12:53 PM, George Sakkis [EMAIL PROTECTED] wrote:
On Dec 12, 1:12 pm, Christian Heimes [EMAIL PROTECTED] wrote:
Kay Schluehr wrote:
class A(object):
foo = property:
def fget(self
of garbage collection sounds kinda fishy.
Posting some actual code usually helps; it's hard to tell for sure
otherwise.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 10, 11:07 pm, Stargaming [EMAIL PROTECTED] wrote:
On Mon, 10 Dec 2007 19:27:43 -0800, George Sakkis wrote:
On Dec 10, 2:11 pm, Stargaming [EMAIL PROTECTED] wrote:
On Mon, 10 Dec 2007 16:10:16 +0200, Nikos Vergas wrote:
[snip]
Problem: In the dynamic language of your choice
,c.count(i))for i in set(c))
George
--
http://mail.python.org/mailman/listinfo/python-list
=-1l4=-1commit=Update
George
--
http://mail.python.org/mailman/listinfo/python-list
than Python. And FYI, Google didn't start out with the
popularity it enjoys today, it gained it *despite* the silly name.
Thanks God it was created by geeks and not clueless PHBs like those
that dismiss Python for its name.
George
--
http://mail.python.org/mailman/listinfo/python-list
), but this has
more to do with Perl's fall than Python's increase:
http://www.tiobe.com/tiobe_index/Perl.html.
Even more amazing is the rate C++ is losing ground:
http://www.tiobe.com/tiobe_index/C__.html
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 4, 11:07 am, Paul Rudin [EMAIL PROTECTED] wrote:
George Sakkis [EMAIL PROTECTED] writes:
Even more amazing is the rate C++ is losing ground:
http://www.tiobe.com/tiobe_index/C__.html
I don't really find surprising that low level languages lose ground at
the expense of higher level
On Dec 1, 9:06 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
Pythons are big, non-poisonous snakes good for keeping the rats out
of a system G
I'm looking forward to Spider(TM), the first bug-free language ;-)
--
http://mail.python.org/mailman/listinfo/python-list
George Notaras added the comment:
Thanks for the quick fix and the workaround.
You are right about position 756. I hadn't spent enough time studying
the ''ustar'' format.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1531
George Notaras added the comment:
Indeed, I have downloaded the latest tarfile module from svn and it
works as expected. I should have done this in the first place.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1529
New submission from George Notaras:
Assume the following situation:
- a healthy and uncompressed tar file: a.tar
- the metadata of the 1st and second files within the archive start at
positions 0 and 756 (realistic example values)
I partially damage 200 bytes of metadata (byte range 0-500
New submission from George Notaras:
Assume a healthy uncompressed tar file: a.tar
When trying to open the tarfile using a fileobject, there is always an
exception:
f_raw = open(a.tar, rb)
import tarfile
f_tar = tarfile.open(mode=r:, fileobj=f_raw)
Traceback (most recent call last):
File
/Scheme would be even more suited
for this task but then again there's a Web framework (TurboGears), an
ORM (SqlAlchemy) an RPC middleware (Pyro) and a dozen more batteries,
both standard and 3rd party. Can't think of anything better than
Python for this project.
George
--
http://mail.python.org
in
the Cookbook and posted in this list; here's one starting point:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413717.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
that memoization
can be used to save space too and matches OP's case exactly; even the
identity tests work. Self-importance is bad enough by itself, even
without the ignorance, but you seem to do great in both.
George
--
http://mail.python.org/mailman/listinfo/python-list
).
George
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 19, 7:44 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
George Sakkis a écrit :
On Nov 16, 5:03 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Fri, 16 Nov 2007 18:28:59 +0100, Bruno Desthuilliers wrote:
Question 1:
Given that the user of the API
,
George
--
http://mail.python.org/mailman/listinfo/python-list
.
http://www.crummy.com/software/BeautifulSoup/documentation.html#Searching%20by%20CSS%20class
George
--
http://mail.python.org/mailman/listinfo/python-list
be able to say x.foo(arg, kwd=v) without having to know whether
x.__class__ is ContinuedFraction. If not, you have a leaky abstraction
[1], i.e. in your example, a RegularCF is not really a
ContinuedFraction.
George
[1] http://www.joelonsoftware.com/articles/LeakyAbstractions.html
--
http
and have been accepted for Python 3 (http://
www.python.org/dev/peps/pep-3119/). Personally I don't see any
tangible benefit in having pure interfaces in additon to ABCs.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 11, 3:25 pm, Rob Wolfe [EMAIL PROTECTED] wrote:
Hi Rob,
Michael GeorgeLerner[EMAIL PROTECTED] writes:
Hi,
(Python 2.5, OS X 10.4.10)
I have a program called pdb2pqr on my system. It is installed so that
pdb2pqr is in my path and looks like:
#\!/bin/zsh -f
Are you sure that
Hi,
(Python 2.5, OS X 10.4.10)
I have a program called pdb2pqr on my system. It is installed so that
pdb2pqr is in my path and looks like:
#\!/bin/zsh -f
/sw/share/pdb2pqr/pdb2pqr.py $@
When I call it via this script:
#!/usr/bin/env python
import subprocess
import tempfile
args =
.
You are probably not aware of Python's Global Interpeter Lock:
http://docs.python.org/api/threads.html.
George
--
http://mail.python.org/mailman/listinfo/python-list
print p.Draw(), p.Draw(x2='foo')
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 31, 8:44 am, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-10-30, George Sakkis [EMAIL PROTECTED] wrote:
On Oct 30, 11:25 am, Neil Cerutti [EMAIL PROTECTED] wrote:
On 2007-10-30, Eduardo O. Padoan [EMAIL PROTECTED] wrote:
This is a FAQ:
http://effbot.org/pyfaq/why-does-python
and bringing as evidence the timings
that include attribute lookups. That statement is just wrong;
comparing X to an attribute assumes you have the attribute in the
first place, you don't need to look it up.
George
--
http://mail.python.org/mailman/listinfo/python-list
assertion
(?: \d {3} )+ $ # non-group
)
Bye,
bearophile
That's 3 times faster on my box and works for negatives too:
def localize(num, sep='.'):
d,m = divmod(abs(num),1000)
return '-'*(num0) + (localize(d)+sep+'%03d'%m if d else str(m))
George
--
http://mail.python.org/mailman
for accessing the data. Is there a way
to have ElementTree read only one record of the data at a time?
Have you tried `iterparse()`?
Ciao,
Marc 'BlackJack' Rintsch
Detailed docs at http://effbot.org/zone/element-iterparse.htm
George
--
http://mail.python.org/mailman/listinfo/python
it does NOT read the whole my record.
So If I could change '\n' as a record separator for readline, it
would solve my problem.
Any idea?
Thank you
L.
Check out this recipe, it's pretty generic:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/521877.
George
--
http://mail.python.org
this instead:
timeit.Timer('seqlen()',
'seq = range(100); seqlen=seq.__len__').timeit()
George
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 28, 6:01 am, Donn Ingle [EMAIL PROTECTED] wrote:
Is there a way I can, for debugging, access the instance variable name from
within a class?
Shouldn't this be in a FAQ somewhere? It's the second time (at least!)
it comes up this week.
George
--
http://mail.python.org/mailman/listinfo
. allowed by default comparisons between
instances of different types - at least that's one of the warts Python
3 gets right).
George
--
http://mail.python.org/mailman/listinfo/python-list
that index() or split() are methods make perfect sense
as well? I guess after some time using Python it does, but for most
unbiased users the distinction seems arbitrary.
George
--
http://mail.python.org/mailman/listinfo/python-list
`False` if `s` is empty while the latter raises an `IndexError`.
A string slice is safe and faster though: if s[:1] == 'E'.
George
--
http://mail.python.org/mailman/listinfo/python-list
required for web
development. As Diez pointed out, your main problem will be which of
the dozen or so template packages to pick. Depending on your criteria
(expressive power, syntax close to python, performance, stability
etc.) you may narrow it down to a handful.
George
--
http
On Oct 24, 2:42 pm, Vangati [EMAIL PROTECTED] wrote:
Plusmo is Hiring!
(snipped)
Recruiting Agencies: Please do not send us unsolicited resumes.
Plusmo does not consider resumes from any agencies.
Lame company headhunters: Please do not send us unsolicited
spamvertisments irrelevant to
On Oct 25, 2:28 am, NoName [EMAIL PROTECTED] wrote:
I try it:
def b():
...
a()
...
def a():
...
b()
...
b()
it's not work.
It sure does. Please post full code and error message, something else
is wrong, not the cyclic reference.
George
--
http://mail.python.org
On Oct 25, 6:12 am, Stefan Behnel [EMAIL PROTECTED] wrote:
Template engines are amongst the things that seem easy enough to look at the
available software and say bah, I'll write my own in a day, but are complex
enough to keep them growing over years until they become as huge and
inaccessible
On Oct 24, 10:42 am, [EMAIL PROTECTED] wrote:
On Oct 24, 4:15 pm, Paul Hankin [EMAIL PROTECTED] wrote:
On Oct 24, 2:02 pm, [EMAIL PROTECTED] wrote:
On Oct 24, 7:09 am, Alexandre Badez [EMAIL PROTECTED] wrote:
I'm just wondering, if I could write a in a better way this code
,
George
--
http://mail.python.org/mailman/listinfo/python-list
is a computer language.
Btw, a example of item 4 above, is Python's documentation. Fucking
asses and holes.
Watch your language, there are children present.
George
--
for email reply remove / from address
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 21 Oct 2007 01:20:47 -, Daniel Pitts
[EMAIL PROTECTED] wrote:
On Oct 20, 2:04 pm, llothar [EMAIL PROTECTED] wrote:
I love math. I respect Math. I'm nothing but a menial servant to
Mathematics.
Programming and use cases are not maths. Many mathematics are
the worst programmers
is nontheless the same: if you want sorted
results, you need to sort...
Diez
If you want the top 100 out of 100K, heapq.nlargest is more than an
order of magnitude faster.
George
--
http://mail.python.org/mailman/listinfo/python-list
: 8.60846224869
bin2dec_3: 0.16031255369
George
--
http://mail.python.org/mailman/listinfo/python-list
with groupby:
def test3b(data):
join = ' '.join
return [join(group) for key,group in
itertools.groupby(data, /tr.__eq__)
if not key]
George
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 16, 7:35 am, Laurent Pointal [EMAIL PROTECTED]
How does it compare to the scalar module ?
(seehttp://russp.us/scalar.htm)
or the Unum module (http://home.scarlet.be/be052320/Unum.html) ?
--
http://mail.python.org/mailman/listinfo/python-list
-space
threading.
George
--
for email reply remove / from address
--
http://mail.python.org/mailman/listinfo/python-list
slicing semantics:
def reverse(xs):
if not xs:
return xs
else:
return reverse(xs[1:]) + xs[:1]
print reverse([1,2,3])
print reverse((1,2,3))
print reverse('123')
George
--
http://mail.python.org/mailman/listinfo/python-list
code but Pyro itself
is multithreaded. Unfortunately I don't have the resources to start
digging in Pyro's internals..
George
--
http://mail.python.org/mailman/listinfo/python-list
lol :) another one on baseball : 90% of the game is physical, the
other half is mental.
GS
[EMAIL PROTECTED]
On Oct 11, 7:32 pm, willshak [EMAIL PROTECTED] wrote:
on 10/11/2007 10:14 PM Audio expert said the following:
Now I know where NOT to go.
TOO crowded for me.
No one goes there
or a technical limitation. You have to
manually delegate all special methods (or perhaps write a metaclass
that does this for you).
George
--
http://mail.python.org/mailman/listinfo/python-list
.
best way you know how from a Software Engineering != best way to do
it in less flexible languages that will go unnamed, such as Java
You seem to conflate these two.
George
--
http://mail.python.org/mailman/listinfo/python-list
it but obviously
this is not ideal. Is there a way to either prevent or at least
recover automatically the server when it hangs ?
George
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 12, 4:59 pm, brad [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Oct 12, 2:55 pm, Florian Lindner [EMAIL PROTECTED] wrote:
Hello,
is there a function in the Python stdlib to test if a string is a valid
email address?
here's a Perl re example... I don't know whether to laugh
')
def __init__(self, name):
self.name = name
print self.__name__
George
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 11, 7:04 pm, George Sakkis [EMAIL PROTECTED] wrote:
You could take it even further by removing the need to repeat the
attribute's name twice. Currently this can done only through
metaclasses but in the future a class decorator would be even
better:
Replying to myself here
the hardware stack (where possible) is faster than using heap
allocated structures. For performance, some Scheme compilers go to
great lengths to identify upward continuations and nested functions
that can be stack implemented.
George
--
for email reply remove / from address
--
http
On Oct 10, 11:08 am, [EMAIL PROTECTED] wrote:
Why apologize? If someone doesn't like the name given to a piece of
software by its author(s), screw them. If I find the software useful,
I'll use it. Even if its called 'bouncingBetty'.
Or 'BeautifulSoup' for that matter ;-)
George
--
http
)))
for p in taking(test,2): print p
(u'H', u'e')
(u'l', u'l')
(u'o', u' ')
(u'W', u'o')
(u'r', u'l')
(u'd',)
for p in taking(test,2, combine=''.join): print p
He
ll
o
Wo
rl
d
George
--
http://mail.python.org/mailman/listinfo/python-list
(iter_instances(c))
print ' * Instances per class (after delete)'
del items
for c in iter_descendant_classes(A):
print c, list(iter_instances(c))
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
needed to use it myself so far, but PyCells (http://
pycells.pdxcb.net/) seems it might fit the bill.
George
--
http://mail.python.org/mailman/listinfo/python-list
Google for free CS books. Many older books (including some
classics) that have gone out of print have been released
electronically for free download.
George
--
for email reply remove / from address
--
http://mail.python.org/mailman/listinfo/python-list
/Python/Recipe/500261
George
--
http://mail.python.org/mailman/listinfo/python-list
used in print.
George
--
for email reply remove / from address
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 3, 12:59 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
hii
ý think you know spam page is the most pest for net user.
...closely followed in the second position by incoherent misspelled
posts in silly IM-speak.
--
http://mail.python.org/mailman/listinfo/python-list
:
if not isinstance(arg, Bar):
# let the Bar constructor to do typechecking or whatnot
arg = Bar(arg)
self.params.add(arg)
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 3, 2:27 pm, George Sakkis [EMAIL PROTECTED] wrote:
On Oct 3, 1:04 pm, Adam Lanier [EMAIL PROTECTED] wrote:
Relatively new to python development and I have a general question
regarding good class design.
Say I have a couple of classes:
Class Foo:
params
On Wed, 3 Oct 2007 18:20:38 + (UTC), [EMAIL PROTECTED] (Bent C
Dalager) wrote:
In article [EMAIL PROTECTED],
George Neuner gneuner2/@comcast.net wrote:
On Wed, 3 Oct 2007 09:36:40 + (UTC), [EMAIL PROTECTED] (Bent C
Dalager) wrote:
Only if you're being exceedingly pedantic and probably
is just a little prejudiced against
anything that breathes. :-)
George
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 03 Oct 2007 23:07:32 +0100, [EMAIL PROTECTED] wrote:
George Neuner wrote:
Symbolism over substance has become the mantra
of the young.
Symbolism: The practice of representing things by means of symbols or
of attributing symbolic meanings or significance to objects, events
] += value
return dsum
Surprisingly (?), this turns out to be faster than using dict.get(key,
0) instead of the explicit if/else.
George
--
http://mail.python.org/mailman/listinfo/python-list
?
It means you have to bring the chips.
George
--
for email reply remove / from address
--
http://mail.python.org/mailman/listinfo/python-list
it less of a land grab - we'll have to wait and see
how the USPTO interprets the new rules - but copyright law has been
trending the other way (more grabbing) for a couple of decades now.
George
--
for email reply remove / from address
--
http://mail.python.org/mailman/listinfo/python-list
/diveintopython/
Hope it helps,
George
--
http://mail.python.org/mailman/listinfo/python-list
901 - 1000 of 1782 matches
Mail list logo