Re: eGenix at EuroPython 2010

2010-07-14 Thread Daniel Fetchinson
> EuroPython 2009 - Making 50 Mio. EUR per year using Python > http://www.egenix.com/go23/ This link returns a 404. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: how to install all python plugins

2010-07-15 Thread Daniel Fetchinson
ow it works on fedora) and install them using the above mentioned package manager software. If you don't know how to use it, please see https://help.ubuntu.com/community/SynapticHowto https://help.ubuntu.com/community/InstallingSoftware HTH, Daniel -- Psss, psss, put it down! - http

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-15 Thread Daniel Fetchinson
words Wow! Tons of kudos, this must have been hell of a work to put together with all the irregular nouns/verbs/etc, and I really needed something like this for a long time. Thanks a lot, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Daniel Fetchinson
ans or Windows users will hit > the nail on the head. And most of the time, when people are bitching about US-Americans, assuming that they are Europeans will hit the nail on the head :) Duck-and-run-ly yours, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] inflect.py: generate plurals, ordinals, numbers to words...

2010-07-16 Thread Daniel Fetchinson
lly should modify the above to: when people are bitching about an English speaker they don't like for some reason and they automatically think that said person must be US-American when in fact he/she is Australian (or British or South African or something else), assuming that they are Europeans will

Re: source install of python2.7 and rpm install of cx_Oracle collision

2010-07-21 Thread Daniel Fetchinson
l python2.7, who > can tell me what I need to do ? I want a libpython2.7.so.1.0 generated when > > > I install python. > > I am not familiar with GCC and .so .a stuff. In this case I'd recommend removing the source install of python 2.7, install it from rpm, follo

ANN: blist 1.2.0

2010-07-21 Thread Daniel Stutzbach
mentation: http://stutzbachenterprises.com/blist/ - Download: http://pypi.python.org/pypi/blist/ - Source repository: http://github.com/DanielStutzbach/blist - Issue tracker: http://github.com/DanielStutzbach/blist/issues -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzb

Re: ANN: blist 1.2.0

2010-07-21 Thread Daniel Stutzbach
that I need to take care of. After that I plan to work on porting my sort optimizations back to the standard list type. Here's a performance comparison of sorting with blist versus 3.1's list: http://stutzbachenterprises.com/performance-blist/sort-random-list -- Daniel Stutzbach, Ph.D. Pres

Re: ANN: blist 1.2.0

2010-07-21 Thread Daniel Stutzbach
and resorts, list.sort will skip the sorted part, > sort the additions, and merge them back in. Radix sort ignores pre-existing > order. So either a lot of comparitive profiling would be needed for > auto-selection of sort method, or it should be user selectable. > I'v

Re: detect endianness of a binary with python

2010-07-22 Thread Daniel Fetchinson
But I don't like to evaluate a piped system command. If there is an way > without > using the os.system command this would be great. > Please see http://pypi.python.org/pypi/python-magic HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: blist 1.2.0

2010-07-22 Thread Daniel Stutzbach
at's a good point. It's tempting to add an undocumented parameter to blist.sort that selects the sorting algorithm to use, to make it make it easier to test multiple algorithms. There are probably several different ways to achieve a similar effect. Do you mind if we table that discussion unt

Re: ANN: blist 1.2.0

2010-07-22 Thread Daniel Stutzbach
Thank you for the thoughts. I appreciate them! -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: blist 1.2.0

2010-07-23 Thread Daniel Stutzbach
On Wed, Jul 21, 2010 at 9:47 AM, Daniel Stutzbach < dan...@stutzbachenterprises.com> wrote: > What's new? > --- > > - blist.sort() is now *substantially* faster than list.sort() when using > int or float keys (O(n) vs. O(n log n)) > - The sortedset, sortedli

Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Daniel Fetchinson
as python managed to hide all these complexities behind a well defined API. Why was clearing a terminal left out? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is there no platform independent way of clearing a terminal?

2010-07-27 Thread Daniel Fetchinson
terminal specific sequence of characters that will clear the screen. It > then writes those characters to stdout. The terminal, or (more usually > these days) terminal emulator, then interprets those characters and takes > the appropriate action. > > I'm not sure what the P

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Daniel Fetchinson
; library. > > Summary: No, I don't see the need for such an API. Okay, that makes perfect sense, thanks for the exaplanation! I'll just live with the platform.system( ) check for this particular problem then. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is there no platform independent way of clearing a terminal?

2010-07-28 Thread Daniel Fetchinson
out 'colorama' before but it surely looks promising! I'll look into it for future reference, once in a while I like having pretty output without the hassle of 'curses' or other complicated stuff. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: new to python - trouble calling a function from another function

2010-08-05 Thread Daniel Urban
errors when the script executes. Surely this isn't > some limitation I'm encountering? I think the self.goUp() call is executed, the goUp function gets called, returns a generator object (because goUp is a generator function), then you don't use that generator object for anyth

Re: Smith-Waterman Algorithm in Python

2010-08-06 Thread Daniel Fetchinson
> Does any one about any implementation of classical Smith Waterman > local alignment algorithm and it's variants for aligning natural > language text? Please see http://tinyurl.com/2wy43fh Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/puti

Re: Smith-Waterman Algorithm in Python

2010-08-07 Thread Daniel Fetchinson
first 20 entries is either the OP questions or your reply. And you think it was there before the OP sent his message? Oh wait, did you just invent a time machine? :) > Daniel - you are no help at all, and no funny. Actually, I'm damn funny! :) Cheers, Daniel -- Psss, psss, put it d

Re: Smith-Waterman Algorithm in Python

2010-08-09 Thread Daniel Fetchinson
>>> Every one of the first 20 entries is either the OP questions or your >>> reply. >> >> And you think it was there before the OP sent his message? >> Oh wait, did you just invent a time machine? :) >> >>> Daniel - you are no help at all, and

Re: how to change a string into dictionary

2010-08-09 Thread Daniel Urban
> a = "{'a':'1','b':'2'}" > how to change a into a dictionary ,says, a = {'a':'1','b':'2'} See also the ast.literal_eval function: http://docs.python.org/py3k/library/ast.html#ast.literal_eval Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: how to save a whole web page with something block

2010-08-10 Thread Daniel Fetchinson
tially it is. So you might want to make urllib appear as a browser by sending the appropriate headers. HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: errors and exception

2010-08-16 Thread Daniel Urban
> f = open("myfile.txt") > for line in f: >   print line > f.close()   # This is what the "with" statement guarantees; so now just do > it yourself Not exactly. More like: f = open("myfile.txt") try: for line in f: print line finally:

Re: String substitution VS proper mysql escaping

2010-08-17 Thread Daniel Kluev
7; and 'list' objects > Besides, using user-provided data and just concatenating it to filename like that is definitely bad idea. You should use os.path.join() at least. Regarding that kind of SQL injection, typically driver will stop it to happen when you provide 2 queries at once delimited

Re: Need to import stuff

2010-08-17 Thread Daniel Kluev
e = imp.load_module(full_name, *module_desc) -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: expression in an if statement

2010-08-18 Thread Daniel Kluev
o 56) >> 55 POP_TOP >> 56 LOAD_CONST 0 (None) 59 RETURN_VALUE > I might be wrong on some points here, but this is what I expect the > expression > (set(a).union(b) == set(a)) has to do, in any conforming implementation of >

path to data files

2010-08-19 Thread Daniel Fetchinson
not work if they are both installed either system-wide or locally. More precisely if the module is called 'foo.py', data file called 'foo', they are both in /usr/lib/python2.6/site-packages and if foo.py I have open('foo') I'll get a file not found error. Any i

Re: path to data files

2010-08-19 Thread Daniel Kluev
On Thu, Aug 19, 2010 at 9:25 PM, Daniel Fetchinson < fetchin...@googlemail.com> wrote: > If a python module requires a data file to run how would I reference > this data file in the source in a way that does not depend on whether > the module is installed system-wide, installed in

Re: path to data files

2010-08-19 Thread Daniel Fetchinson
is fired up? I'd >> like to always keep the python source and the data file in the same >> directory, be it /usr/lib/python2.6/site-packages, >> $HOME/.local/lib/python2.6/site-packages or >> /arbitrary/path/to/somewhere. >> > > open(os.path.join(os.path.dir

Re: Iterative vs. Recursive coding

2010-08-19 Thread Daniel Kluev
n len(filter(bool, map(lambda i: checkMatch(haystack[i:], needle), range(len(haystack) Where checkMatch would be called recursively to match needle over particular part of haystack. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Discarding STDERR generated during subprocess.popen

2010-08-23 Thread Daniel Kluev
cate()[0] > > This returns stdout, and stderr ends up printing to the console. How > can I disregard anything sent to stderr such that it doesn't appear on > the console? > Just add `stderr=subprocess.PIPE` keyword in the Popen call. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Save/load like matlab?

2010-08-23 Thread Daniel Fetchinson
have to run the whole thing > again, which is time consuming. Perhaps pickle is the thing you are looking for? http://docs.python.org/library/pickle.html HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: pypy

2010-08-25 Thread Daniel Fetchinson
entation first; see http://codespeak.net/pypy/dist/pypy/doc/ HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: setting program name, like $0= in perl?

2009-06-09 Thread Daniel Fetchinson
ould start by trying to figure out what information is really sent to the db. I mean it is probably an environment variable or something like that, and once you figure out exactly what it is, you will know what variable to set. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Tool for browsing python code

2009-06-16 Thread Daniel Fetchinson
er high school classmate's uncle did a research on a large statistical sample of programmers and found that emacs users' brains are about 12% smaller than vi users' :) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: No trees in the stdlib?

2009-06-26 Thread Daniel Stutzbach
tic performance characteristics. Copying a blist is O(1), so the functional-programming types can wrap it in non-mutating semantics if they so choose. ;) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -- http://mail.python.org/mailman/listinfo/python-list

Re: Python simple web development

2009-06-26 Thread Daniel Fetchinson
just not necessary and slows things down without a reason. So I would recommend the OP against using either django or turbogears if the project is really small and will stay small in the future. This last point is hard to guess in advance though :) Cheers, Daniel > Have a

Looking for developer to help me

2009-06-27 Thread Daniel Gerzo
help/mentor me with this effort. In case there's somebody with Python skills willing to guide me, please let me know. I have already written some code, and if you're interested you may find it at http://bitbucket.org/danger/pysublib/src/. Thanks, -- S pozdravom / Best regards Da

Re: Looking for developer to help me

2009-06-30 Thread Daniel Gerzo
Dear Lawrence, On Tue, 30 Jun 2009 15:48:52 +1200, Lawrence D'Oliveiro wrote: > In message , Daniel > Gerzo wrote: > >> http://bitbucket.org/danger/pysublib/src/ > > Can't seem to get through to your site. BitBucket isn't actually my site, it's a Me

Re: ANN: Package Manager GUI for Python (Windows)

2009-06-30 Thread Daniel Fetchinson
se don't hesitate to report > them via our tracker on the project page. Another time machine! The Release Notes for version 0.11 on http://www.preisshare.net/pythonpkgmgr/ says it was released on 10/09/09 :) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: memoization module?

2009-07-05 Thread Daniel Fetchinson
> Is there a memoization module for Python? I'm looking for something > like Mark Jason Dominus' handy Memoize module for Perl. The Python Cookbook has several examples: http://www.google.com/search?q=python+memoize&sitesearch=code.activestate.com HTH, Daniel -- Pss

Re: A Bug By Any Other Name ...

2009-07-06 Thread Daniel Fetchinson
functions return via "return", loops terminate via "break" and keep going via "continue" and why is comparison written as "==", etc, etc? All of these are coming from C (or an even earlier language) and my point is that users are most of time correct when

Re: A Bug By Any Other Name ...

2009-07-06 Thread Daniel Fetchinson
RAN. > > Not to mention BASIC > > Both of which predate C Yes, hence my comment above, " coming from C (or an even earlier language) ..". Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: A Bug By Any Other Name ...

2009-07-07 Thread Daniel Fetchinson
useful for many users. > > Might eventually be useful, but I can't hardly recall of more than a > couple threads on this topic in 8+ years. I'm happy we agree. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: A Bug By Any Other Name ...

2009-07-07 Thread Daniel Fetchinson
python was originally intended to "bridge the gap between the shell and C". I've never heard him talk about fortran. But this academic discussion is honestly a little pointless. The OP was referring to a expectation, coming from C, that is not fulfilled in python. What's wrong with mentioning it somewhere for the sake of helping C programmers? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: A Bug By Any Other Name ...

2009-07-07 Thread Daniel Fetchinson
en he realized that warning people about different usage in python and C is a good thing. Expectations from C work sometimes, and sometimes they don't. In latter case a little warning is useful. Cheers, Daniel >> So I'd think that putting a warning in a FAQ or a Python Gotchas list >

[0, 0, 0, 1, 1, 1, 0] ... remove all 0 values

2009-07-08 Thread Daniel Austria
Hi python - hackers, just one question. How can i remove all 0 values in a list? Sure - i can loop over it, but that s not a neat style. list.remove() will only remove the first occurence. Doing that while no exception is raised is also uncool, right? Some suggestions? Best, Dan -- http://mai

Re: A Bug By Any Other Name ...

2009-07-08 Thread Daniel Fetchinson
rse python :)), but if Guido himself thinks the influence of C on python is more important than the others, then let's not doubt him. And yes, I shamelessly admit to arguing based on a higher authority and not based on merit, but in this case it's appropriate, I think :) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: ... remove all 0 values

2009-07-09 Thread Daniel Austria
Thanks a lot for your advices, i decided to use the filter() method to sort out the 0. i can ´t use the sum() function cause i need the list afterwards best, Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Package for fast plotting of many data points in Python?

2009-07-11 Thread Daniel Platz
, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: List insertion cost

2009-07-21 Thread Daniel Stutzbach
), you can use the blist extension type from http://pypi.python.org/pypi/blist/ -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -- http://mail.python.org/mailman/listinfo/python-list

Fast reading and unpacking of binary data (struct module)

2009-07-21 Thread Daniel Platz
he program takes by far the most time. Is there a way to speed this up or to do it the unpacking more cleverly than with the struct module? Thanks in advance. With kind regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: www.python.org website is down?

2009-08-08 Thread Daniel Wong
> > A.M. Kuchling said: > > """ > Bothwww.python.organd svn.python.org are down.  They're hosted on > the same machine, and it seems to have run into disk problems and > hasn't rebooted even after power-cycling.  Thomas Wouters will be > visiting the machine physically tomorrow to try to diagnose t

Re: SQLObject 0.11.0

2009-08-12 Thread Daniel Fetchinson
refer it in small projects. This advantage is also a disadvantage when you have large and complex projects in mind. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeking a python code browser

2009-09-01 Thread Daniel Fetchinson
main HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple addition to random module - Student's t

2009-09-03 Thread Daniel Stutzbach
r cumulative distribution functions require math functions not currently provided by Python (erf, gamma, etc.). (http://bugs.python.org/issue3366 includes a patch to provide them) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -- http://mail.

Re: The future of Python immutability

2009-09-08 Thread Daniel Fetchinson
ought ruby or python or anything else as a language is separate from their implementations. Implementations might have 'speed' but languages don't. Aren't you comparing bananas and pears again? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: search term parsing like Google/Gmail

2009-09-09 Thread Daniel Fetchinson
re that could be used. I don't really care so much > about the search syntax except that easy and intuitive is best for > users. Does something like this exist? You might want to look at pyparsing. HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a local variable scope.

2009-09-11 Thread Daniel Stutzbach
hs back: http://mail.python.org/pipermail/python-ideas/2009-July/005114.html <http://mail.python.org/pipermail/python-ideas/2009-July/005114.html%20> -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a local variable scope.

2009-09-12 Thread Daniel Stutzbach
. Observe: Python 2.6.2 (r262:71600, Apr 15 2009, 07:20:39) [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> with open('/dev/null'

Re: Creating a local variable scope.

2009-09-12 Thread Daniel Stutzbach
wanted to keep. > You're absolutely right. My apologies. I need to learn not to post to mailing lists first thing in the morning! ;-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming ideas?

2009-09-12 Thread Daniel Fetchinson
programs/scripts for! Any ideas will be helpful? Take a look at, http://wiki.python.org/moin/CodingProjectIdeas Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a "strawberry python"?

2009-09-12 Thread Daniel Fetchinson
installations on USB sticks which you can run without any privileges. http://www.portablepython.com/ HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: list as an instance attribute

2009-09-14 Thread Daniel Santos
s there a way to do this ? On Sat, 12 Sep 2009 20:28:12 -0700, Chris Rebert wrote: > Cheers, > Chris > -- > http://blog.rebertia.com > > > > On Sat, Sep 12, 2009 at 8:22 PM, André wrote: >> On Sep 12, 11:48 pm, Daniel Luis dos Santos >> wrote: &

regex search with a space as the fist character

2009-09-16 Thread Daniel Santos
Hello, >>> print re.compile('u ').search(" u box2", 1) <_sre.SRE_Match object at 0x7ff1d918> >>> print re.compile(' u ').search(" u box2", 1) None Why ? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to install pysqlite?

2009-09-19 Thread Daniel Fetchinson
using? >From 2.5 onward python already includes pysqlite. Try 'import sqlite3'. Python 2.5.1 includes pysqlite 2.3.2 while python 2.6.1 includes pysqlite 2.4.1 and python 3.0 includes also pysqlite 2.4.1. You only need to install pysqlite separately if you explicitly need the newer pysql

Re: pyjamas pyv8run converts python to javascript, executes under command-line

2009-09-19 Thread Daniel Fetchinson
script code. Does this make it a 'python implementation'? That would be news to me but I've been wrong many times before. Cheers, Daniel > The Skulpt implementation, already listed by Cameron Laird on his page > of Python implementations, is now also present, although using it

Re: pyjamas pyv8run converts python to javascript, executes under command-line

2009-09-19 Thread Daniel Fetchinson
gt; the same behavior. I think you're implying that it does, but you left >> it implicit, and I think the point is central to deciding if pyjamas is >> a Python implementation or not, so I thought I'd try to make it explicit. >> >> Does pyjamas convert an

Re: What are the naming convention for private member variable, and private and public member function?

2009-09-19 Thread Daniel Fetchinson
e only for non-public methods and > instance > variables." > > I am wondering what is the different between member function and > member variable in term of naming convention. Nothing that I know of. If they are "private" they should both start with an und

Re: How to get the minimum number that can be represented?

2009-09-19 Thread Daniel Fetchinson
; minimum float that can be represented in the machine. > > Could somebody let me know what should be in the function body? I'm not sure this is what you are looking for but have a look at import sys print sys.maxint HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitd

Re: How python source code in large projects are organized?

2009-09-20 Thread Daniel Fetchinson
go, turbogears, etc. These have different styles, pick the one you like best. HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Where are python module installed?

2009-09-20 Thread Daniel Fetchinson
ry 'ls lib/python*' and also 'ls lib/python*/site-packages/' HTH, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: pyjamas pyv8run converts python to javascript, executes under command-line

2009-09-20 Thread Daniel Fetchinson
jamas a python implementation? As far as I know >> pyjamas is an application written in python that is capable of >> generating javascript code. > > it's strictly speaking, according to wikipedia, a "language > translator". Yep, this sounds more like what I origina

Re: Not this one the other one, from a dictionary

2009-09-22 Thread Jean Daniel
Building on the answers of the others, a simple one liner, no side effect, not the fastest I guess: >>> d={'a': 'bob', 'b': 'stu'} >>> set( d.keys() ).difference( [ 'a' ] ).pop() 'b' Note the square brackets for the parameter of difference(). 'The string 'a' and the list [ 'a' ] are both iterable

Re: delete items from list by indices

2009-09-23 Thread Daniel Stutzbach
n to that problem. >>> items = ["a", "b", "c", "d"] > >>> delenda = set([0, 3]) > >>> items = [item for index, item in enumerate(items) if index not in > delenda] > >>> items > ['b', 'c']

Re: Doubley imported module caused devastating bug

2009-09-24 Thread Daniel Stutzbach
On Thu, Sep 24, 2009 at 2:51 PM, Ethan Furman wrote: > I believe that modules are imported only once > That's *mostly* true, but try this one: A.py: print 'Importing A' import B B.py: print 'Importing B' import A Cashew:/tmp$ python2.5 B.py Importing B Imp

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Jean Daniel
Maybe the distutils list is more adapted for this question: The Zope community uses zc.sourcerelease to build rpm http://www.mail-archive.com/distutils-...@python.org/msg06599.html Buildout is said to have undocumented features to build packages. Tarek Ziade is working debian package with 'distr

Re: looking for open source python project

2010-08-29 Thread Daniel Fetchinson
in a > pickle file. > > anybody have any suggestions? i'm keen to work on something with > others, both for learning and i'd like to do something a bit > meaningful, plus i'm sure it's fun. Have a look at http://wiki.python.org/moin/CodingProjectIdeas Cheer

Re: fairly urgent request: paid python (or other) work required

2010-09-02 Thread Daniel Fetchinson
make insecure people feel frightened and threatened. """ """ Pet Hates: - "peer to peer networking" [peer equals neanderthal...] - "microsoft marketing machine" [FUD at its best...] - "r

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Daniel Fetchinson
emails, newsgroup postings, forums and what not, to start using modern tools that work with the vast majority of other tools. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

creating python daemon ?

2010-09-21 Thread vineet daniel
Hi I have succesfully created daemon with python script and as next step I am trying to give input to that python script daemon from Apache Logshere I have got stuck and I have even checked IRC python channel for solution. Apache is able to call the file but fails to execute it properly and I

Re: creating python daemon ?

2010-09-21 Thread vineet daniel
On Sep 21, 9:47 pm, de...@web.de (Diez B. Roggisch) wrote: > vineet daniel writes: > > Hi > > > I have succesfully created daemon with python script and as next step > > I am trying to give input to that python script daemon from Apache > > Logshere I have got

Re: creating python daemon ?

2010-09-22 Thread vineet daniel
On Sep 22, 2:20 pm, de...@web.de (Diez B. Roggisch) wrote: > vineet daniel writes: > > On Sep 21, 9:47 pm, de...@web.de (Diez B. Roggisch) wrote: > >> vineet daniel writes: > >> > Hi > > >> > I have succesfully created daemon with python script and

Re: creating python daemon ?

2010-09-26 Thread vineet daniel
On Sep 26, 2:20 pm, Stefan Schwarzer wrote: > Hi Daniel, > > On 2010-09-23 07:30, vineet daniel wrote: > > > > > On Sep 22, 2:20 pm, de...@web.de (Diez B. Roggisch) wrote: > >> vineet daniel writes: > >>> On Sep 21, 9:47 pm, de...@web.de (Diez B.

Re: how do I search python mailing list archives?

2010-10-13 Thread Daniel Fetchinson
> What are the various ways to search the python mailing list archives? If you are searching for 'foo' and 'bar' you can try this in google: foo bar site:mail.python.org inurl:python-list Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress

Does everyone keep getting recruiting emails from google?

2010-10-14 Thread Daniel Fetchinson
his? Just wondering, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

merge list of tuples with list

2010-10-19 Thread Daniel Wagner
ut like: a = [(1,2,3,7), (4,5,6)] It was possible for me to create this output using a "for i in a" technique but I think this isn't a very nice way and there should exist a solution using the map(), zip()-functions I appreciate any hints how to solve this problem efficiently.

Re: merge list of tuples with list

2010-10-19 Thread Daniel Wagner
On Oct 19, 8:35 pm, James Mills wrote: > On Wed, Oct 20, 2010 at 10:16 AM, Daniel Wagner > > wrote: > > My short question: I'm searching for a nice way to merge a list of > > tuples with another tuple or list. Short example: > > a = [(1,2,3), (4,5,6)] > &g

Re: merge list of tuples with list

2010-10-19 Thread Daniel Wagner
>a = [(1,2,3), (4,5,6)] >>>b = (7,8) >>> a = CODE >>>a [(1,2,3,7), (4,5,6,8)] Greetings, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: merge list of tuples with list

2010-10-19 Thread Daniel Wagner
ng code solves the problem: >>> a = [(1,2,3), (4,5,6)] >>> b = [7,8] >>> a = map(tuple, map(lambda x: x + [b.pop(0)] , map(list, a))) >>> a [(1, 2, 3, 7), (4, 5, 6, 8)] Any more efficient ways or suggestions are still welcome! Greetings, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: merge list of tuples with list

2010-10-20 Thread Daniel Wagner
) function or maybe the lambda construct? Greetings, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: merge list of tuples with list

2010-10-20 Thread Daniel Wagner
2,3], [4,5,6]]; b=[7,8]' '[x+[y] for x,y in > zip(a,b)]' > 10 loops, best of 3: 2.43 usec per loop > > > If anyone can do better than that (modulo hardware differences), I'd be > surprised. > Yeah, this seems to be a nice solution. Greetings, Daniel -- http://mail.python.org/mailman/listinfo/python-list

[OFF] sed equivalent of something easy in python

2010-10-25 Thread Daniel Fetchinson
tly done with a bash script I'd hate to move to python just to do this simple task. What would be the sed equivalent? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: [OFF] sed equivalent of something easy in python

2010-10-25 Thread Daniel Fetchinson
s its job perfectly and I needed to insert this additional task into it. I had 3 choices: (1) rewrite the whole thing in python (2) add this one task in python (3) add this one task in sed. I chose (3) because (1) looked like a waste of time and (2) made me take care of 2 files instead of 1 from now on. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyGUI 2.3

2010-10-26 Thread Daniel Fetchinson
> PyGUI 2.3 is available: > >http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ > > This version works on Snow Leopard with PyObjC 2.3. Any reason your project is not easy_installable? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/put

Re: ANN: PyGUI 2.3

2010-10-27 Thread Daniel Fetchinson
tchinson/.local/lib/python2.6/site-packages/GUI and some other parts get installed to /home/fetchinson/.local/lib/python/site-packages/GUI which makes the install broken. If I move everything from the latter location to the former, it all works though. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Would you recommend python as a first programming language?

2010-11-01 Thread Daniel Kluev
> > I was thinking of recommending this to a friend but what do you all think? > Python is great language to learn programming. I've heard MIT switched from Scheme to Python as introductory language for their students. -- With best regards, Daniel Kluev -- http://mail.pyth

playful coding problems for 10 year olds

2010-11-01 Thread Daniel Fetchinson
know problems like these? Or a good resource where to look them up? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: playful coding problems for 10 year olds

2010-11-02 Thread Daniel Fetchinson
ode herself maybe after some initial >> help. >> >> Do you guys know problems like these? Or a good resource where to look >> them up? >> >> Cheers, >> Daniel >> > > There's a great book valled 'Invent your own computer games using >

<    12   13   14   15   16   17   18   19   >