Re: py3k s***s

2008-04-16 Thread Aaron Watters
e the basic treatment of strings is totally different in py3k, it seems. Maybe there is a secret desire in the Python community to remain a fringe minority underdog forever? -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=reap+dead+child -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-16 Thread Aaron Watters
On Apr 16, 11:15 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 16 abr, 09:56, Aaron Watters <[EMAIL PROTECTED]> wrote: > > > In my opinion python's adherence to backwards compatibility > > has been a bit mythological anyway -- many new python versions

Re: py3k s***s

2008-04-16 Thread Aaron Watters
On Apr 16, 12:27 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Apr 16, 6:56 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > > > I don't get it. It ain't broke. Don't fix it. > > So how would you have done the old-style class to new-style class >

Re: py3k s***s

2008-04-16 Thread Aaron Watters
on environment, ecosystem and community. In the short term I foresee everything bifurcating into two separate code bases, and I think that's a shame, and I don't really see the need. -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=nightmare -- http://mail.python.org/mailman/listinfo/python-list

Re: Profiling very small/quick functions, help!?

2008-04-16 Thread Aaron Watters
in xrange(1,1): test = power(10,10) if __name__=="__main__": try: from cProfile import run except: from profile import run for x in range(1, 1): run("test1()") all the best! -- Aaron Watters === http://www.xfeedme.com/nuc

Re: py3k s***s

2008-04-16 Thread Aaron Watters
uld be a good thing. It seems to have happened in the Perl4->5 migration some years ago. Could happen again. -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=repeatedly+hammer -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-16 Thread Aaron Watters
e Perl 4 was. The cost paid for these minor improvements is too high in my book. But I suppose if it is going to happen do it sooner rather than later. Just *please* *please* don't systematically break the pre-existing code base again for a very long time, preferable ever. -- Aaron Wat

Re: py3k s***s

2008-04-16 Thread Aaron Watters
an python" is a "better coding practice". I've seen it happen. -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=alien -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-17 Thread Aaron Watters
ally or accidentally which means I'll have to carefully rewrite and retest any code which uses the new and improved libraries ... and the "deprecated/removed" libs won't work anymore, so I can't just put them into my package... sigh. -- Aaron Watters === http://www.xfe

Re: py3k s***s

2008-04-18 Thread Aaron Watters
sting code. I really like developing in Python -- but it's hard to keep doing it when the growth curve is so slow and a so many people have deep reservations about it, inspired in part, justifiably, by nonsense like this. In fact, I basically stopped. Then I came back. Now I'm won

Re: Database vs Data Structure?

2008-04-18 Thread Aaron Watters
ho have a "rabbit cage" project -- and if you just pickle everything you will end up traversing the entire database, possibly multiple times to find it. A little old fashioned database design up front can save you a lot of pain. -- Aaron Watters === http://www.xfeedme.com/nucular/pydi

py3k concerns. An example

2008-04-18 Thread Aaron Watters
mple way to translate my code, I think. I suspect you will find this kind of subtle issue in many places. Or worse, you won't find it until after your program has been installed in production. It's a damn shame because if string%dict was just left in it wouldn't be an issue. Also,

Re: py3k concerns. An example

2008-04-18 Thread Aaron Watters
alty (afaik there isn't). An alternative is to provide an alternate interface to string.format so that you could pass in an object which might emulate a dictionary, like string.formatDict(D) -- or you could even adopt a shortcut notation like string % D -- hey there's an idea! -- Aaron Watt

Re: py3k concerns. An example

2008-04-24 Thread Aaron Watters
me, and I think it's different in kind from python 1.x->2.x. 2.x broke very little as I recall. Most 1.x code just worked in 2.x and most of the rest required very minor change. I think this is not the case for 2.x->3.x. -- Aaron (Scummy) Watters, hoping to shut up now. ps: I did

Re: py3k concerns. An example

2008-04-27 Thread Aaron Watters
ith no changes (but please note that I don't write gui stuff, which is less stable -- I'm speaking of algorithmic and system libraries). -- Aaron Watters === btw: usage (5) for "shame" in the python source: http://www.xfeedme.com/nucular/pydistro.py/go?FocusId=463&FREETEXT=shame -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k concerns. An example

2008-04-27 Thread Aaron Watters
k about it. Can anyone recommend a good book on Ruby :)? -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=unnecessary+breakage -- http://mail.python.org/mailman/listinfo/python-list

Re: Cookie Confusion - How to Set a Cookie

2008-04-28 Thread Aaron Watters
if cookie == '': return {} c = SimpleCookie() c.load(cookie) cookiedict = {} for key in c.keys(): cookiedict[key] = c.get(key).value return cookiedict === All the best. -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=monster -- http://mail.python.org/mailman/listinfo/python-list

Re: simple chemistry in python

2008-04-29 Thread Aaron Watters
entific data repositories (not web search forms: downloadable complete data)? -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=valence -- http://mail.python.org/mailman/listinfo/python-list

Re: Cookie Confusion - How to Set a Cookie

2008-04-29 Thread Aaron Watters
> Thanks for the code, Aaron. I will give it a try. > > I've been reading some more about cookielib and am not sure whether I > should use Cookie or cookielib. This is what I want to do: a user is > going to login. Upon a successful login, I want to write their name >

Re: best way to host a membership site

2008-04-30 Thread Aaron Watters
possible that my understanding of Django is not deep enough and that the answer is "Django". -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=you+may+cheat -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to host a membership site

2008-04-30 Thread Aaron Watters
tes that looked a little like this...) -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=slip+nibble -- http://mail.python.org/mailman/listinfo/python-list

Re: Tremendous slowdown due to garbage collection

2008-04-30 Thread Aaron Watters
this would make an excellent computer science Master's Thesis topic. Anybody looking for a topic? -- Aaron Watters http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=use+while+fresh -- http://mail.python.org/mailman/listinfo/python-list

Re: Cookie Confusion - How to Set a Cookie

2008-05-02 Thread Aaron Watters
On May 1, 9:02 am, [EMAIL PROTECTED] wrote: > On Apr 29, 3:35 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > > > > > > Thanks for the code, Aaron. I will give it a try. > > > > I've been reading some more about cookielib and am not sure whether I &g

Re: Why is None <= 0

2008-05-02 Thread Aaron Watters
his using L.sort(cmp) where cmp is implemented in Python can result in a significant speed penalty. What's up with Tim Peters anyway? I haven't seen much from him for a while. -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=quote+tim+peters -- http://mail.python.org/mailman/listinfo/python-list

Re: STL multimap

2008-05-05 Thread Aaron Watters
variable-width. You lost me here. python 2.6: >>> def (a): a[:]=[x] File "", line 1 def (a): a[:]=[x] ^ SyntaxError: invalid syntax All the best. -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=gaping+security+hole -- http://mail

Re: STL multimap

2008-05-06 Thread Aaron Watters
h no bubbling. It's too bad the Python that comes installed on Macs doesn't support channels :(. I know I didn't address your question or comments... -- Aaron Watters http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=ifdef+stackless -- http://mail.python.org/mailman/listinfo/python-list

mod_python and updated files

2008-08-18 Thread Aaron Scott
I have mod_python running on my server, but when I chance a Python file on the server, Apache needs to be restarted in order to have the changes take effect. I assume this is so mod_python can run persistently, but it's becoming quite a headache for development. Is there a way to turn off the persi

Reading binary data

2008-09-10 Thread Aaron Scott
I've been trying to tackle this all morning, and so far I've been completely unsuccessful. I have a binary file that I have the structure to, and I'd like to read it into Python. It's not a particularly complicated file. For instance: signature char[3] "GDE" version uint32 2 attr_co

Re: Reading binary data

2008-09-10 Thread Aaron Scott
> signature, version, attr_count = struct.unpack('3cII', > yourfile.read(11)) > This line is giving me an error: Traceback (most recent call last): File "test.py", line 19, in signature, version, attr_count = struct.unpack('3cII', file.read(12)) ValueError: too many values to unpack -- htt

Re: Reading binary data

2008-09-10 Thread Aaron Scott
> CORRECTION: '3cII' should be '3sII'. Even with the correction, I'm still getting the error. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading binary data

2008-09-10 Thread Aaron Scott
Sorry, I had posted the wrong error. The error I am getting is: struct.error: unpack requires a string argument of length 12 which doesn't make sense to me, since I'm specifically asking for 11. Just for kicks, if I change the line to print struct.unpack('3sII', file.read(12)) I get t

Re: Reading binary data

2008-09-10 Thread Aaron Scott
Taking everything into consideration, my code is now: import struct file = open("test.gde", "rb") signature = file.read(3) version, attr_count = struct.unpack('II', file.read(8)) print signature, version, attr_count for idx in xrange(attr_count): attr_id, attr_val_len = struct.unpack('II',

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-23 Thread Aaron Denney
> The Python program is too slow for large sets. In Haskell you can get this essentially for free, due to its laziness. -- Aaron Denney -><- -- http://mail.python.org/mailman/listinfo/python-list

Re: High-performance Python websites

2009-12-06 Thread Aaron Watters
/ and here http://listtree.appspot.com/ I hope that helps. -- Aaron Watters === an apple every 8 hours will keep 3 doctors away. -kliban -- http://mail.python.org/mailman/listinfo/python-list

ANN: WHIFF.0.7 += GAE + jQueryUI + internationalization + testdrive = (last beta?)

2009-12-09 Thread Aaron Watters
lemented on Google App Engine using WHIFF. I hope you like. -- Aaron Watters === Talk low. Talk slow. And don't say a lot. -- John Wayne's advice to Clint Eastwood -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: WHIFF.0.7 += GAE + jQueryUI + internationalization + testdrive = (last beta?)

2009-12-09 Thread Aaron Watters
On Dec 9, 1:48 pm, Terry Reedy wrote: > Aaron Watters wrote: > > Also the WHIFF documentation is now hosted on Google App > > Engine at thehttp://whiffdoc.appspot.com/domain. > > When I went there and clicked on the "scatter chart is generated by a > straightforwa

Re: a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-09 Thread Aaron Watters
or Python or any other programming language. Generally you can always get to any piece of data in about 4 seeks at most anyway, so if your disk is fast your app will be fast too. The file can be accessed concurrently without problems by any number of processes or threads. -- Aa

Re: ANN: WHIFF.0.7 += GAE + jQueryUI + internationalization + testdrive = (last beta?)

2009-12-10 Thread Aaron Watters
gh for you? :) You are now immortalized in the WHIFF repository http://aaron.oirt.rutgers.edu/cgi-bin/whiffRepo.cgi/rev/6d8c650102dd Please let me know if anything else offends your sensibilities. Thanks again, -- Aaron Watters === an apple every 8 hours will keep 3 doctors away. -- kliban -- http

wave robot notes

2009-12-23 Thread Aaron Watters
using wave, please add it to a wave and try it out. It should "respond" to a BNF rule you type in like this one: program ::= "begin" (statement ";")+ "end" $$ Happy Holidays everyone... I'm off to the slopes :). -- Aaron Watters === an apple ev

Re: Moving from PHP to Python. Is it Possible

2009-12-29 Thread Aaron Watters
than full > academic description. http://whiffdoc.appspot.com (again) there are lots and lots of examples. I hope you like it and have a happy new year! -- Aaron Watters === my resolution last year was not to make any resolutions this year. -- http://mail.python.org/mailman/listinfo/python-list

regex object limitations/behavior for large regexes?

2009-12-30 Thread Aaron Watters
very large? Do they remain as fast? Do they display reasonable (linear or n log n) memory growth? Do they just stop working at some point? Please reply if you have any experience with very large regexes or other insights. Thanks in advance. -- Aaron Watters === less is more --

Re: regex object limitations/behavior for large regexes?

2009-12-30 Thread Aaron Watters
Sorry, I should have looked harder. I found this: http://bugs.python.org/issue1160 It looks exactly like my use case. drat. -- Aaron Watters http://whiffdoc.appspot.com === less is more. -- http://mail.python.org/mailman/listinfo/python-list

Serial connections and threads in a GUI

2009-09-29 Thread Aaron Hoover
in Python, so I'm sure there's a straightforward way to do this that I'm just missing. At any rate, thanks in advance for your patience and assistance. Thanks, Aaron -- http://mail.python.org/mailman/listinfo/python-list

Re: is this whiff/wsgi claim true?

2009-09-30 Thread Aaron Watters
wsgi/wiki/ConfigurationDirectives#WSGIScr... Thanks. I think this observation makes a liar of me :(. I'll have to reword the claim. I could split hairs to assert that this is "not the same" thing, but it's close enough -- Aaron Watters === Speak roughly to your little boy

Threaded GUI slowing method execution?

2009-10-01 Thread Aaron Hoover
GUI thread, won't work. Thanks in advance for your help. Aaron -- http://mail.python.org/mailman/listinfo/python-list

Re: AJAX Widget Framework

2009-10-02 Thread Aaron Watters
in support for AJAX. You could probably use this as a starting point for building your "grid" widget. I've used WHIFF with jquery and mootools javascript libraries with much success. Please let me know what you think. -- Aaron Watters === Ban DHMO! http://www.dhmo.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Threaded GUI slowing method execution?

2009-10-02 Thread Aaron Hoover
urprised by this result. Maybe someone with more multiprocessing experience can give me some pointers. Maybe I am barking up the wrong tree with Python from a speed perspective, but it's just some much faster and more fun to write than anything else... Aaron -- http://mail.python.org/mailman/listinfo/python-list

Re: Threaded GUI slowing method execution?

2009-10-03 Thread Aaron Hoover
On Oct 2, 2009, at 1:18 PM, sturlamolden wrote: On 2 Okt, 21:30, Dave Angel wrote: There could very well be multiprocess support in wxPython. I'd check there first, before re-inventing the wheel. I don't think there is. But one can easily make a thread in the subprocess that polls a pipe

Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Aaron Watters
etween extremely unpleasant and impossible to make any non-trivial changes to a non-trivial program, especially after it has been populated with data. Ok I feel a little better now. Maybe I should get back to work... -- Aaron Watters http://aaron.oirt.rutgers.edu/myapp/docs/W1100_1200.wwiki

Re: Object Relational Mappers are evil (a meditation)

2009-10-21 Thread Aaron Watters
On Oct 16, 10:35 am, mario ruggier wrote: > On Oct 5, 4:25 pm, Aaron Watters wrote: > > > Occasionally I fantasize about making a non-trivial change > > to one of these programs, but I strongly resist going further > > than that because the ORM meatgrinder makes

ANN: WHIFF += Mako & treeview & url rewrites

2009-10-26 Thread Aaron Watters
at are shorter and easier to understand. Read it here: http://aaron.oirt.rutgers.edu/myapp/docs/W1100_2050.UrlMapping WHIFF HOME PAGE: http://whiff.sourceforge.net I hope you like it! -- Aaron Watters === less is more. -- http://mail.python.org/mailman/listinfo/python-list

Re: Web development with Python 3.1

2009-10-26 Thread Aaron Watters
aaron.oirt.rutgers.edu/myapp/GenBankTree/index http://whiff.sourceforge.net -- Aaron Watters === It gotta be rock-roll music if you wanna dance with me if you wanna dance with me -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: WHIFF += Mako & treeview & url rewrites

2009-10-27 Thread Aaron Watters
On Oct 27, 7:04 am, Paul Boddie wrote: > On 27 Okt, 03:49, Aaron Watters wrote: > > > > > WHIFF now includes components for > > implementing "tree views" for web navigation panes > > or other purposes, either using AJAX or frame > &g

Re: ANN: WHIFF += Mako & treeview & url rewrites

2009-10-27 Thread Aaron Watters
Paul Boddie wrote: > On 27 Okt, 03:49, Aaron Watters wrote: ... > > http://aaron.oirt.rutgers.edu/myapp/GenBankTree/index > > This looks interesting, but when I have JavaScript switched off, I get > a big traceback ... I just tried it. How do you get a traceback? For me none

Re: ANN: WHIFF += Mako & treeview & url rewrites

2009-10-27 Thread Aaron Watters
On Oct 27, 8:02 am, alex23 wrote: > If you need a full traceback, let me know. Well, yes, the bottom of the traceback would be more useful :). -- Aaron Watters -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: WHIFF += Mako & treeview & url rewrites

2009-10-27 Thread Aaron Watters
On Oct 27, 8:16 am, Aaron Watters wrote: > On Oct 27, 8:02 am, alex23 wrote: > > > If you need a full traceback, let me know. > > Well, yes, the bottom of the traceback would be more useful :). > >    -- Aaron Watters Alex sent me the traceback (thanks!) and after con

Re: Web development with Python 3.1

2009-10-27 Thread Aaron Watters
I built WHIFF :). http://aaron.oirt.rutgers.edu/myapp/docs/W1100_2200.TreeView -- Aaron Watters === If all you got is lemons, make lemonade. -- anon. -- http://mail.python.org/mailman/listinfo/python-list

Python library "support" propaganda lists?

2009-10-30 Thread Aaron Watters
line RTFM reply to the poster. There, I feel better now. -- Aaron Watters http://aaron.oirt.rutgers.edu/myapp/docs/W1100_1600.openFlashCharts === If you think you are smart enough to write multi-threaded programs, then you're not.-- Jim Ahlstrom -- http://mail.python.org/mailman/listinfo/python-list

Re: Python library "support" propaganda lists?

2009-10-30 Thread Aaron Watters
in particular -- I'm just making a general observation. Maybe as Robert suggests I will try comp.lang.python as a fall back after a few days of nonresponsiveness in the future... -- Aaron Watters http://aaron.oirt.rutgers.edu/myapp/docs/W1100_2200.TreeView === "I'm

Re: Python library "support" propaganda lists?

2009-10-30 Thread Aaron Watters
On Oct 30, 12:51 pm, Robert Kern wrote: > On 2009-10-30 11:31 AM, Aaron Watters wrote: > > > I know this may be due to simple laziness and negligence, > > but in that case they should turn moderation off. > > That's the funny thing about mailing list problems. I

graceful degradation : is it degrading?

2009-11-02 Thread Aaron Watters
le javascript if you want to use this page..." What is the state of best-practices and such? -- Aaron Watters === she was dirty, flirty / musta been about thirty... Stones '60s she was shifty, nifty / musta been about fifty... Stones '90s (what rhymes with 80?) -- http://mail.python.org/mailman/listinfo/python-list

Re: python simply not scaleable enough for google?

2009-11-13 Thread Aaron Watters
running on my laptop is *much* faster. By the way: the GO language smells like Rob Pike, and I certainly hope it is more successful than Limbo was. Of course, if Google decides to really push it then it's gonna be successful regardless of all other considerations, just like Sun did to

Re: wsgi with separate css file

2009-11-13 Thread Aaron Watters
om/ service is implemented using WHIFF under the Google App Engine environment. -- Aaron Watters === TO INFINITY... AND BEYOND! -- http://mail.python.org/mailman/listinfo/python-list

Re: python simply not scaleable enough for google?

2009-11-17 Thread Aaron Watters
speaking someone should invite Matt Mackall to give a Python conference keynote. Or how about Bram Cohen for that matter... -- Aaron Watters http://listtree.appspot.com/ === if you want a friend, get a dog. -Truman -- http://mail.python.org/mailman/listinfo/python-list

Re: python simply not scaleable enough for google?

2009-11-20 Thread Aaron Watters
Comparing language platforms using small numeric benchmarks often completely misses the point. -- Aaron Watters http://whiffdoc.appspot.com http://listtree.appspot.com === an apple every 8 hours will keep 3 doctors away. - kliban -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI templating with python

2010-04-02 Thread Aaron Watters
out the test drive. http://whiffdoc.appspot.com/docs/W.intro -- Aaron Watters === This one goes to 11. -- http://mail.python.org/mailman/listinfo/python-list

Re: constructin trees in python

2010-11-21 Thread Aaron Sterling
> Thanks a lot peter, that worked as i needed. Where can i find some > good documentation which explains such behavior. The reason for this behavior is the way python stores attributes. Both a class and an instance of a class have a __dict__ attribute which is a dictionary which stores attributes

Including a remote file -- permission denied?

2010-05-14 Thread Aaron Scott
I have a Python script running on the default OSX webserver, stored in /Library/WebServer/CGI-Executables. That script spits out a list of files on a network drive, a la "os.listdir('/Volumes/code/ directory/')". If I just execute this from the terminal, it works as expected, but when I try to acce

Announcing: WHIFF 1.0

2010-06-05 Thread Aaron Watters
eploy And much more. Please try it out and let me know what you think -- Aaron Watters === This one goes to eleven. -- http://mail.python.org/mailman/listinfo/python-list

Re: Serializing functions

2010-06-17 Thread Aaron Staley
I am one of the developer's of PiCloud. To answer your question, we wrote a custom subclass of Pickler to pickle functions. As Robert pointed out, the library is LGPL, so you can see (and use) the source code. I also presented the details on a poster at PyCon 2010. You can see it here: http://b

conceptual model diagram builder

2010-06-22 Thread Aaron Watters
source at this link. http://code.google.com/p/whiff/source/browse/#hg/trunk/test/root/schema Let me know what you think. If you want to get the source you will have to clone the google code mercurial archive (it isn't part of the whiff release yet). -- Aaron Watters === This

Re: mysql query results to web page

2010-06-22 Thread Aaron Watters
I scripting. I also had to mess with some directory permissions because my MySQLdb on my Mac in inside a Python Egg... to get around these sorts of problems you may have to look at your server error log. Also please see the WHIFF quickstart for a discussion of setting up a WSGI/WHIFF based CGI script. Good luck! -- Aaron Watters === % man less less is more. -- http://mail.python.org/mailman/listinfo/python-list

Re: I wander which is better? JSP or Python? And is there a place for JSP?

2010-06-28 Thread Aaron Watters
regular expressions and such. It's very easy to understand, develop, debug. This is why I wrote WHIFF to use a similar but generalized "drop in" paradigm. http://whiffdoc.appspot.com -- Aaron Watters === % man less less is more. -- http://mail.python.org/mailman/listinfo/python-list

Re: I strongly dislike Python 3

2010-06-28 Thread Aaron Watters
thon in favor of a less chaotic platform, like Java or C# or even (got help us) Perl. I apologize if I pontificate. -- Aaron Watters -- http://mail.python.org/mailman/listinfo/python-list

Re: Pdf download using mechanize

2010-07-06 Thread Aaron Watters
ge.net/mechanize/doc.html It looks like downloading any sort of file and saving it should be straightforward to me, but I haven't tried it. Aaron Watters http://whiffdoc.appspot.com === % man less less is more. -- http://mail.python.org/mailman/listinfo/python-list

Re: fastest way to test file for string?

2009-06-05 Thread Aaron Brady
On Jun 5, 5:50 am, kj wrote: > Hi.  I need to implement, within a Python script, the same > functionality as that of Unix's > >    grep -rl some_string some_directory > > I.e. find all the files under some_directory that contain the string > "some_string". snip The 'mmap.mmap' class has a 'find'

Re: can it be shorter?

2009-06-07 Thread Aaron Brady
On Jun 6, 8:07 am, "tsangpo" wrote: > I want to ensure that the url ends with a '/', now I have to do thisa like > below. > url = url + '' if url[-1] == '/' else '/' > > Is there a better way? url+= { '/': '' }.get( url[ -1 ], '/' ) Shorter is always better. -- http://mail.python.org/mailman/li

Re: can it be shorter?

2009-06-08 Thread Aaron Brady
On Jun 7, 6:13 pm, Paul Rubin <http://phr...@nospam.invalid> wrote: > Aaron Brady writes: > > url+= { '/': '' }.get( url[ -1 ], '/' ) > > > Shorter is always better. > > url = url.rstrip('/') + '/' I was joking. Sheesh. -- http://mail.python.org/mailman/listinfo/python-list

Re: can it be shorter?

2009-06-08 Thread Aaron Brady
On Jun 8, 9:50 am, Jean-Michel Pichavant wrote: > Aaron Brady wrote: > > Shorter is always better. > > > url+= { '/': '' }.get( url[ -1 ], '/' ) > > Why bother with spaces or 3 letter-wide token, check this  :o) : > x+={'/':'

Re: free chart lib for Python?

2009-06-10 Thread Aaron Watters
in applets. Documentation here: http://aaron.oirt.rutgers.edu/myapp/amcharts/doc You can get it from the WHIFF mercurial repository for now. http://aaron.oirt.rutgers.edu/cgi-bin/whiffRepo.cgi I will upload a tarball to http://whiff.sourceforge.net soonish. Thanks in advance for any comments. -- Aaron Watte

ANN: WHIFF += Flash chart widget support

2009-06-11 Thread Aaron Watters
F does not provide a "packaged cake mix" for baking a web application. Instead WHIFF is designed to provide a set of ingredients which can be easily combined to make web applications (with no need to refine your own sugar or mill your own wheat). I hope you like it. -- Aaron Watters === l

Re: ANN: WHIFF += Flash chart widget support (Aaron Watters)

2009-06-12 Thread Aaron Watters
oked pretty good too, which I may add sometime. http://teethgrinder.co.uk/open-flash-chart/ -- Aaron Watters === an apple every 8 hours will keep 3 doctors away. -- kliban -- http://mail.python.org/mailman/listinfo/python-list

Re: Different types of dicts with letter before the curly braces.

2009-06-14 Thread Aaron Brady
On Jun 14, 4:02 am, kindly wrote: > I am sure people have thought of this before, but I cant find where. > I think that python should adapt a way of defining different types of > mapping functions by proceeding a letter before the curly brackets. > i.e   ordered = o{},  multidict = m{}  (like past

Re: Different types of dicts with letter before the curly braces.

2009-06-14 Thread Aaron Brady
On Jun 14, 6:30 am, kindly wrote: > On Jun 14, 1:59 pm, Steven D'Aprano snip > I am glad the ordered dict will be in 2.7 and 3.1. I > was just imagining what would be the next step in definition of > structures. New languages like clojure have adopted the dict as top > level.  I imagine immutable/

persistent composites

2009-06-14 Thread Aaron Brady
Hi, please forgive the multi-posting on this general topic. Some time ago, I recommended a pursuit of keeping 'persistent composite' types on disk, to be read and updated at other times by other processes. Databases provide this functionality, with the exception that field types in any given tabl

Re: persistent composites

2009-06-14 Thread Aaron Brady
On Jun 14, 8:24 am, Steven D'Aprano wrote: > Aaron Brady wrote: > > Some time ago, I recommended a pursuit of keeping 'persistent > > composite' types on disk, to be read and updated at other times by > > other processes.  Databases provide this functionalit

Re: Question about None

2009-06-14 Thread Aaron Brady
On Jun 14, 10:02 am, Arnaud Delobelle wrote: snip > guilt, it doesn't mean they will be convicted.  There needs to be enough > evidence to convince the jury.  So it would be something like: > > if sum(guilt_weight(e) for e in evidence) > GUILT_THRESHOLD: >    the defendant is guilty >    ... > > -

Re: Question about None

2009-06-14 Thread Aaron Brady
On Jun 14, 12:37 pm, Paul Rubin wrote: > Andre Engels writes: snip > > type "thingy". A car is a single car. Nothing is zero cars, which is > > not a car, just like two cars is not a car. > > That seems to confuse values with collections of them.  A car is not > the

Re: persistent composites

2009-06-15 Thread Aaron Brady
On Jun 15, 5:45 am, "Diez B. Roggisch" wrote: > Aaron Brady wrote: > > Hi, please forgive the multi-posting on this general topic. > > > Some time ago, I recommended a pursuit of keeping 'persistent > > composite' types on disk, to be read and u

Re: persistent composites

2009-06-15 Thread Aaron Brady
On Jun 14, 10:18 am, Jaime Fernandez del Rio wrote: > On Sun, Jun 14, 2009 at 4:27 PM, Aaron Brady wrote: > > > Before I go and flesh out the entire interfaces for the provided > > types, does anyone have a use for it? > > A real-world application of persistent data stru

Re: Question about None

2009-06-15 Thread Aaron Brady
On Jun 14, 9:50 pm, Steven D'Aprano wrote: > On Sun, 14 Jun 2009 19:14:10 -0400, Terry Reedy wrote: > > Steven D'Aprano wrote: > > >> So-called "vacuous truth". It's often useful to have all([]) return > >> true, but it's not *always* useful -- there are reasonable cases where > >> the opposite be

Re: persistent composites

2009-06-15 Thread Aaron Brady
On Jun 15, 8:37 am, a...@pythoncraft.com (Aahz) wrote: > In article <79mtt7f1r480...@mid.uni-berlin.de>, > Diez B. Roggisch wrote: > > >Aaron Brady wrote: > > >> Some time ago, I recommended a pursuit of keeping 'persistent > >> composite' typ

Re: persistent composites

2009-06-15 Thread Aaron Brady
On Jun 15, 11:10 am, Paul Rubin <http://phr...@nospam.invalid> wrote: > Aaron Brady writes: > > > A real-world application of persistent data structures can be found here: > > >http://stevekrenzel.com/persistent-list > > > Jaime, thanks for the link.  I cont

Re: Good books in computer science?

2009-06-16 Thread Aaron Watters
the extra £10-£30 to get the > latest edition? This is the best book ever written on computer science and the first edition is free. http://www.math.upenn.edu/~wilf/AlgComp3.html -- Aaron Watters http://aaron.oirt.rutgers.edu/myapp/amcharts/doc === less is more. -- http://mail.python.

Re: persistent composites

2009-06-16 Thread Aaron Brady
On Jun 15, 4:56 pm, Aaron Brady wrote: > On Jun 15, 11:10 am, Paul Rubin <http://phr...@nospam.invalid> wrote: > > > Aaron Brady writes: > > > > A real-world application of persistent data structures can be found > > > > here: > > > >http://

Re: persistent composites

2009-06-17 Thread Aaron Brady
On Jun 16, 10:09 am, Mike Kazantsev wrote: > On Tue, 16 Jun 2009 06:57:13 -0700 (PDT) > > Aaron Brady wrote: > > Making the charitable interpretation that this was the extent of c-l- > > py's support and enthusiasm for my idea, I will now go into mourning. > > De

Re: Question about None

2009-06-17 Thread Aaron Brady
On Jun 17, 5:47 am, Bruno Desthuilliers wrote: > John Yeung a écrit : > > But mathematically speaking, it's intuitive that "nothing" would match > > any type. > > IOW, what's the OP is after is not the None type, but some yet > unexisting "Anything" type !-) The behaviors of the 'anything' object

Re: Executing a python script while it is running

2009-06-17 Thread Aaron Brady
On Jun 16, 3:48 pm, Zach Hobesh wrote: > > A lot more information would be useful.  What version of Python, and what > > operating system environment?  Exactly what would you like to happen when > > the batch file is invoked a second time? > > I'm running Python 2.6.2 on Windows.  I'm passing file

Re: Exotic Logics

2009-06-17 Thread Aaron Brady
On Jun 17, 1:44 am, Steven D'Aprano wrote: > On Tue, 16 Jun 2009 22:46:14 -0700, William Clifford wrote: > > I was staring at a logic table the other day, and I asked myself, "what > > if one wanted to play with exotic logics; how might one do it?" > > This might be useful for you, and if not usef

Re: Exotic Logics

2009-06-17 Thread Aaron Brady
On Jun 17, 1:28 am, Steven D'Aprano wrote: > On Tue, 16 Jun 2009 22:46:14 -0700, William Clifford wrote: > > I was staring at a logic table the other day, and I asked myself, "what > > if one wanted to play with exotic logics; how might one do it?" > > First question: what's an exotic logics? > >

<    3   4   5   6   7   8   9   10   11   >