Re: Complementary language?

2004-12-26 Thread gene . tani
http://lambda-the-ultimate.org/ http://advogato.org/ http://c2.com/cgi/wiki?WelcomeVisitors www.artima.com It's a big world out there, you can glimpse Haskell, LUA, CLU, scheme, squeak etc. Disclaimer: going into these sites is liking going into REM sleep when it's 95 degrees Fahrenheit (hot) and

Re: a sequence question

2005-01-30 Thread gene . tani
cookbook's not an easy grep but: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303060 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303279 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347689 -- http://mail.python.org/mailman/listinfo/python-list

Re: Help! Host is reluctant to install Python

2005-01-30 Thread gene . tani
Based on discusses with these guys, who know LAMP, python, ruby inside and out, and support it well: http://textdrive.com/ I'm guessing you'd have a hard time finding mod_python / apache hosting unless you get a dedicated server. It's pretty labor-intensive setup and admin-wise. linux shell /

Re: The next Xah-lee post contest

2005-01-30 Thread gene . tani
Tragi-comic. really. BTW you forgot cross-post to c.l.scheme, C, smalltalk and C++ -- http://mail.python.org/mailman/listinfo/python-list

Re: [perl-python] problem: reducing comparison

2005-02-16 Thread gene . tani
This could have been a really unique thread: 15 messages, 1 author -- http://mail.python.org/mailman/listinfo/python-list

Re: function with a state

2005-03-06 Thread gene . tani
and make it a singleton, viz: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52558 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531 http://www.python.org/2.2.3/descrintro.html (scroll wayyy down) -- http://mail.python.org/mailman/listinfo/python-list

Re: Using for... for multiple lists

2005-03-06 Thread gene . tani
If sequences are not same length: zip truncates to length of shortest input sequence map(None, seq1, seq2) pads to length of longest seq. (can't remember what itertools.izip() does) -- http://mail.python.org/mailman/listinfo/python-list

Re: function with a state

2005-03-06 Thread gene . tani
I believe python docs are quite *un*-stilted. Modules and packages are not complicated. Read chapter 7 of the nutshell, it's only 10 pages long. 2.3 and 2.4 didn't introduce any fundamental changes in how modules work AFAIK -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system()

2005-03-07 Thread gene . tani
mod subprocess, if you're on 2.4: http://docs.python.org/whatsnew/node8.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Wishlist item: itertools.flatten

2005-03-12 Thread gene . tani
window / cons / fencepost / slice functions: +1 (with a flag to say if you want to truncate or pad incomplete tuples at end of input sequence. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303279 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303060 http://aspn.activestate.com/

Re: How can I load a module when I will only know the name 'on the fly'

2005-03-15 Thread gene . tani
imp.find_module() and imp.load_module: http://www.python.org/doc/2.3.4/whatsnew/section-pep302.html http://docs.python.org/lib/module-imp.html renwei wrote: > use built-in function: __import__ > > m = __import__('sys', globals()) > print m.platform > > weir > > > > "Tobiah" <[EMAIL PROTECTED]> >

Re: Convert python to exe

2005-03-15 Thread gene . tani
exemaker and bdist, too: http://effbot.org/downloads/index.cgi/exemaker-1.2-20041012.zip/README http://www.python.org/doc/2.2.3/dist/creating-wininst.html RM wrote: > Does cx_Freeze pack all dependencies? Would te resulting files(s) be > able to run on a Linux machine that does not have Python i

Re: html tags and python

2005-03-26 Thread gene . tani
get the mx package here: http://www.egenix.com/files/python/eGenix-mx-Extensions.html#Download-mxBASE = >>> import mx.DateTime >>> print mx.DateTime.DateTime(2004,2,31) # Feb. 31? Traceback (most recent call last): File "", line 1, in ? mx.DateTime.RangeE

Re: html tags and python

2005-03-26 Thread gene . tani
http://diveintopython.org/file_handling/index.html really good tutorial on exceptions. The whole book is well done, in fact, I recommend it. I also like Practical Python, and the Oreilly "Learning Python", but they're not online. For production purposes, you'd still do date-check on the client

Re: urllib.urlretireve problem

2005-03-29 Thread gene . tani
Mertz' "Text Processing in Python" book had a good discussion about trapping 403 and 404's. http://gnosis.cx/TPiP/ Larry Bates wrote: > I noticed you hadn't gotten a reply. When I execute this it put's the following > in the retrieved file: > > > > 404 Not Found > > Not Found > The requested

Re: urllib.urlretireve problem

2005-03-30 Thread gene . tani
.from urllib2 import urlopen . try: . urlopen(someURL) . except IOError, errobj: .if hasattr(errobj, 'reason'): print 'server doesnt exist, is down, DNS prob, or we don't have internet connect' .if hasattr(errobj, 'code'): print errobj.code -- http://mail.python.org/mailma

Re: Ternary Operator in Python

2005-04-01 Thread gene . tani
The good ol' DiveInto says: http://diveintopython.org/power_of_introspection/and_or.html#d0e9975 http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52310 Diez B. Roggisch wrote: > praba kar wrote: > > > Dear All, > > I am new to Python. I want to know how to > > work with ternary opera

Re: Python Equivalent to Java Interfaces?

2005-04-08 Thread gene . tani
There's 4 places to look: zope, twisted, PEAK and pyProtocols: this link describes pyprotocols pretty well http://peak.telecommunity.com/protocol_ref/module-protocols.html http://peak.telecommunity.com/PyProtocols.html -- http://mail.python.org/mailman/listinfo/python-list

Re: OOPS concept

2005-05-05 Thread gene . tani
Chapter 5, Python in Nutshell: concise explanations of everythin' you need to know about inheritance, instantiation, method resolution, namespaces, class/instance methods, getting under the hood with special methods, whatever. I couldn't code without it: http://www.oreilly.com/catalog/pythonian/

Re: A Faster Way...

2005-05-10 Thread gene . tani
hmm, there's lots of ways, huh? you can use itertools.zip instead of builtin zip, or do: map(None, list1, list2) , which will pad the shorter one to match the longer one. -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing text into dates?

2005-05-16 Thread gene . tani
The beautiful brand new cookbook2 has "Fuzzy parsing of Dates" using dateutil.parser, which you run once you have a decent guess at locale (page 127 of cookbook) John Roth wrote: > "Thomas W" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I'm developing a web-application where t

Re: easiest way to split a list into evenly divisble smaller lists, and assign them to variables?

2005-06-06 Thread gene tani
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303279 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347689 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303060 OR: collections.deque: http://python.org/doc/2.4/lib/deque-recipes.html flamesrock wrote: > hmmm..that m

Re: Question about Object Oriented + functions/global vars?

2005-06-06 Thread gene tani
#include canonical design pattern advice longjmp(Borders or other_big_chain_bookstore) opt1=fopen("Oreilly's Head first design pattern","r") opt2=fopen("design patterns book by Shalloway and trott (i think that's their names)","r") another=poll("any other intro to DP books that people like?")

Re: Pythonic Gotchas

2005-06-06 Thread gene tani
or Norvig's IAQ: http://www.norvig.com/python-iaq.html -- http://mail.python.org/mailman/listinfo/python-list

Re: split up a list by condition?

2005-06-06 Thread gene tani
Sounds like itertools.groupby() is what you're looking for, just sort your sequence on the grouping func that you will pass as 2nd arg to groupby(), before you pass the sequence to groupby() http://www.python.org/doc/2.4/whatsnew/node13.html http://www.python.org/dev/doc/devel/lib/itertools-functi

Re: A Moronicity of Guido van Rossum

2005-10-01 Thread gene tani
(posted c.l.python ONLY) Xah (may i call you Xah?) SOrry to say, but your older posts were much funnier: http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/15f7015d23a6758e/9ee26da60295d7c8?lnk=st&q=&rnum=5&hl=en#9ee26da60295d7c8 (also seems your anti-cult cult really hasn't gotten

Re: Python for search engine development

2005-10-02 Thread gene tani
http://groups.google.com/group/comp.lang.python/browse_thread/thread/6e6dc84e68e25039/1436d0b3466e262a?q=lucene&rnum=1#1436d0b3466e262a Mike Meyer wrote: > "corebump" <[EMAIL PROTECTED]> writes: > > > hi everybody, > > i planinng develop a search engine and i think using the python. Python > > per

Re: Finding the Process Path

2005-10-03 Thread gene tani
other ways to get at info: if sys.hexversion > 0x010502F0: sys.versioninfo, version, etc. platform.architecture, processor etc. distutils.sysconfig.get_makefile_filename( ) Benji York wrote: > Peck, Jon wrote: > > I have Python code running in an application, and I would like to find > > the

Re: Python based unacceptable language filter

2005-10-03 Thread gene tani
Good question, but Y'know, i don't think i'm the only one using a threaded mail reader. Pls don't hijack others' threads. David Pratt wrote: > Hi. Is anyone aware of any python based unacceptable language filter > code to scan and detect bad language in text from uploads etc. > > Many thanks. >

Re: Extending Python

2005-10-08 Thread gene tani
Yup, still there, issues 1 and 2 http://pyzine.com/Issue002/index.html Also recommend Dave Kuhlman's brief intro (open in your tabbed browser) http://www.rexx.com/~dkuhlman/python_201/python_201.html#SECTION00600 Alex Martelli wrote: > Micah Elliott <[EMAIL PROTECTED]> wrote: > >

Re: Perl's documentation come of age

2005-10-10 Thread gene tani
request for Google groups enhancement: Report Abuse button should have 4 choices: - Spam - Illegal Content - Xah - other ;-} Christos Georgiou wrote: > On Wed, 05 Oct 2005 21:36:47 -0600, rumours say that Mahesh Padmanabhan > <[EMAIL PROTECTED]> might have written: > > >In article <[EMAIL PROTECT

Re: Learning Python

2005-10-10 Thread gene tani
This should be good for a couple weeks http://www.awaretek.com/tutorials.html http://www.rexx.com/~dkuhlman/python_101/python_101.html http://www.rexx.com/~dkuhlman/python_201/python_201.html http://www.ibiblio.org/obp/py4fun/ http://the.taoofmac.com/space/Python/Grimoire http://mail.python.org/p

Re: where to get modules for python

2005-10-11 Thread gene tani
http://www.python.org/doc/faq/library.html#how-do-i-find-a-module-or-application-to-perform-task-x [EMAIL PROTECTED] wrote: > hi > i am new to python and was wondering where can i find modules for > python? > Something very much like what CPAN has for Perl. > I am searching for SSL/SSH modules for

Re: Looking for a Python mentor

2005-10-12 Thread gene tani
is this it:? http://mail.python.org/mailman/listinfo/tutor LenS wrote: > Hello > > Was wandering if there is any place where some one could go to get > mentoring on python coding. I have started coding in python but I am > the only one in the shop using it. So there is no one around to look > o

Re: Here I am again, same old arguments

2005-10-13 Thread gene tani
google "cheat sheet" or "quick reference" http://rgruet.free.fr/#QuickRef http://infohost.nmt.edu/tcc/help/pubs/python22/ http://www.onlamp.com/pub/a/python/excerpt/PythonPocketRef/index.html http://diveintopython.org/appendix/abstracts.html http://www.yukoncollege.yk.ca/~ttopper/COMP118/rCheatShe

Re: Python vs Ruby

2005-10-20 Thread gene tani
http://blog.ianbicking.org/ruby-python-power.html http://www.ruby-doc.org/RubyEyeForThePythonGuy.html http://onestepback.org/index.cgi/Tech/Ruby/PythonAndRuby.rdoc http://www.approximity.com/ruby/Comparison_rb_st_m_java.html http://www.jvoegele.com/software/langcomp.html http://reflectivesurface.co

Re: High Order Messages in Python

2005-10-23 Thread gene tani
http://www.artima.com/intv/closures.html http://www.rubyist.net/~matz/slides/oscon2005/index.html It's a read-write closure, a co-routine, sort of a continuation (tho Kernel.callcc is considered the real continuation mechanism). And you can make it a Proc object (basically an unbound object you ca

Re: Syntax across languages

2005-10-25 Thread gene tani
APL, i haven't thought about that in 15 years. I think it was (quad)CT for comparison tolerance, at least in IBM APL. Alex Martelli wrote: > Tom Anderson <[EMAIL PROTECTED]> wrote: >... > > What would approximate FP equality even mean? How approximate? > > In APL, it meant "to within [a certa

Re: the PHP ternary operator equivalent on Python

2005-11-18 Thread gene tani
Mike Meyer wrote: > "Daniel Crespo" <[EMAIL PROTECTED]> writes: > > > Hi! > > > > I would like to know how can I do the PHP ternary operator/statement > > (... ? ... : ...) in Python... > > > > I want to something like: > > > > a = {'Huge': (quantity>90) ? True : False} > > > > Any suggestions? >

Re: Precision for equality of two floats?

2005-11-29 Thread gene tani
Anton81 wrote: > Hi! > > When I do simple calculation with float values, they are rarely exactly > equal even if they should be. What is the threshold and how can I change > it? > > e.g. "if f1==f2:" will always mean "if abs(f1-f2)<1e-6:" > > Anton googled for "floating point" "comparison toleran

Re: xpath support in python 2.4

2005-11-29 Thread gene tani
And80 wrote: > Hi, > I would like to use xpath modules in python2.4 In my local machine > I am running python2.3.5 and on the server I run python2.4. I have seen > that while on my computer i am able to import xml.xpath, on the server > the module seems to not exist. Is it still part of the st

Re: Eclipse best/good or bad IDE for Python?

2005-12-02 Thread gene tani
[EMAIL PROTECTED] wrote: > I'm trying to move beyond Emacs/Vim/Kate > and was wondering if Eclipse is better and if it is the *best* > IDE for Python. > > Should I leave Emacs and do Python coding in Eclipse? > > Chris I'm agnostic; lots of IDE's/editors have buzz, you should learn to use at leas

Re: Eclipse best/good or bad IDE for Python?

2005-12-04 Thread gene tani
[EMAIL PROTECTED] wrote: > Though I tried most the above listed IDEs, sticking with a few for > awhile, I always find myself gravitating back to the one no one ever > mentions: IDLE. It's simple, fast, and with multiple monitors the lack > of tabs really isn't much of a problem. > > The biggest re

Re: HTML parsing/scraping & python

2005-12-04 Thread gene tani
John J. Lee wrote: > Sanjay Arora <[EMAIL PROTECTED]> writes: > > > We are looking to select the language & toolset more suitable for a > > project that requires getting data from several web-sites in real- > > timehtml parsing/scraping. It would require full emulation of the > > browser, incl

Re: Need help implementing an algorithm in python

2005-12-05 Thread gene tani
ech0 wrote: > I would appreciate any help I can get in finding a solution to the > following problem: > > == > > Below is a diagram: > http://www.muchographiks.com/algo.jpg > > THE PROBLEM > > Lets say we have 4 terms (purple represen

Re: Bitching about the documentation...

2005-12-05 Thread gene tani
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > > Gee, I wonder if I typed "sort" into the search box on the wiki it might > > turn up something useful? Well, what do you know? > > > > 2 results of about 4571 pages. (0.19 seconds) > > > > 1. HowTo/Sorting > > 2. SortingListsOf

Re: Bitching about the documentation...

2005-12-06 Thread gene tani
[EMAIL PROTECTED] wrote: > >> Are you telling us you learned C#, smalltalk, lisp, C, perl, > >> whatever, from 1 website only, without looking at any books, without > >> spending any money on IDEs or any software? Cause that's what you're > >> asking here. > > rurpy> For perl and

Re: extract python install info from registry

2005-12-06 Thread gene tani
> > There's more to it than that... isn't there? I've used _winreg and the > win32 extensions in the past when working with the registry. I thought > perhaps someone had already scripted something to extract this info. > Yes, a small firm named Microsoft has done this (but not tested w/2.4): htt

Re: How to get the extension of a filename from the path

2005-12-08 Thread gene tani
Lad wrote: > Hello, > what is a way to get the the extension of a filename from the path? > E.g., on my XP windows the path can be > C:\Pictures\MyDocs\test.txt > and I would like to get > the the extension of the filename, that is here > txt > > > I would like that to work on Linux also > Thank

Re: How to get the extension of a filename from the path

2005-12-08 Thread gene tani
Lad wrote: > Thank you ALL for help > Regards, > L. addendum: ASPN Python cookbook often has something relevant / modifiable for your needs: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81931 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52661 (in this case code from 2001 /

Re: Catching error text like that shown in console?

2005-12-09 Thread gene tani
Peter A. Schott wrote: > I know there's got to be an easy way to do this - I want a way to catch the > error text that would normally be shown in an interactive session and put that > value into a string I can use later. I've tried just using a catch statement > and trying to convert the output t

Re: OO in Python? ^^

2005-12-11 Thread gene tani
Matthias Kaeppler wrote: > That was quite insightful Martin, thanks. > > Regards, > Matthias (Disclaimer: i didn't read thru whole thread, but i didn't see these links trotted out either, which're germane: http://naeblis.cx/rtomayko/2004/12/15/the-static-method-thing http://dirtsimple.org/2004/1

Re: List text files showing LFs and expanded tabs (was: Colorize expanded tabs)

2005-12-12 Thread gene tani
qwweeeit wrote: > Hi all, > in a previous post I asked help for colorizing expanded tab. > I wanted to list text files showing in colors LFs and the expanded > tabs. > I hoped to use only bash but, being impossible, I reverted to Python. > I programmed a very short script . > Here it is (... and I

Re: Help: how to run python applications as NT service?

2005-12-12 Thread gene tani
zxo102 wrote: > Hi there, > I have a python application (many python scripts) and I start the > application like this > > python myServer.py start > > in window. It is running in dos window. Now I would like to put it in > background as NT service. I got a example code: SmallestService.py from

Re: PHP = Perl Improved

2005-12-12 Thread gene tani
Tim Roberts wrote: > "Xah Lee" <[EMAIL PROTECTED]> wrote: > > >recently i got a project that involves the use of php. In 2 days, i > >read almost the entirety of the php doc. Finding it a breeze because it > >is roughly based on Perl, of which i have mastery. > > > >i felt a sensation of neatness,

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-12 Thread gene tani
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, JohnBMudd > wrote: > > > Python could take over the programming world except one of it's best > > features (scope by indent) is a primary reason why it never will. It's > > not flexible enough. A large percentage of programmers won't even

Re: How To Read Excel Files In Python?

2005-12-13 Thread gene tani
Anand wrote: > Hello, > > Can I get some help on how to read the excel files using python? > > from win32com.client import Dispatch > xlApp = Dispatch("Excel.Application") > xlWb = xlApp.Workbooks.Open("Read.xls") > xlSht = xlWb.WorkSheets(1) > > But sadly, I am unable to proceed further about how

Re: how can i change the default python?

2005-12-13 Thread gene tani
Koray Bostanci wrote: > Hi all, > > When i type python in terminal it runs the python2.3 interpreter, but i > want to use 2.4 and Python2.4 package is already installed. > > How can i change the default python in my system? I searched google for > a little but couldn't find. > > Using Debian GNU/L

Re: Still Loving Python

2005-12-13 Thread gene tani
Lawrence Oluyede wrote: > Il 2005-12-13, Kamilche <[EMAIL PROTECTED]> ha scritto: > > Python still suffers from the lack of a good GUI, which I believe is > > slowing its acceptance by the programming community at large. (I know > > about tKinter, no need to post links to it, thanks.) > > Let me s

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread gene tani
[EMAIL PROTECTED] wrote: > I'm interested in knowing which Python web framework is most like Ruby > on Rails. > > I've heard of Subway and Django. > > > Are there other Rails clones in Python land I don't know about? > > Which one has largest community/buzz about it? > > > Chris Subway and Django

Re: Which Python web framework is most like Ruby on Rails?

2005-12-13 Thread gene tani
[EMAIL PROTECTED] wrote: > Gene > > Thanks for your kind email. I am a newbie web developer that just was > hoping > *any* framework was bubbling to surface to standout amongst all the > rest. > I don't know /why/ Rails is getting buzz. I've just heard some good > things > about it but don't wan

Re: query to find name of the OS, ip addr, mac addr etc

2005-12-13 Thread gene tani
[EMAIL PROTECTED] wrote: > Hi all, > > 1) Am working on windows XP, and is there any way i can get the whole > name as "windows Xp" using python script? > >i have tried with > "os.sys.platform" but it just gives me as "win32", but can > i get the whole OS name as "windows Xp". >

Re: Which Python web framework is most like Ruby on Rails?

2005-12-14 Thread gene tani
DH wrote: > Alex Martelli wrote: > Because of course if other languages have 1 or two frameworks, python > needs a dozen. ["there are still fewer %s than py keywords"%x for x in ["IDEs","web app frameworks","GUI frameworks"]] and 37000 google hits for "Snakes and Rubies"?! -- http://mail.pyth

Re: definition of 'polymorphism' and python

2005-12-14 Thread gene tani
Grant Edwards wrote: > On 2005-12-14, Gabriel Zachmann <[EMAIL PROTECTED]> wrote: > > > I understand the Wikipedia article on Polymorphism ( > > http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 > > ) that it doesn't make sense to talk about polymorphism in a > > fully dynamically t

Re: writing a Mail Server

2005-12-14 Thread gene tani
[EMAIL PROTECTED] wrote: > Hello, > I have to implement a mail server type program for a project using > python. I have already implemented smtp and pop3 protocol to send and > retrieve mail at the client side. I used an existing mail server > account to test the code. Now, I need to write the fun

Re: ?: in Python

2005-12-14 Thread gene tani
Andy Leszczynski wrote: > How can do elegantly in Python: > > if condition: > a=1 > else: > a=2 > > like in C: > > a=condition?1:2 google for ternary operator http://www.python.org/doc/faq/programming.html#is-there-an-equivalent-of-c-s-ternary-operator http://www.norvig.com/python-iaq.ht

Re: Recommend an E-book Meeting the Following Criteria (Newbie, Long)

2005-12-14 Thread gene tani
Veli-Pekka Tätilä wrote: > 5. Before I let you go I should mention one important factor in choosing the > book. I know this narrows down the scope loads, but if at all possible the > book should be readily available in electronic form. My favorite formats > are: CHM, TXT, HTML, accessible PDF and

Re: disassemble, was(How do (not) I distribute my Python progz?)

2005-12-14 Thread gene tani
Paul Boddie wrote: > Juergen Kareta wrote: > > look at: > > http://www.crazy-compilers.com/decompyle/ > > > > it's only a online service. But if it works, it would be nice to have > > such a tool as standalone programm. > > And the next search result for decompyle on Google is... > > http://packag

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread gene tani
Ben Sizer wrote: > Mike Meyer wrote: > > [Not sure if this attribution is correct.] > > > Alex Martelli wrote: > > > Because of course if other languages have 1 or two frameworks, python > > > needs a dozen. > > woops, that attribution is absolutely *wrong*, DH said that, sorry Alex -- http://m

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread gene tani
Ben Sizer wrote: > Mike Meyer wrote: > > [Not sure if this attribution is correct.] > > > Alex Martelli wrote: > > > Because of course if other languages have 1 or two frameworks, python > > > needs a dozen. > > > > People keep talking about Python's wealth of web frameworks as if it > > were a ba

Re: Python packages on OS X vs Windows

2005-12-15 Thread gene tani
Kenneth McDonald wrote: > At the moment I'm doing most of my stuff on a Mac, but I've been > considering also getting > a Windows laptop. One of the reasons is that I've found it very > difficult to get certain > Python related things running on the Mac; for example, if one wants > to use the most

Re: Which Python web framework is most like Ruby on Rails?

2005-12-15 Thread gene tani
Robert Kern wrote: > > http://pyre.third-bit.com/pyweb/index.html > http://colorstudy.com/docs/shootout.html > i started flipping thru "Snakes and rubies" google hits now at 127k, waaay up from yesterday's 37k. The 2nd hit is Adrian Holovaty's which has a good link to Zrusilla's summary. Adria

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread gene tani
Alia Khouri wrote: > In http://subway.python-hosting.com/ticket/216 Peter Mere writes: > > > "Conquest is a method of union. ... > unstoppable juggernaut of > chaos will continue in python web app land, > and ruby will become ascendant. This is more than a critical issue - > don't dismiss it with

Re: Wed Development - Dynamically Generated News Index

2005-12-18 Thread gene tani
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I am building a simple MySQL news database, which would contain, a > > headline, a date, main story(body) and a graphic associated with each > > story. I would like to generate an index of the pages in this database > > ( ie a news index with lin

Re: urllib.urlopen

2005-12-18 Thread gene tani
Jay wrote: > Easy Fix... > > import urllib > the_url = "http://www.google.com"; > req = urllib.urlopen(the_url) > > Does this work for you?? This does look like proxie /firewall issue, try it from an internet cafe. Also depending on the site, you may have to set User-Agnet and/or referer headers

Re: Wingide is a beautiful application

2005-12-18 Thread gene tani
Claudio Grondi wrote: > Apparently Vim syntax highlighting analyses only the code it has already > 'seen' within the editing window. This is not what I expect from a > mature editor. > I have stopped here, because I found this problem after three seconds of > using it, so imagine how much other pr

Re: valide html - Encoding/Decoding

2005-12-19 Thread gene tani
rabby wrote: > hello world! > how to get the string "/ + ( ) + \ + [ ] + : + äöü" converted into > valide html. > "...".decode("html") does not run :( > thank you for help the a-umlaut <=> ä and other translations are in htmlentitydefs, like Dennis said. cgi.escape will give you < & "e; etc, xml

Re: Do you recommend a good artificial intelligence book?

2005-12-20 Thread gene tani
buriy wrote: > try "Artificial Intelligence: A Modern Approach" > (look at http://aima.cs.berkeley.edu/ ) Jurafsky and Martin for NLP -- http://mail.python.org/mailman/listinfo/python-list

Re: parsing engineering symbols

2005-12-20 Thread gene tani
Suresh Jeevanandam wrote: > Hi, > I want to convert a string to float value. The string contains > engineering symbols. > For example, > > s = '12k' > > I want some function which would return 12000 > function(s) > => 12000.0 > I searched t

Re: Existing FTP server code?

2005-12-20 Thread gene tani
Mateusz Soltysek wrote: > [EMAIL PROTECTED] wrote: > > Hi, I'm writing a program that needs to upload files to a server > > (probably using FTP), that also needs to be secured and be able to > > setup username/password programmatically. > > > > I wonder if there are already well written base code

Re: How convert text file between locale encoding and UTF-8?

2005-12-20 Thread gene tani
[EMAIL PROTECTED] wrote: > Dear Friends: > > Wondering that is there neat way to do "subject line" in Python? I am > talking about Python 2.4 with Win32 extension installed. The locale can > be any of ANSI defined, for example, zh_CN (CP936) or Korea (CP949) > . > > I am not expert in Pyth

Eckel, ruby, python

2005-12-20 Thread gene tani
pretty sane article, i didn't see it linked/cited here http://www.artima.com/weblogs/viewpost.jsp?thread=141312 -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting with expensive compares?

2005-12-23 Thread gene tani
Dan Stromberg wrote: > Hi folks. > > Python appears to have a good sort method, but when sorting array elements > that are very large, and hence have very expensive compares, is there some > sort of already-available sort function that will merge like elements into > a chain, so that they won't ha

Re: problem adding list values

2005-12-23 Thread gene tani
David M. Synck wrote: > > """ This function asks the user to input any credits not shown on their > bank statement > (OT I know, but just so you know, you *may* get away with using floats for financial calculations if you're handling small numbers of floats of roughly same order of magnitu

Re: sorting with expensive compares?

2005-12-23 Thread gene tani
[EMAIL PROTECTED] wrote: > Dan Stromberg wrote: > > Hi folks. > > > > Python appears to have a good sort method, but when sorting array elements > > that are very large, and hence have very expensive compares, is there some > > sort of already-available sort function that will merge like elements

Re: How to calculate the CPU time consumption and memory consuption of any python program in Linux

2005-12-24 Thread gene tani
MrJean1 wrote: > For CPU time usage, see the standard time module > > > > specifically the time.clock() function. For memory usage see > > > > > /Jean Brouwers there was a good long

Re: Indentation/whitespace

2005-12-24 Thread gene tani
Lee Harr wrote: > On 2005-12-23, Gary Herron <[EMAIL PROTECTED]> wrote: > > You've got the visible/invisible aspect of things > > *exactly* backwards. > > The point on a line of text where things change > > from white space to > > non-white space is *highly* visible. The several > > pixels that re

Re: How to calculate the CPU time consumption and memory consuption of any python program in Linux

2005-12-24 Thread gene tani
Shahriar Shamil Uulu wrote: > Thank you, for your directions and advices. > shahriar ... also look: http://spyced.blogspot.com/2005/09/how-well-do-you-know-python-part-9.html whihc mentions twisted.python.reflect.findInstances(sys.modules, str) and objgrep, which i didn't know about -- http:/

Re: Linux > python > file-I/O ?

2005-12-24 Thread gene tani
[EMAIL PROTECTED] wrote: > I've just started to test/learn python. > I've got Linux > mandrake9 > python & documentation. > What I'll initially want to be doing needs file I/O, so I > wanted to confirm file I/O early in my tests. > > Following the examples : > >>> f=open('/tmp/workfile', 'w') > >

Re: need help with python syntax

2005-12-24 Thread gene tani
[EMAIL PROTECTED] wrote: > if i have a piece of html that looks like this > > > cnn.com > > and i want to scrape out cnn.com , what syntax would i use? i have > tried this and it doesn't work > > for incident in bs('td', {'class' : 'rulesbody'}, {'class' : > 'rulesbody'} ): Did you try Beautifu

Re: need help with python syntax

2005-12-24 Thread gene tani
gene tani wrote: > [EMAIL PROTECTED] wrote: > > if i have a piece of html that looks like this > > > > > > cnn.com > > > > and i want to scrape out cnn.com , what syntax would i use? i have > > tried this and it doesn't work > > >

Re: tutorials on xslt

2005-12-29 Thread gene tani
Iyer, Prasad C wrote: > Hi, > Is there any tutorial available for python-xslt processing. Yes, but instead of giving you a fish: use google groups "Searth this group" button, sort the numerous results by date, you'll get what you need -- http://mail.python.org/mailman/listinfo/python-list

Re: Any wing2.0 users here?

2006-01-02 Thread gene tani
Alvin A. Delagon wrote: > emacs has been my long time companion for php, perl, and python. My boss > recommended to me Wing2.0, I find it hard to adjust though. What can you > say about this IDE? He say's if I think it could improve my productivity > he's willing to buy it for me. Suggestions for

Re: itertools.izip brokeness

2006-01-03 Thread gene tani
[EMAIL PROTECTED] wrote: > <[EMAIL PROTECTED]> wrote: > > pissed-offedly-yr's, rurpy > > Well, i'm sorry your pissed off. I will say i believe that map(None,*sequences) mentioned above is a pretty commonly seen thing, as is padding shorter sequence for zip/izip. Also have you looked at diff

Re: What platforms have Python Virtual Machines and what version(s) ofPython do they support?

2005-06-19 Thread gene tani
http://dmoz.org/Computers/Programming/Languages/Python/Ports/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Help implementing an idea

2005-06-19 Thread gene tani
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299271 or the nice recipe, page 403 of cookbook2, that i can't find in ASPN -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-19 Thread gene tani
If your test variable has specific values to branch on, the standard way is to have those values be keys in a dictionary, and do: branched_func_obj = dict_of_values.get(testvar) And the lambda hack is here, courtesy of Peter Norvig http://www.norvig.com/python-iaq.html -- http://mail.python.or

Re: Create our own python source repository

2005-06-21 Thread gene tani
Practical Python is quite a good book. And to re-iterate again, teh humongous tutorial list which has Hetland's Instant python among others: http://www.awaretek.com/tutorials.html Brian van den Broek wrote: > Michele Simionato said unto the world upon 21/06/2005 07:58: > > qwwee: > > > >>for a c

Re: tree functions daily exercise: Table

2005-06-21 Thread gene tani
Dear Mr. Jones: Our team of 3,972 expert testers judged the output of your troll-spewing neural net virtually indistinguishable from the original. Given this, I am please to announce that our firm is willing to discuss arrangements for an exclusive license that you would likely find financially c

Re:

2005-06-22 Thread gene tani
i think this came up yesterday\ http://www.python.org/cgi-bin/moinmoin/IntegratedDevelopmentEnvironments -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >