here, but you might like this approach. Another
approach would use itertools.takewhile() or itertools.ifilter() ... Just
have a look :-)
yours sincerely
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA
On Sat, Feb 06, 2010 at 14:42 -0500, Terry Reedy wrote:
On 2/6/2010 2:09 PM, Wolodja Wentland wrote:
I think you can use the itertools.groupby(L, lambda el: el[1]) to group
elements in your *sorted* list L by the value el[1] (i.e. the
identifier) and then iterate through these groups until
On Sun, Jan 17, 2010 at 15:05 -0800, BarryJOgorman wrote:
[...]
class Person:
def _init_(self, name, job=None, pay=0):
^^ -- __init__(self, ...
It's __init__() not _init_()!
Have fun learning Python!
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
will help you a lot:
http://www.dabeaz.com/generators/
If you have further questions just ask and have fun playing with
generators in Python ...
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2
()
managed_dict = manager.dict()
...
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
Description: Digital signature
--
http://mail.python.org/mailman/listinfo/python
)
while True:
pass
Have a look at multiprocessing.Manager() it provides (among other
things) proxies for dictionaries that can be used in different threads.
These are even accessible on different hosts if configures correctly.
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
and the pool processes should *not* have the same memory
requirements as the parent process.
Am I missing something here?
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
regards
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
Description: Digital signature
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Dec 11, 2009 at 03:03 -0800, Bearophile wrote:
Wolodja Wentland:
Which library would you choose?
This one probably uses low memory, but I don't know if it works still:
http://osl.iu.edu/~dgregor/bgl-python/
That project looks not that maintained and graph-tool [1] is based on
boost
On Fri, Dec 11, 2009 at 08:55 -0500, Neal Becker wrote:
Bearophile wrote:
Wolodja Wentland:
Which library would you choose?
This one probably uses low memory, but I don't know if it works still:
http://osl.iu.edu/~dgregor/bgl-python/
How about python interface to igraph?
Don't know
On Fri, Dec 11, 2009 at 07:31 -0800, IngoognI wrote:
On Dec 11, 11:12 am, Wolodja Wentland wentl...@cl.uni-heidelberg.de
wrote:
Which library would you choose?
looking at the galery at networx, it seems to be all balls 'n sticks,
how about writing the data to a file POV-Ray can read
]
http://packages.python.org/distribute/setuptools.html#automatic-script-creation
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
Description: Digital signature
)
type 'int'
t = (1,)
type(t)
type 'tuple'
t = 1,
type(t)
type 'tuple'
It is the ',' not the '(' and ')' ...
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
On Wed, Dec 02, 2009 at 08:03 -0800, Mark Summerfield wrote:
On Dec 2, 11:20 am, Wolodja Wentland wentl...@cl.uni-heidelberg.de
It would be quite nice if you could mark all the Python 3 idioms that
work in Python 2.X as well. This would allow readers that are still using
Python 2.X
their coding style
accordingly. You could just add a little (2.X) after the idiom for
example.
And thanks for the nice cheat sheet! :-D
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
...but at this stage that is not the
right 'venue' for me. I mainly need challenges like the ones they have
in Learning Perl.
Project Euler has already been pointed out to you, but I enjoyed solving
the riddles at:
http://www.pythonchallenge.com/
Enjoy! :-)
--
.''`. Wolodja Wentlandwentl
/generators/
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
Description: Digital signature
--
http://mail.python.org/mailman/listinfo/python-list
from a
talk by David Beazley on generators which you can find at [2] and
[3].
Enjoy!
[1] http://www.dabeaz.com/generators/follow.py
[2] http://www.dabeaz.com/generators-uk/
[3] http://www.dabeaz.com/coroutines/
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
Wolodja
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
Description: Digital signature
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Nov 16, 2009 at 01:11 +0100, Wolodja Wentland wrote:
On Sun, Nov 15, 2009 at 09:16 -0800, Phlip wrote:
How can I point pip at the repo to install the library?
sudo pip -e git+git://github.com/Phlip/Kozmiq.git
pip -e git+git://github.com/Phlip/Kozmiq.git#egg=Kozmiq
err...
pip
On Tue, Nov 10, 2009 at 20:25 -0800, Phlip wrote:
On Nov 10, 3:11 pm, Wolodja Wentland wentl...@cl.uni-heidelberg.de
wrote:
The pip requirement file would contain the following line:
-e git+git://example.com/repo.git#egg=rep
Let me ask it like this. What happens when a user types
On Mon, Nov 09, 2009 at 19:48 -0800, Phlip wrote:
I have a single file that I need my crew to pip install.
Where do you plan to host this file? Will it be available on PiPy?
When I Google for how to create a pip package I don't hit anything.
Of course that info is out there; I can't seem to
On Tue, Nov 10, 2009 at 06:30 -0800, Phlip wrote:
On Nov 10, 1:54 am, Wolodja Wentland wentl...@cl.uni-heidelberg.de
wrote:
http://docs.python.org/library/distutils.html#module-distutils
http://packages.python.org/distribute/
ktx... now some utterly retarded questions to prevent false
would contain the following line:
-e git+git://example.com/repo.git#egg=rep
I hope this answers your questions :-D
--
.''`. Wolodja Wentlandwentl...@cl.uni-heidelberg.de
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
signature.asc
to understand how a module is working then have a
look at its source code. Python is open source -- Use that privilige!
kind regards
Wolodja Wentland
signature.asc
Description: Digital signature
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Oct 31, 2009 at 16:53 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 4:14 PM, Robert Kern robert.k...@gmail.com wrote:
[ snip ]
I know that multiple classes or functions are typically defined in one
file (i.e. module in python). However, I feel this make the code not
easy to read.
On Sat, Oct 31, 2009 at 18:29 -0500, Peng Yu wrote:
On Sat, Oct 31, 2009 at 5:45 PM, Wolodja Wentland
wentl...@cl.uni-heidelberg.de wrote:
On Sat, Oct 31, 2009 at 16:53 -0500, Peng Yu wrote:
Are you serious? Do you *really* put each function in its own file? How
exactly does this enhance
On Wed, Oct 28, 2009 at 10:27 +, Vinay Sajip wrote:
I've updated PEP 391 (Dictionary-Based Configuration for Logging):
http://svn.python.org/view/peps/trunk/pep-0391.txt?r1=75599r2=75918
+1
All feedback gratefully received!
The PEP does not seem to specify how handler are retrieved by
On Sun, Oct 25, 2009 at 10:48 +, Vinay Sajip wrote:
Wolodja Wentland wentland at cl.uni-heidelberg.de writes:
[ HTMLHandler, multiple configuration files ]
OK! I agree that these parts are hard to standardise and do not really
belong in the *logging* module.
Maybe a kind soul implements
On Sat, Oct 24, 2009 at 07:54 +, Vinay Sajip wrote:
Wolodja Wentland wentland at cl.uni-heidelberg.de writes:
[snip]
foo
|__bar
|__baz
|__newt
|___witch
I set every loggers log level to DEBUG and use the respective logger in
You only need set foo's
On Sun, Oct 25, 2009 at 00:41 +0900, Hyunchul Kim wrote:
[0;37m How to run multiple processes with sequential input of a thousand
of data
[0;37m in a script run?
[0;37m I have a python script and 1,000 independent
) afterwards.
My main idea is to see the configuration files not as the final
configuration of the logging system but rather as a definition of the
building blocks that can be plucked together easily programmatically if
the developer sees the need to do so.
with kind regards
Wolodja Wentland
On Thu, Oct 22, 2009 at 13:59 +0200, Lele Gaifax wrote:
Gabriel Genellina gagsl-...@yahoo.com.ar writes:
unittest, or ultimately, this bug: http://bugs.python.org/issue4947
http://bugs.python.org/issue4947#msg87637 as the best fit, I think
You might also want to have a look at:
Wolodja Wentland wentl...@cl.uni-heidelberg.de added the comment:
Here is some more information.
--- snip ---
Normal behaviour
$ locale
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=POSIX
LC_TIME=en_GB.UTF-8
LC_COLLATE=en_GB.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES
Changes by Wolodja Wentland wentl...@cl.uni-heidelberg.de:
Added file: http://bugs.python.org/file15174/unicode_bug_literals.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1293741
On Mon, Oct 19, 2009 at 05:44 -0700, khany wrote:
i am relatively new to python and i am trying to convert a php app i
have over to it using googleapps.
Welcome!
anyway here is the problem. i poll ebay API which has in its XML ?
xml version=1.0 encoding=utf-8?findItemsAdvancedRequest
On Fri, Sep 25, 2009 at 02:24 -0300, Gabriel Genellina wrote:
En Thu, 24 Sep 2009 08:21:59 -0300, Wolodja Wentland
How do *you* deal with application data in your programs? Is there a way
that works on as many platforms as possible?
On linux, using a configuration file like /etc
On Thu, Sep 24, 2009 at 04:07 -0300, Gabriel Genellina wrote:
I do not intentionally focus on UNIX type systems, but I have grown up
with *nix and I rather follow one scheme than none at all. But the
proposed way works on Windows as well, although the users might find
previously unseen
On Thu, Sep 24, 2009 at 12:51 +0100, Tim Golden wrote:
Wolodja Wentland wrote:
Is CSIDL_COMMON_APPDATA and environment variable set on all Windows
flavours?
Certainly all those which Python currently supports. There are
some small subtleties which have changed between older and
newer
On Wed, Sep 23, 2009 at 12:24 -0700, devaru wrote:
I'm trying to install psycopg2 on my system. I followed the
instruction in INSTALL file and gave the command
python setup.py build
running build
running build_py
running build_ext
error: No such file or directory
I ran into this some days
On Wed, Sep 23, 2009 at 22:38 +0200, Wolodja Wentland wrote:
--- Debian example ---
$ apt-file search /usr/bin/pg_config
libpq-dev: /usr/bin/pg_config
--- snip ---
Just wanted to note that libpq-dev is a dependency of
postgresql-server-dev-8.4 on squeeze. So you *might* want to consider
On Tue, Sep 22, 2009 at 07:42 -0700, Aahz wrote:
I want to:
1. Give administrators the freedom to install the data wherever they
want
2. Adhere to the FHS (installing data within modules breaks it)
3. Be able to find that data again regardless of the installation
On Mon, Sep 21, 2009 at 23:52 -0300, Gabriel Genellina wrote:
En Sat, 19 Sep 2009 12:03:52 -0300, Wolodja Wentland
wentl...@cl.uni-heidelberg.de escribió:
reliably finding distribution data from your program seems to be an
unsolved issue for programs packaged with distutils.
[...]
Isn't
share
^^^ here
with kind regards
Wolodja Wentland
signature.asc
Description: Digital signature
--
http://mail.python.org/mailman/listinfo/python-list
scratch.
The module detection logic and exception handling might need some work
as well. ;-)
I have the following questions:
1. Is the distutils 'API' i use here likely to break?
2. Can you think of a better way to do this?
with kind regards
Wolodja Wentland
signature.asc
Description
45 matches
Mail list logo