Re: Parrot Project for Python

2005-11-04 Thread Swaroop C H
See http://pirate.tangentcode.com/ - Swaroop -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set program name in Python? ($0 in Perl)

2005-11-10 Thread Swaroop C H
Thanks Fredrik for the info. It was not a must-have, I was just curious if it was possible. Thanks, Swaroop www.SwaroopCH.info -- http://mail.python.org/mailman/listinfo/python-list

Re: How to access database?

2005-01-04 Thread Swaroop C H
/writing/DB-API.html HTH, -- Swaroop C H Blog: http://www.swaroopch.info/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to input one char at a time from stdin?

2005-01-25 Thread Swaroop C H
character. How do I deal with this? This is exactly what you need: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/134892 Title: "getch()-like unbuffered character reading from stdin on both Windows and Unix" This recipe was a lifesaver for me once :-) Regards, -- Swaroop C H B

Re: MySQLdb

2005-01-25 Thread Swaroop C H
L[1] [1]: http://dev.mysql.com/doc/mysql/en/load-data.html -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb

2005-01-25 Thread Swaroop C H
en a duplicate key value is found, and the rest of the text file is ignored. With LOCAL, the default behavior is the same as if IGNORE is specified; this is because the server has no way to stop transmission of the file in the middle of the operation. " P.S. Its best to take this discussion off

Re: Hello

2005-01-27 Thread Swaroop C H
your ISP's news server, *then* you can subscribe > to comp.lang.python. If you can't find a Usenet server, try news.gmane.org -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute a list

2005-02-22 Thread Swaroop C H
Groleo Marius wrote: How can i execute a string in python? How can I execute the code that "s" keeps inside, considering that the code is correct? Use the exec statement : `exec s` Details at http://www.python.org/doc/ref/exec.html Regards, -- Swaroop C H Blog: http://www.swaroopch.info

Re: Hey, How Do I Distribute my New Completed Python Project?

2005-02-28 Thread Swaroop C H
with very little overhead for build/release/install mechanics." Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

RE: urllib (and urllib2) read all data from page on open()?

2005-03-14 Thread Swaroop C H
>>> data2 = r2.read() >>> conn.close() As far as I can understand, you can read() data only when you want to. Caveat: There's a warning that says "This module defines classes which implement the client side of the HTTP and HTTPS protocols. It is normal

Re: yum repository

2005-03-14 Thread Swaroop C H
--- "Donald L. Dietmeyer" <[EMAIL PROTECTED]> wrote: > What yum repository do you use to pick up > python rpms? Search for 'Yum' at: http://www.python.org/2.4/rpms.html Cheers, Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info --

Re: Python info

2005-03-14 Thread Swaroop C H
However, I don't know how up-to-date the information is. HTH, Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: variable arguments question

2005-03-14 Thread Swaroop C H
'->', value ... >>> foo(a=1,b=2) a -> 1 b -> 2 Hope this makes some sense, Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: python version anachronism

2005-03-15 Thread Swaroop C H
--- Xah Lee <[EMAIL PROTECTED]> wrote: > so, python 2.3.5 is released about 2 months later than 2.4?? As far as I understand, 2.3.5 is a maintenance release in the 2.3 branch. It is independent of the 2.4 branch. Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpy

Re: Database connection caching

2005-03-18 Thread Swaroop C H
objects with a single connection object? You can have any number of cursor objects and can run with a single connection object A good introduction is at http://www.amk.ca/python/writing/DB-API.html Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -

Re: Is Python like VB?

2005-03-18 Thread Swaroop C H
n even convert existing VB > apps as well. It won a Jolt Productivity award this year (along with > Python 2.4). I have heard Gambas to be a very good option too: http://gambas.sourceforge.net/ -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax incorrect with regex

2005-03-18 Thread Swaroop C H
os_parser = re.compile (r""" (\s+)=\"(\s+)\"$ """,re.VERBOS) > ^ > SyntaxError: invalid syntax Please check the indentation you have used. Also, it should be re.VERBOSE (note the ending 'e') Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple XML-to-Python conversion

2005-03-18 Thread Swaroop C H
input.filename > root.output.filename You should be using XPath (4suite has it) to get the parts that you want. A really quick intro is at http://simon.incutio.com/archive/2003/10/21/xpathRocks Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: survey of modules to be added to stdlib

2005-03-18 Thread Swaroop C H
nd to work on the same kind of project along with ChiPy (Chicago Pythonistas) and of course, the distutils-sig and catalog-sig. For details, please see http://www.swaroopch.info/archives/2005/03/13/uraga-the-cpan-for-python/ We welcome you to help us in this endeavour. Regards, -- Swaroop C H B

Re: wxPython vs. pyQt

2005-03-18 Thread Swaroop C H
ded! The announcement is at http://www.trolltech.com/newsroom/announcements/0192.html I hope the PyQt guys are on top of this ;) Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous copy to multiple media

2005-03-20 Thread Swaroop C H
en't tried it out but it should work. [1]: http://unixhelp.ed.ac.uk/CGI/man-cgi?tee HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pass parameter when importing a module?

2005-03-20 Thread Swaroop C H
lib == 'optimized' > from myModule_op import * Suggestion: Maybe you use builtin `__import__` to load a module ? Note that in this way, you'll have to use the module name prefix. -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: Submission for Python Limmerick Contest

2005-03-22 Thread Swaroop C H
On 22 Mar 2005 11:44:03 -0500, Roy Smith wrote: > A tuple, a dict, and a list, > And whitespace which mus'n't be missed. > Imported together, > And stirred with a feather, > Yields a language whose name must be hissed! Nice! +1 -- Swaroop C H Blog: http://www.

Re: FW: Python help group

2005-03-22 Thread Swaroop C H
nt in students] ['Jill', 'John'] >>> See `help(list.sort)` for details. -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: how to apply "mvc" pattern to gui-design in python

2005-03-28 Thread Swaroop C H
p://pygtkmvc.sourceforge.net/index.php/Main/Features -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: html tags and python

2005-03-28 Thread Swaroop C H
ster.com/JavaScript/Scripts_and_Programs/Calendars/ IMHO, using Javascript is a better idea for this particular purpose instead of writing a lot of checking in Python. -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: passing input to running loop

2005-03-28 Thread Swaroop C H
project I would > try to make a IRCbot. I am not sure if you want to write the program completely from scratch. If not, you could perhaps use the Twisted IRC module to do most of your work :) http://twistedmatrix.com/documents/current/api/twisted.protocols.irc.html Regards, -- Swaroop C H Blo

Re: convert user input to Decimal objects using eval()?

2005-03-28 Thread Swaroop C H
y? Also, why not simply use Decimal('1.000') + Decimal('0.111') ? -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: why and when we should do it?

2005-03-29 Thread Swaroop C H
sed as a placeholder so that you can add code later. > why and when we should inherit Object? You can inherit from Object if you want to have a 'new-style class'. See http://www.python.org/doc/newstyle.html -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofp

Re: Unzipping Files

2005-04-01 Thread Swaroop C H
On Apr 1, 2005 8:14 PM, Greg Lindstrom <[EMAIL PROTECTED]> wrote: > How do I read the data from a file in a zip archive? http://www.devshed.com/c/a/Python/Python-UnZipped Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.p

Re: pagecrawling websites with Python

2005-04-02 Thread Swaroop C H
x27;t have an answer to your particular question, but maybe you can have a look at how the HarvestMan works: http://freshmeat.net/projects/harvestman Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: re module non-greedy matches broken

2005-04-04 Thread Swaroop C H
On Apr 4, 2005 10:06 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > > what book or books on regexes > A standard is Mastering Regular Expressions, 2nd ed, by xxx (sorry, forget) Mastering Regular Expressions, by Jeffrey Friedl See http://www.regex.info/ Regards, -- Swaroop

Re: Calling a Perl Module from Python

2005-04-06 Thread Swaroop C H
7;t). You've just discovered the only limitation of Python (in my view) - it doesn't have a module repository to rival CPAN. AFAIK, there isn't any reliable way to call Perl modules from Python. -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & SQLite

2005-05-03 Thread Swaroop C H
org/tracker/pysqlite For Linux/BSD, use your favorite package management software (yum in Fedora, urpmi in Mandrake, emerge in Gentoo, apt-get in Debian, pkg_add in FreeBSD), etc. For Mac, use Fink. HTH :-) -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- ht

Re: python+windows/linux -> write stdout text to always on top text?

2005-05-03 Thread Swaroop C H
er > what program is on top. Why would you want to do that ? -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: python+windows/linux -> write stdout text to always on top text?

2005-05-03 Thread Swaroop C H
e engines achieve the same. HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: file parsing/watching + qt

2005-05-04 Thread Swaroop C H
.3 on linux with PyQt3. Use the Python binding to FAM (File Alteration Monitor): http://python-fam.sourceforge.net/ HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Pipes of binaries - IPC::Run

2005-05-10 Thread Swaroop C H
Is there a Python equivalent of Perl's IPC::Run module [ http://search.cpan.org/dist/IPC-Run/lib/IPC/Run.pm ] ? Thanks! -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info -- http://mail.python.org/mailman/listinfo/python-list

Re: Read tab delimited ascii file

2005-05-12 Thread Swaroop C H
On 5/12/05, Irvine, Wayne D <[EMAIL PROTECTED]> wrote: > I have a tab delimited ascii/excel file formated like ... The CSV module can help you: http://docs.python.org/lib/module-csv.html HTH, -- Swaroop C H Blog: http://www.swaroopch.info Book: http://www.byteofpython.info