On Apr 11, 4:26 pm, Mike H cmh.pyt...@gmail.com wrote:
George,
I'd love to. Can you give me an idea of where to start looking? I've
gone through a couple of books, and Googled a ton of websites. Maybe
I'm just not using the right terms. My background is definitely not
CompSci. But if you'd
, 0.9645675 ],
[ 0.84971586, 0.05786009, 0.9645675 ]])
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 11, 6:05 pm, ergconce...@googlemail.com wrote:
On Apr 11, 11:18 pm, George Sakkis george.sak...@gmail.com wrote:
The numpy import *is* important if you want to use numpy-specific
features; there are many tricks you can do easily with numpy arrays
that you have to write manually
On Apr 7, 3:18 pm, Adam Olsen rha...@gmail.com wrote:
On Apr 6, 3:02 pm, George Sakkis george.sak...@gmail.com wrote:
For example, it is common for a function f(x) to expect x to be simply
iterable, without caring of its exact type. Is it ok though for f to
return a list for some types
and NOT the calling
function.
Read up on descriptors [1], it seems that's what you're looking for.
HTH,
George
[1] http://users.rcn.com/python/download/Descriptor.htm
--
http://mail.python.org/mailman/listinfo/python-list
that are applicable to such situations ?
George
--
http://mail.python.org/mailman/listinfo/python-list
` happens
to be a builtin (e.g. float or list). Technically you can subclass
builtins but I think, in this case at least, the cure is worse than
the disease.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 6, 7:57 pm, andrew cooke and...@acooke.org wrote:
andrew cooke wrote:
George Sakkis wrote:
That's more of a general API design question but I'd like to get an
idea if and how things are different in Python context. AFAIK it's
generally considered bad form (or worse) for functions
New submission from George Sakkis george.sak...@gmail.com:
According to the docs, heapq.nlargest should be equivalent to
sorted(iterable, key=key, reverse=True)[:n], and since sorted() is
stable, so should heapq.nlargest be. This is not the case:
s =[
('Mike', -1),
('John', 3),
('George', 2
George Sakkis george.sak...@gmail.com added the comment:
Posted recipe at http://code.activestate.com/recipes/576712/. You were
right, the implementation gets significantly hairier but I think it's
worth having this option. It's also faster than using sorted/bisect as
len(seq)/N increases
George Sakkis george.sak...@gmail.com added the comment:
Should have checked a recent version first; that's from 2.5 (r25:51908,
Sep 19 2006, 09:52:17). Sorry for the noise.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http
):
mapping[rx] = func
return func
return deco
d = {}
@rxhandler(^DATASET:\s*(.+) , d)
def handle_dataset(match):
...
@rxhandler(^AUTHORS:\s*(.+) , d)
def handle_authors(match):
...
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
recommend it.
George
[1] http://ipython.scipy.org/
--
http://mail.python.org/mailman/listinfo/python-list
/recipes/528936/
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
New submission from George Sakkis george.sak...@gmail.com:
It would be useful in many cases if heapq.nlargest and heapq.nsmallest
grew an optional boolean parameter, say `ties` (defaulting to False)
that when True, it would return more than `n` items if there are ties.
To illustrate:
s
George Sakkis george.sak...@gmail.com added the comment:
The second call should of course be:
for i in xrange(1,len(s)+1): print i,heapq.nsmallest(i,s,ties=True)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5669
Changes by George Sakkis george.sak...@gmail.com:
--
title: Extra heap nlargest/nsmallest option for including ties - Extra heapq
nlargest/nsmallest option for including ties
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5669
George Sakkis george.sak...@gmail.com added the comment:
There's nothing special about my use cases; I'd even go as far as to
suggest that this is more often than not the desired behavior in general.
Say that you have to select the top 3 chess players and there are two
players with equal Elo
George Sakkis george.sak...@gmail.com added the comment:
In that case, I think it best to leave nsmallest/nlargest as-is. By
appending ties to the result, it becomes harder to implement policy
decisions on what to do with those ties (perhaps listing them separately
or splitting
George Sakkis george.sak...@gmail.com added the comment:
That should have been: last = result[-1]; [last]*s.count(last).
Nice, though that's not equivalent if the objects' identity is
significant for what happens next (which typically is the case when ties
are preserved). The sorted/bisect
Changes by George Sakkis george.sak...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5669
___
___
Python-bugs
George Sakkis george.sak...@gmail.com added the comment:
I recommend posting an ASPN recipe. That's what I do with a lot of
ideas that are under development or that don't clear the bar for going
into the standard library.
Will do. Thanks for the quick turnaround
April fools day is not until tomorrow. Your joke is a day early.
George A. Grimes
972-995-0190 - Desk
214-205-0244 - Cell
-Original Message-
From: filmmaker [mailto:centrixfi...@gmail.com]
Sent: Tuesday, March 31, 2009 3:47 PM
To: python-list@python.org
Subject: make money
Raymond Cote wrote:
George Trojan wrote:
1. Is supervisor still developed?
I note that, although the information on the site is pretty old, there
have been some respository checkins in Feb and March of this year:
http://lists.supervisord.org/pipermail/supervisor-checkins/
-r
I found
'*1
True
'x' is str('x')
True
'x' is str('x')+str('')
True
'x' is str.__new__(str,'x')
True
George
--
http://mail.python.org/mailman/listinfo/python-list
a function call on every round).
- broken (creates a new dict instead of modifying the original in
place).
Really, there's not much of a dilemma here.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 18, 2:13 pm, R. David Murray rdmur...@bitdance.com wrote:
George Sakkis george.sak...@gmail.com wrote:
Is there a way to turn off (either globally or explicitly per
instance) the automatic interning optimization that happens for small
integers and strings (and perhaps other types
Node class.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 18, 4:50 pm, andrew cooke and...@acooke.org wrote:
this is completely normal (i do exactly this all the time), BUT you should
use ==, not is.
Typically, but not always; for example check out the identity map [1]
pattern used in SQLAlchemy [2].
George
[1] http://martinfowler.com
)
cur = next
yield group
George
[1] http://code.activestate.com/recipes/521877/
--
http://mail.python.org/mailman/listinfo/python-list
be a
reasonable alternative to supervisor? I know of upstart and daemontools.
George
--
http://mail.python.org/mailman/listinfo/python-list
On 2009-03-12 08:03:06 +, Mark Tolonen metolone+gm...@gmail.com said:
Falcolas garri...@gmail.com wrote in message
news:1b6a95a4-5680-442e-8ad0-47aa9ea08...@w1g2000prk.googlegroups.com...
On Mar 11, 1:11 pm, David George d...@eatmyhat.co.uk wrote:
Again, problem here is the issue
On 2009-03-11 04:36:29 +, Mark Tolonen metolone+gm...@gmail.com said:
David George d...@eatmyhat.co.uk wrote in message
news:00150e67$0$27956$c3e8...@news.astraweb.com...
Hi guys,
I've been developing some code for a university project using Python.
We've been working on an existing
On 2009-03-11 19:02:26 +, Falcolas garri...@gmail.com said:
On Mar 11, 12:28 pm, David George wrote:
On 2009-03-11 04:36:29 +, Mark Tolonen metolone+gm...@gmail.com s
aid:
David George d...@eatmyhat.co.uk wrote in message
news:00150e67$0$27956$c3e8...@news.astraweb.com...
Hi
Hi guys,
I've been developing some code for a university project using Python.
We've been working on an existing codebase, cleaning it up and removing
dead wood.
We decided to make some changes to internal message handling by using a
SocketServer, which worked great when we were using 2.6,
New submission from Stephen George steve_...@optusnet.com.au:
It seems that C:\Python26\Tools\i18n\msgfmt.py does not work with PO
files that use plural form. Get the following error.
ERRORTraceback (most recent call last):
File C:\Python26\Tools\i18n\msgfmt.py, line 203, in module
a coherent
presentation.
It sounds like the sort of thing to avoid. I'm just learning Python myself
and I'll look elsewhere.
George
George A. Grimes
972-995-0190 - Desk
214-205-0244 - Cell
The major difference between a thing that might go wrong and a thing that
cannot possibly go wrong
New submission from George Yoshida qui...@users.sourceforge.net:
In What's new in 2.6 PEP 343 section, the following sentence lacks a
closing parenthesis:
The expression is evaluated, and it should result in an object that
supports the context management protocol (that is, has __enter__
George Sakkis george.sak...@gmail.com added the comment:
I am no in favor of MANIFEST.in removal because I find it very
convenient to define what is included in a package and I rarely use
package_data or data_files.
AFAIK the MANIFEST is used only by sdist; what's the point of including
George Sakkis george.sak...@gmail.com added the comment:
what is your use case of having executable file here ?
I'd use the 'scripts' metadata for that ?
For one thing they are external binaries, not python scripts, and second
they are used internally only (through Subprocess
New submission from George Sakkis george.sak...@gmail.com:
Distutils ignores file permissions when copying modules and package_data
files to the build directory, and consequently to the installation
directory too. According to an XXX comment at
distutils/command/build_py.py, this is deliberate
New submission from George Sakkis george.sak...@gmail.com:
Currently each glob defined in package_data must match files only; if it
matches a directory, it raises an exception later when calling
copy_file(). This means that a glob like 'mydata/*' will fail if there
is any subdirectory under
George Sakkis george.sak...@gmail.com added the comment:
Opened #5300 and #5302 for the mentioned issues.
Btw in your patch, I believe `os.path.join(dirname, f)` should be
replaced by `f` alone; `dirname` refers to the dir under the
installation directory, not the source
George Sakkis george.sak...@gmail.com added the comment:
FWIW I wrote a module that overrides the default build_py and sdist
commands with versions that allow specifying package_data recursively
Maybe that could be a new feature ?
That would be nice, especially if we want to reimplement
George Sakkis george.sak...@gmail.com added the comment:
done in r69692 and r69696.
Great, thanks. The data_files part though seems incorrect; for one thing
each item in data_files can be either a (dir,files) tuple or a plain
string, and for two 'dir' is the output (installation) directory
George Sakkis george.sak...@gmail.com added the comment:
By an equivalent option in setup() of course. I'm not against the
*functionality* of MANIFEST.in but on that (a) it's a second file you
have to remember to write and maintain in addition to setup.py (b) has
its own ad-hoc syntax instead
George Sakkis george.sak...@gmail.com added the comment:
I didn't mean to imply that automagic discovery based on external
version control software is better than MANIFEST.in; I favor
explicitness here as well. It's just that this information can (and
often has to) be duplicated in setup.py
._last,
self.before, self.match.group(0), self.after)
return rc
def close(self):
self.pipe.close()
self.pipe = None
self.socket.close()
self.socket = None
George
--
http://mail.python.org/mailman/listinfo/python-list
!
George
George A. Grimes
972-995-0190 - Desk
214-205-0244 - Cell
Failure is the opportunity to begin again, more intelligently.
Henry Ford
-Original Message-
From: python-list-bounces+georgegrimes=ti@python.org
[mailto:python-list-bounces+georgegrimes=ti@python.org] On Behalf
?
Thanks,
George
George A. Grimes
972-995-0190 - Desk
214-205-0244 - Cell
Failure is the opportunity to begin again, more intelligently.
Henry
Fordhttp://www.woopidoo.com/business_quotes/authors/henry-ford-quotes.htm
--
http://mail.python.org/mailman/listinfo/python-list
submit a bug report ?
George
--
http://mail.python.org/mailman/listinfo/python-list
New submission from George Yoshida qui...@users.sourceforge.net:
Download page for 2.5.3 documantation is not ready.
---
Go to Documentation top page:
http://docs.python.org/
click Previous versions
click Python 2.5.3
click Download all these documents
But this URL, http://www.python.org
New submission from George g...@mail.gr:
I have Python 2.6.1 in Windows Vista. It happened in Python 2.6 and I
hoped it would be fixed. I don't know what happenes in other versions.
When I open a file containing a python program(.py/.pyw and even
one compiled with py2exe) made by using
Changes by George g...@mail.gr:
--
title: pythonw.exe crash in GU application(PythonWX) - pythonw.exe crash in
GUI application(PythonWX)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4721
On Dec 15, 8:15 am, Luis M. González luis...@gmail.com wrote:
On Dec 15, 1:38 am, cm_gui cmg...@gmail.com wrote:
hahaha, do you know how much money they are spending on hardware to
make
youtube.com fast???
By the way... I know of a very slow Python site called YouTube.com. In
fact,
On Wed, 10 Dec 2008 21:37:34 + (UTC), Kaz Kylheku
kkylh...@gmail.com wrote:
Now try writing a device driver for your wireless LAN adapter in Mathematica.
Notice how Xah chose not to respond to this.
George
--
http://mail.python.org/mailman/listinfo/python-list
be accessed as a vector of length (dim1 * dim2 * ... * dimN).
This code handles arrays of any dimensionality. The poorly named
argument 'dim' specifies the total number of elements in the array.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 8 Dec 2008 15:14:18 -0800 (PST), Xah Lee xah...@gmail.com
wrote:
Dear George Neuner,
Xah Lee wrote:
For example,
the level or power of lang can be roughly order as
this:
assembly langs
C, pascal
C++, java, c#
unix shells
perl, python, ruby, php
lisp
Mathematica
George wrote
not have admin access to) to use
the new module.
How is this different from writing your own module from scratch ? You
don't need admin access to use a 3rd party package.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 10, 1:42 pm, cm_gui [EMAIL PROTECTED] wrote:
http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-...
I fully agree with Krzysztof Kowalczyk .
Can't they build a faster VM for Python since they love the language
so much?
WTF is Krzysztof Kowalczyk and why should we
== '__main__':
assert foo.__module__ == Bar.__module__ == 'myscript'
George
--
http://mail.python.org/mailman/listinfo/python-list
and readable. I believe the responsibility to not abuse the power of
the language should be on the application programmer, not the language
designer.
George
--
http://mail.python.org/mailman/listinfo/python-list
): http://pypi.python.org/pypi/progressbar/.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
in the
first place.
George
--
http://mail.python.org/mailman/listinfo/python-list
? And what version dependency are you
referring to?
Well some of you actually hear something,
I don't,
so I expect that the Python version differs.
Works for me on WinXP, Python 2.5:
C:\python -c print chr(7)
makes a beep.
George
--
http://mail.python.org/mailman/listinfo/python-list
foundations of mathematics collapses into a steaming
pile of rubble.
And why doesn't this happen with the current behavior if x = y = log
(-5) ? According to the same proof, -5 != -5.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 5, 8:06 am, Marco Mariani [EMAIL PROTECTED] wrote:
Steven D'Aprano wrote:
Gosh Lawrence, do tell, which category do YOU fall into?
I suppose a mix-up between a cowbody (or Fonzie) coder and a troll.
Naah.. more likely an (ex?) Lisper/Schemer.
--
. No, really.)
Obligatory reading: http://www.mortendahl.dk/thoughts/blog/view.aspx?id=122
George
--
http://mail.python.org/mailman/listinfo/python-list
partial
a.foo = partial(a_foo,a)
a.foo()
a_foo
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 4, 1:03 pm, Zac Burns [EMAIL PROTECTED] wrote:
Ok... but why are the special methods handled differently?
Because otherwise they wouldn't be special ;-) And also for
performance and implementation reasons I believe.
George
--
http://mail.python.org/mailman/listinfo/python-list
much more modest slowdown (2-3X) if I repeat
many times each run.
George
--
http://mail.python.org/mailman/listinfo/python-list
it ?? Does anyone have a
link where this was decided ?
George
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Please CC me in replying as I am off list.
I have an extension module that I've built using distutils. I wonder if
it's possible to use distutils to cross-compile it for windows on my
linux box, and whether the pain involved is great. Can anyone point me
in the right direction?
Hello,
(Please CC me in replies, as I am off-list)
I'm building an application (a game) in python, with a single C module
containing some performance-critical code. I'm trying to figure out the
best way to set it up to build. Distutils seems to be designed only for
building and
Gerhard Häring wrote:
Michael George wrote:
I've tried using automake,
In my opinion, this is serious overkill. automake is good for making
stuff work on a herd of different Unixen with various combinations of
libc functions available etc. But for developing a Python extension,
it doesn't
Martin v. Löwis wrote:
I've tried using automake, however I'm worried about libtool not getting
the options right while building my module.
You should use python-config(1) to obtain the command line options
necessary to build and link extension modules.
HTH,
Martin
Sweet, I think
anyway.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 1, 5:42 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote:
George Sakkis [EMAIL PROTECTED] writes:
Is there any stdlib or (more likely) 3rd party module that provides a
similar functionality to the java.util.Scanner class [1] ? If not,
would there be any interest in porting
, not the instance, so you're out of luck there. What are you
trying to do? Perhaps there is a less magic solution to the general
problem.
George
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 2, 4:57 pm, Lew [EMAIL PROTECTED] wrote:
There is no reason for you to engage in an /ad hominem/ attack. It
does not speak well of you to resort to deflection when someone
expresses a contrary opinion, as you did with both Jon Harrop and with
me. I suggest that your ideas will be
Is there any stdlib or (more likely) 3rd party module that provides a
similar functionality to the java.util.Scanner class [1] ? If not,
would there be any interest in porting it (with a more Pythonic API of
course) or are there better alternatives ?
George
[1] http://java.sun.com/j2se/1.5.0
):
return Add:+j
if __name__ == __main__:
o = MyObject()
s = o.js.kiki(12).kuku()
print s
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 28, 9:19 am, manatlan [EMAIL PROTECTED] wrote:
On 28 nov, 14:58, George Sakkis [EMAIL PROTECTED] wrote:
On Nov 28, 5:36 am, manatlan [EMAIL PROTECTED] wrote:
I'd like to make a jquery python wrapper ...
here is my code
On Nov 28, 4:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Now, up up and away into my killfilter,
Ditto; apparently it's either a troll or an 8-year old.
George
--
http://mail.python.org/mailman/listinfo/python-list
mymod = decorator(mymod)
George
--
http://mail.python.org/mailman/listinfo/python-list
chose the wrong group for your new adopted religion.
Why don't you go read a tutorial, write up some code, and come back
with any real questions next time.
George
--
http://mail.python.org/mailman/listinfo/python-list
to, say, Scheme lisp, Emacs lisp, PHP?
Think before you write. It's exactly the same thing. How would you get all
Emacs users in the world to upgrade?
The same way you would get all Python users to upgrade to 3.0 ? It's
not like Joe User runs emacs to edit his grocery store list.
George
--
http
then ( thenmakes the whole process quite a hassle.
:rollseyes:
I hope there was a missing smiley in that post. If a couple extra parens
destroys your debugging productivity I suspect you need a fresh approach to
the task.
Seconded; I thought he's either joking or trolling.
George
--
http
On Nov 25, 5:03 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] writes:
BUT you now can do
p = print
p(f)
All right. Let's talk about that.
When I write print, it is both effortless and instantaneous : my
hands do not move, a wave goes through my fingers, it all
on the (guessed or
measured) performance improvement misses the point of OO design.
George
--
http://mail.python.org/mailman/listinfo/python-list
or the implementation?
According to Guido, the implementation:
http://mail.python.org/pipermail/python-ideas/2008-October/002235.html.
George
--
http://mail.python.org/mailman/listinfo/python-list
to it.
..which makes the phrase a reference to an X a more verbose,
redundant version of an X since it applies to *every* Python object.
You have made your point in the 300+ posts thread, so please quit the
terminology trolling in every new thread.
George
--
http://mail.python.org/mailman/listinfo/python
On Nov 21, 10:18 am, Chuck Connors [EMAIL PROTECTED] wrote:
Any help, pseudo code, or whatever push in the right direction would
be most appreciated. I am a novice Python programmer but I do have a
good bit of PHP programming experience.
I'm wondering if PHP experience precludes the ability
effort in writing and reading it is not off-putting (e.g. no C++
template metaprogramming atrocities)
George
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 21, 11:05 am, Steve Holden [EMAIL PROTECTED] wrote:
George Sakkis wrote:
On Nov 21, 10:18 am, Chuck Connors [EMAIL PROTECTED] wrote:
Any help, pseudo code, or whatever push in the right direction would
be most appreciated. I am a novice Python programmer but I do have a
good bit
On Nov 21, 2:01 pm, Richard Riley [EMAIL PROTECTED] wrote:
George Sakkis [EMAIL PROTECTED] writes:
On Nov 21, 11:05 am, Steve Holden [EMAIL PROTECTED] wrote:
George Sakkis wrote:
On Nov 21, 10:18 am, Chuck Connors [EMAIL PROTECTED] wrote:
Any help, pseudo code, or whatever push
Why is this? Thanks, hope its not a stupid quesiton.
Sigh.. no it's not stupid at all; actually it is (and will probably
remain, unfortunately) the most FAQ of all times:
http://www.python.org/doc/faq/general/#why-are-default-values-shared-between-objects
George
--
http://mail.python.org
by the 4 digits to be matched as group
#1..
(?:\D|\b)# .. which are followed by non-digit or word boundary
''', re.VERBOSE)
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
, cls2, *rest_classes), {})
item = derived_cls(**itemArgs)
You will probably want to cache the generated classes so that at most
one class is created for each combination of mixins.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
the class is passed a reference rather than a copy.
Why should it be a copy by default ? In Python all copies have to be
explicit.
George
--
http://mail.python.org/mailman/listinfo/python-list
401 - 500 of 1782 matches
Mail list logo