Re: graphical or flow charting design aid for python class development?

2005-09-01 Thread gene tani
There's also this about giving source/class browsers a hand by sprinkling "isinstance()"'s in http://wingware.com/doc/intro/tutorial-sassist-with-classes I always encourage people to write up their experience/improessions in the python wiki: http://wiki.python.org/moin/PythonEditors (or the sepa

Re: Record separator for readlines()

2005-09-02 Thread gene tani
universal newlines? http://www.python.org/doc/2.3.3/whatsnew/node7.html Angelic Devil wrote: > I know this has been asked before (I already consulted the Google > Groups archive), but I have not seen a definative answer. Is there a > way to change the record separator in readlines()? The documen

Re: Django Vs Rails

2005-09-05 Thread gene tani
http://griddlenoise.blogspot.com/2005/07/python-off-rails.html http://www.boddie.org.uk/python/web_frameworks.html flamesrock wrote: > Firstly, this topic is NOT intended for trolling or starting any flame > wars. > -- http://mail.python.org/mailman/listinfo/python-list

Re: Django Vs Rails

2005-09-06 Thread gene tani
Here's another, (i'm just flipping thru del.icio.us and furl tags, not endorsing any viewpoints. I've never looked at Django or Subway, but I do need to look at zope 3, i think): http://www.magpiebrain.com/archives/2005/08/14/rails_and_django Diez B. Roggisch wrote: > gene ta

Re: Django Vs Rails

2005-09-06 Thread gene tani
just to make it really easy, there's some really good blogs and detailed analyses of the frameworks, competition is good: http://del.icio.us/tag/rails+django gene tani wrote: > Here's another, (i'm just flipping thru del.icio.us and furl tags, not -- http://mail.python.or

Re: python object model diagram

2005-09-09 Thread gene tani
I think he's looking for tidy pictures of how metaclasses and descriptors interact with your classes and instances at compile- & runtime, something like that (which I haven't seen) There's pictures of the class hierarchy for C and j-python: http://www.brpreiss.com/books/opus7/html/page114.html ht

Re: "grep" database

2005-09-09 Thread gene tani
maybe look Gonzui, LXR, some of the other tools listed here http://www.gnu.org/software/global/links.html Hilbert wrote: > Hello, > > I've heard of a software on linux that creates a recursive database of > text files and then provides an interface for grep-like queries. I'd > like to use it to

Re: Python Search Engine app

2005-09-14 Thread gene tani
Yes, there's a bunch. Google for "query parser" + python, "porter stemming" "stopwords" "text indexer". Maybe lucene has some python bindings, hmm? Harlin Seritt wrote: > Hi, > > Is anyone aware of an available open-source/free search engine app > (something similar to HTDig) written in Python t

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: 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: 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: 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: - Requesting Comments for Process Definition and Presentation

2006-01-07 Thread Gene Tani
Xavier Morel wrote: > Ilias Lazaridis wrote: > > b) to retrieve feedback subjecting the Process Definition itself > > (content of diagramms, clarity, terminology etc.) > > > This is a lie, and you know it. I've said it before, i'll say it again; medical insurance premiums should be lower for peop

Re: How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread gene tani
[EMAIL PROTECTED] wrote: > How make a Python script > > 1. login > 2. type password & > 3. download file > > all from a **remote web site**? > > I'm not comfortable with *MY* software handling the password part. > > It just seems like trouble if users must tell *my* software their > password. > >

Re: How login & download file from remote web site? Passwords a problem?

2006-01-09 Thread gene tani
[EMAIL PROTECTED] wrote: > How make a Python script > > 1. login > 2. type password & > 3. download file > > all from a **remote web site**? > > I'm not comfortable with *MY* software handling the password part. > > It just seems like trouble if users must tell *my* software their > password. > >

Re: What is the slickest way to transpose a square list of lists (tuple of tuples)?

2006-01-09 Thread gene tani
Gerard Brunick wrote: > My way is ugly. These has to be a better way. > > Thanks, > Gerard transpose funcitons/methods: http://numeric.scipy.org/ http://numpy.sourceforge.net/numdoc/numdoc.pdf -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is there no post-pre increment operator in python

2006-01-13 Thread gene tani
[EMAIL PROTECTED] wrote: > Anyone has any idea on why is there no post/pre increment operators in > python ? > Although the statement: > ++j > works but does nothing "+=1" and "-=1" inflate your KLOC by .001, but they always work as expected with integers, it's when you do augmented assignments

Re: Limiting the size of List and making it Homogeneous

2006-01-13 Thread gene tani
gene tani wrote: > ankit wrote: > > Is it possible to limit the size of list in python. > > I want to make list of 5 elements. How can I achieve this thing in > > python. And one more thing can we declare list to store elements of > > same type as in c, C++ we can dec

Re: Newcomer question wrt variable scope/namespaces

2006-01-13 Thread gene tani
Florian Daniel Otel wrote: > Hello all, > > > Attached are 3 small python scripts that illustrate my "problem". The > first one uses string tuples and behaves as expected. The other two > use dictionaries and (resp.) lists and illustrate my "problem" > > TIA for any pointers, > > Florian > > P.S.

Re: Limiting the size of List and making it Homogeneous

2006-01-13 Thread gene tani
ankit wrote: > Is it possible to limit the size of list in python. > I want to make list of 5 elements. How can I achieve this thing in > python. And one more thing can we declare list to store elements of > same type as in c, C++ we can declare an > array which can have 5 elements of type int. >

Re: Spanish Translation of any python Book?

2006-01-13 Thread gene tani
Olaf "El Blanco" wrote: > Maybe there is someone that speak spanish. I need the best spanish book for > learning python. > you should learn Chinese, Korean and Russian so you can read this many times http://diveintopython.org/#languages -- http://mail.python.org/mailman/listinfo/python-list

Why is there no post-pre increment operator in python

2006-01-13 Thread gene tani
Roy Smith wrote: > In article <[EMAIL PROTECTED]>, > "gene tani" <[EMAIL PROTECTED]> wrote: > > > http://zephyrfalcon.org/labs/python_pitfalls.html > > Thanks for posting that URL; I hadn't seen the list before. Skimming over > it, none

Re: Hijacking threads

2006-01-13 Thread gene tani
Peter Hansen wrote: > gene tani wrote: > > Roy Smith wrote: > >>Thanks for posting that URL; I hadn't seen the list before. > [...] > > > > pls don't hijack threads > > Um, he didn't "hijack" it, he follow a tangent to the disc

Re: Spanish Translation of any python Book?

2006-01-14 Thread gene tani
Luis M. González wrote: > Lamentablemente, no conozco ningún tutorial o libro en castellano... http://www.python.org/doc/NonEnglish.html#spanish -- http://mail.python.org/mailman/listinfo/python-list

Re: search multiple dictionaries efficiently?

2006-01-17 Thread gene tani
Livin wrote: > I'm a noobie so please be easy on me. I have searched a ton and did not find > anything I could understand. > > I'm using py2.3 > > I've been using Try/Except but this gets long with multiple dictionaries. > > I found some code on web pages and such but cannot get them to work. Any

Re: web crawling.

2006-01-19 Thread gene tani
S Borg wrote: > Hello, > > I have been writing very simple Python programs that parse HTML and > such, mainly just to get > a better feel for the language. Here is my question: If I parsed an > HTML page into all of the image > files listed on that page, how could I request all of those images an

Re: Restricted Access

2006-07-11 Thread gene tani
Georg Brandl wrote: > Cameron Laird wrote: > > In article <[EMAIL PROTECTED]>, > > iapain <[EMAIL PROTECTED]> wrote: > > . > > . > > . > >>Does that mean there is no way to implement restricted enviorment? > > . > >

Re: metaclass : parse all class once before doing anything else ?

2006-07-30 Thread gene tani
Paddy wrote: > Laurent Rahuel wrote: > > > > Laurent. > > I, like Diez am unsure of why you would need what you have asked for, > but maybe this will help. > > You can keep track of all instances of a class by this kind of thing: > > >>> class C1(object): > ... inst = [] > ... def __init__(se

Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread gene tani
[EMAIL PROTECTED] wrote: > Hi all. I've been try to learn ruby for a few months but I'm about > ready to give up. The available books either assume a programming > background, or are out of date. Anyway, http://www.awaretek.com/book.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Design Patterns in Python

2006-08-04 Thread gene tani
Gabriel Genellina wrote: > Hello > > Most authors talk about Java/C++, and describe patterns used as a > workaround to their static class model; the dynamic nature of Python > allows for trivial implementations in some cases. > I've seen some design patterns examples on the ActiveState site, and >

Re: Design Patterns in Python

2006-08-04 Thread gene tani
Gabriel Genellina wrote: > Hello > > Most authors talk about Java/C++, and describe patterns used as a > workaround to their static class model; the dynamic nature of Python > allows for trivial implementations in some cases. Eckel's thinking in Python too http://www.mindview.net/Books/TIPython

Re: technique to enter text using a mobile phone keypad (T9 dictionary-based disambiguation)

2006-08-08 Thread gene tani
Petr Jakeš wrote: > I have a standard 12-key mobile phone keypad connected to my Linux > machine as a I2C peripheral. I would like to write a code which allows > the text entry to the computer using this keypad (something like T9 on > the mobile phones) > > According to the http://www.yorku.ca/mac

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread gene tani
Chris Lambacher wrote: > On Wed, Aug 09, 2006 at 11:51:19AM -0400, Brendon Towle wrote: > I don't disagree with you. The problem is that the obvious way to do it > (eval) is a big security hole. In this case you are trusting that no one > inserts themselves between you and the website providing

Re: Python Syntax Highlighting Module

2006-08-21 Thread gene tani
[EMAIL PROTECTED] wrote: > Hello, > I have an idea for a project which involves an editor that supports > syntax highlighting. This would be for any language, particularly php, > html, css, etc. I would like to write this program using python. It > would only make sense to base this upon existi

Re: summarize text

2006-05-29 Thread gene tani
robin wrote: > hello list, > > does anyone know of a library which permits to summarise text? i've > been looking at nltk but haven't found anything yet. any help would be unclear what you're asking, maybe look at: http://www.cs.waikato.ac.nz/~ml/weka/index.html http://www.kdnuggets.com/software

Re: Are there something like "Effective Python"?

2006-06-02 Thread gene tani
Mike Meng wrote: > Hi all, > I just finished reading Learning Python 3rd ed, and am doing my > first Python application, which retrieves and process text and XML > documents from Web. Python helped me to write the application in a few > hours, I'm very happy with its productivity. But the p

Re: ANN: PQRC - Python Quick Reference Card - v 0.55

2006-06-04 Thread gene tani
Laurent Pointal wrote: > [for those who dont read clp.announce] > > The Python Quick Reference Card (PQRC) aims to provide a printable quick > reference documentation for the Python language and some of its main > standard libraries (currently for Python 2.4). > > PQRC tries to group informations

Re: Max function question: How do I return the index of the maximum value of a list?

2006-06-04 Thread gene tani
jj_frap wrote: > I'm new to programming in Python and am currently writing a three-card > poker simulator. I have completed the entire simulator other than > determining who has the best hand (which will be far more difficult > than the aspects I've codes thus far)...I store each player's hand in

Re: Python to C converter

2006-06-05 Thread gene tani
Rene Pijlman wrote: > [EMAIL PROTECTED]: > >I have an application return in python. I want this to be > >converted to C. > > http://www.python.org/doc/faq/general/#can-python-be-compiled-to-machine-code-c-or-some-other-language > http://pyfaq.infogami.com/can-python-be-compiled-to-machine-code-c-

Re: Writing to a certain line?

2006-06-06 Thread gene tani
bruno at modulix wrote: > > Else - if you want/need to stick to human readable flat text files - at > least write a solid librairy handling this, so you can keep client code > free of technical cruft. > > HTH > -- > bruno desthuilliers for human readable, you might want to look at reading and wri

Re: newbie: python application on a web page

2006-06-07 Thread gene tani
puzz wrote: > Hi all, > I'd also appreciate a link to a beginner forum > http://www.daniweb.com/techtalkforums/forum114.html and (not really a beginner forum, not really high volume, either) http://community.livejournal.com/python_dev/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Extended zip() for lists

2006-06-08 Thread gene tani
Florian Reiser wrote: > Hello, > > I have 4 lists: a, b, c and d > Out of this 4 lists I want to build a table (e.g. list of lists): > > a|b|c|d > --- > a1|b1|c1|d1 > a1|b2||d2 > > You see: the lists are not equally sized. > Is there a command which fills up the shorter

Re: learning python idioms

2006-06-11 Thread gene tani
[EMAIL PROTECTED] wrote: > After several years developing in Java, I've begun to switch to Python > for several of my new projects as I have found the language quite > interesting. I've read several tutorials and implemented a few sample > programs and I've found that Python enables one to progra

Re: learning python idioms

2006-06-11 Thread gene tani
bayerj wrote: > Hi, > > If you switched from java to python the best point to start is > http://dirtsimple.org/2004/12/python-is-not-java.html. > > Greets, > -Justin yup, you could spend weeks reading the Language Wars: http://www.google.com/search?hl=en&q=site%3Aartima.com+java+python&btnG=Goog

Re: Looking for examples related to advanced python string, list and map operations

2006-06-15 Thread gene tani
A.M wrote: > Hi, > > > > Is there any online resource that gives examples about advanced python > string, list and map operations? > http://goog-goopy.sourceforge.net/goopy.functional.html#-variance http://oakwinter.com/code/functional/documentation.html -- http://mail.python.org/mailman/listin

Re: any subway experiences

2006-06-17 Thread gene tani
a wrote: > thanks for reading Yah, the mass transit systems are, um, challenging but workable in many US cities. Canada's much better BUT the Subway framework that's not developed anymore had a dev mailing list: http://groups.google.com/group/subway-devel Google for "subway web framework". An

<    1   2   3   >