Re: Complementary language?

2005-01-01 Thread Premshree Pillai
On Sat, 1 Jan 2005 09:35:32 + (UTC), Alan Gauld
<[EMAIL PROTECTED]> wrote:
> On Sat, 25 Dec 2004 18:40:31 -0500, HackingYodel
> <[EMAIL PROTECTED]> wrote:
> > Hello all!  I'm learning to program at home.  I can't imagine a better
> > language than Python for this.  The ideal situation, for me, would be to
> > study two languages at the same time.  Probably sounds crazy, but it
> > works out better for me.

Yes, the best way to learn a new language is probably to compare it
with some other language (of the same paradigm) that you are already
familiar with. The best part about Python is that there really isn't
much "learning" involved. Python comes closest to what you'd call
"pseudocode".

If you know your English, you probably know Python. :D

> 
> Me too, thats why my web tutorial features Python, VBSCript and
> Javascript. (The previous version had BASIC and Tcl with Python)
> 
> > fascinating.  C, D, Objective-C, Ocaml, C++, Lisp, how is a non-tech to
> > choose?  Does any single language do a better job in Python's weaker
> > areas?
> 
> C is better at low level stuff, Prolog is better at declaratie
> programming and Haskell is better at functional programming.
> Lisp/Scheme are good for giving a good theoretical understanding
> (try the SICP and HTDP web sites). And Tcl has a really different
> approach which is plain fun to grapple with :-)
> 
> I chose VBScript and JavaScript because they have similar
> structure to Python (traditional imperative programming
> with OOP) but very different syntax. Plus they were free and
> easily available (albeit with VBScript limited to Windows
> users, who are 80+% of my visitors). Javascript is especially
> useful since its an easy lead in to learning C/C++, Java,
> even Perl to some extent and a lot of sample code sites
> use those languages.
> 
> Alan G.
> Author of the Learn to Program website
> http://www.freenetpages.co.uk/hp/alan.gauld
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Which blog tool

2005-01-01 Thread Premshree Pillai
On Sat, 01 Jan 2005 13:14:23 +, Mark Carter <[EMAIL PROTECTED]> wrote:
> I currently use python to automatically summarise a certain newsgroup
> daily, and post the findings that it makes. Someone has suggested that
> they would like a to see a blog of the posts. I wondered if there was a
> python tool/library that could automate the blog postings. Any ideas?
> 
> Some details:
> * the summaries are basically just text files
> * I already have a blog at www.blogger.com
> (http://markcarterturriff.blogspot.com/), so I would like to use that if
> possible; although any alternative free one that I can use to achieve my
> objective would be OK, too.

You can use the Blogger API to post to your Blogger account. There's a
Python interface to the API -- PyBlogger -- available here:
http://beetle.cbtlsl.com/archives/category/pyblogger

You could also use a free service like LiveJournal
(http://www.livejournal.com/). There are several clients available to
post to LJ. I don't know if a Python wrapper to post is available or
not. IAC, it'd be a few lines of code to make the XML-RPC calls. The
protocol docs are available here:
http://www.livejournal.com/doc/server/ljp.csp.protocol.html

HTH
> * I do have my own hosted website, which can use perl but not python;
> but I'd rather use a freebie blog site
> * the whole thing must be scriptable, because it will run daily. A GUI
> would therefore likely get in the way.
> * generating an RSS feed would be nice
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cookbook 2nd ed Credits (was Re: The Industry choice)

2005-01-04 Thread Premshree Pillai
Do contributors of less than 5 recipes get a copy too? :-?

Btw, is there a comprehensive list of ALL contributors put up anywhere?

On Tue, 4 Jan 2005 17:15:53 +0100, Alex Martelli <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote:
> 
> > But then I have THREE published recipes!!
> > Does that mean that I get three free copies of the cookbook ? ;-)
> 
> ...ti piacerebbe eh...?-)  Sorry, "one each", even though you have
> _five_ credits.  For the curious, here's the roster of most credited
> contributors (remember, significant comments we merged into other's
> recipes also count!-)...:
> 
>  1: 42 u'Alex Martelli'
>  2: 26 u'Raymond Hettinger'
>  3: 25 u'Luther Blissett'
>  4: 22 u'Peter Cogolo'
>  5: 10 u'John Nielsen'
>  6: 10 u'Anna Martelli Ravenscroft'
>  7:  8 u'J\x9frgen Hermann'
>  8:  7 u'Scott David Daniels'
>  9:  7 u'Chris Perkins'
> 10:  6 u'S\x8ebastien Keim'
> 11:  6 u'Paul Prescod'
> 12:  6 u'Noah Spurrier'
> 13:  6 u'Jeff Bauer'
> 14:  6 u'Holger Krekel'
> 15:  6 u'Danny Yoo'
> 16:  6 u'Brent Burley'
> 17:  5 u'Paul Moore'
> 18:  5 u'Michele Simionato'
> 19:  5 u'Mark Nenadov'
> 20:  5 u'David Eppstein'
> 21:  5 u'Brian Quinlan'
> 
> If you wished to count only _authored_ recipes (but that's a bit
> misleading, since in several recipes-as-published there is a merge of
> two or three separately submitted and accepted recipes, and here I'm
> counting only the first-listed-author per published-recipe...):
> 
>  1: 25 u'Luther Blissett'
>  2: 21 u'Alex Martelli'
>  3:  9 u'John Nielsen'
>  4:  8 u'Raymond Hettinger'
>  5:  8 u'J\x9frgen Hermann'
>  6:  6 u'S\x8ebastien Keim'
>  7:  6 u'Peter Cogolo'
>  8:  6 u'Anna Martelli Ravenscroft'
>  9:  5 u'Scott David Daniels'
> 10:  5 u'Paul Prescod'
> 11:  5 u'Michele Simionato'
> 12:  5 u'Mark Nenadov'
> 13:  5 u'Jeff Bauer'
> 14:  5 u'Brent Burley'
> 
> ...but each still gets ONE free copy...!-)
> 
> Alex
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cookbook 2nd ed Credits

2005-01-05 Thread Premshree Pillai
On Wed, 5 Jan 2005 08:55:39 +0100, Alex Martelli <[EMAIL PROTECTED]> wrote:
> Premshree Pillai <[EMAIL PROTECTED]> wrote:
> 
> > Do contributors of less than 5 recipes get a copy too? :-?
> 
> Of course!
> 
> > Btw, is there a comprehensive list of ALL contributors put up anywhere?
> 
> Not yet -- do you think I should put it up on my website?

If you can, why not!

> 
> Alex
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: is python more popular than coldfusion?

2005-01-05 Thread Premshree Pillai
On Wed, 5 Jan 2005 19:59:21 +0800, worzel <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> is python more popular than coldfusion? 

I don't know if Coldfusion _was_ ever more "popular" than Python, but
Python is definitely more "popular" _now_.

This might be of some help: http://www.tiobe.com/tpci.htm

> 
> I realsie that is a very general question as one thing does not directly
> relate to the other. My issue is that I am ditching coldfusion due to there
> being next to no work for it, and I am thinking of taking on python as a
> second language to java in the hope of improving my resume. 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: is python more popular than coldfusion?

2005-01-05 Thread Premshree Pillai
On Wed, 5 Jan 2005 21:09:54 +0800, worzel <[EMAIL PROTECTED]> wrote:
> How seriuosly do folk take the TIOBE index? Is it a good way to ague what
> you should be keeping up to speed with or just a 'vague' guide?

I use the TIOBE index -- sometimes -- when I give presentations on
Python (and Ruby) to people who haven't heard of the languages.

The index is not something to be relied upon (take a look at the
calculation mechanism). However, more often than not, the indices
seems to reflect what *I* perceive the indices are in reality. So I
kinda use them.

The thing about introducing a "new" language to a bunch of folks used
to their "favorite" language is that they wouldn't care much for a
language it isn't popular, or if it isn't "growing in popularity".

Beyond these things, I don't think anybody uses the index. I mean I
wouldn't tell people to learn languages that hold the top position on
TIOBE ;).

> 
> "Premshree Pillai" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On Wed, 5 Jan 2005 19:59:21 +0800, worzel <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>
> >> is python more popular than coldfusion?
> >
> > I don't know if Coldfusion _was_ ever more "popular" than Python, but
> > Python is definitely more "popular" _now_.
> >
> > This might be of some help: http://www.tiobe.com/tpci.htm
> >
> >>
> >> I realsie that is a very general question as one thing does not directly
> >> relate to the other. My issue is that I am ditching coldfusion due to
> >> there
> >> being next to no work for it, and I am thinking of taking on python as a
> >> second language to java in the hope of improving my resume.
> >> --
> >> http://mail.python.org/mailman/listinfo/python-list
> >>
> >>
> >
> >
> > --
> > Premshree Pillai
> > http://www.livejournal.com/~premshree
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: is python more popular than coldfusion?

2005-01-05 Thread Premshree Pillai
On Wed, 5 Jan 2005 21:30:40 +0800, worzel <[EMAIL PROTECTED]> wrote:
> Wth respect to coldfusion, is there much doubt about the fact that Python is
> a more prominent and important technology?

No doubt in my mind at least.

> 
> How is colfusion percieved by the Python community? Many people belive
> coldfusion is becomeing irrelavant and is on its death bed - do Python folk
> generally feel this way about it?

I have no much idea about Coldfusion, but as far as its *use* is
concerned, it definitely isn't much.

> 
> Thanks for your input on this by the way.
> 
> "Premshree Pillai" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> > On Wed, 5 Jan 2005 21:09:54 +0800, worzel <[EMAIL PROTECTED]> wrote:
> >> How seriuosly do folk take the TIOBE index? Is it a good way to ague what
> >> you should be keeping up to speed with or just a 'vague' guide?
> >
> > I use the TIOBE index -- sometimes -- when I give presentations on
> > Python (and Ruby) to people who haven't heard of the languages.
> >
> > The index is not something to be relied upon (take a look at the
> > calculation mechanism). However, more often than not, the indices
> > seems to reflect what *I* perceive the indices are in reality. So I
> > kinda use them.
> >
> > The thing about introducing a "new" language to a bunch of folks used
> > to their "favorite" language is that they wouldn't care much for a
> > language it isn't popular, or if it isn't "growing in popularity".
> >
> > Beyond these things, I don't think anybody uses the index. I mean I
> > wouldn't tell people to learn languages that hold the top position on
> > TIOBE ;).
> >
> >>
> >> "Premshree Pillai" <[EMAIL PROTECTED]> wrote in message
> >> news:[EMAIL PROTECTED]
> >> > On Wed, 5 Jan 2005 19:59:21 +0800, worzel <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >>
> >> >>
> >> >> is python more popular than coldfusion?
> >> >
> >> > I don't know if Coldfusion _was_ ever more "popular" than Python, but
> >> > Python is definitely more "popular" _now_.
> >> >
> >> > This might be of some help: http://www.tiobe.com/tpci.htm
> >> >
> >> >>
> >> >> I realsie that is a very general question as one thing does not
> >> >> directly
> >> >> relate to the other. My issue is that I am ditching coldfusion due to
> >> >> there
> >> >> being next to no work for it, and I am thinking of taking on python as
> >> >> a
> >> >> second language to java in the hope of improving my resume.
> >> >> --
> >> >> http://mail.python.org/mailman/listinfo/python-list
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Premshree Pillai
> >> > http://www.livejournal.com/~premshree
> >>
> >> --
> >> http://mail.python.org/mailman/listinfo/python-list
> >>
> >
> >
> > --
> > Premshree Pillai
> > http://www.livejournal.com/~premshree
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cookbook 2nd ed Credits

2005-01-05 Thread Premshree Pillai
On Wed, 5 Jan 2005 13:52:06 -0500, Dan Perl <[EMAIL PROTECTED]> wrote:
> 
> "Alex Martelli" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Dan Perl <[EMAIL PROTECTED]> wrote:
> >
> >> "Alex Martelli" <[EMAIL PROTECTED]> wrote in message
> >> news:[EMAIL PROTECTED]
> >> > Premshree Pillai <[EMAIL PROTECTED]> wrote:
> >> >> Btw, is there a comprehensive list of ALL contributors put up
> >> >> anywhere?
> >> >
> >> > Not yet -- do you think I should put it up on my website?
> >>
> >> Updating the status of the recipes on the web site would be nice.
> >
> > Please take this up with Activestate guys -- I have no say on what
> > happens on the website they own, nor any special status there.
> 
> I was under the impression that the status on the website reflects whether
> the recipes are approved or rejected for the book (with a few more states
> added: new, deferred, pending).  I gather now from your reply that there is
> no connection between that status and the book.

No connection.

> 
> Okay then, I am adding my vote to posting the list of all the contributors.
> I still think that the ActiveState website is an appropriate place to do
> that, as they also have the recipes.  Actually, what is the exact
> relationship between the recipes on the website and the recipes published in
> the book?

Recipes published in the book are taken from the website, AFAIK.
And if you want to know more:
http://www.onlamp.com/pub/a/python/2002/08/01/cookbook.html :)

> 
> If not on the ActiveState website, then posting the list to another website
> would be good too.  Even if the list is not absolutely final and may be
> changed later (a disclaimer to that effect would suffice).  I have two
> recipes submitted (for which I got permission requests) and I am curious.
> 
> BTW, I sent an email to [EMAIL PROTECTED] earlier today, before
> I even saw this thread in c.l.p.  I haven't received a reply from them yet.
> 
> Dan
> 
> >
> > Alex
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: is python more popular than coldfusion?

2005-01-05 Thread Premshree Pillai
On Wed, 05 Jan 2005 13:54:53 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
> 
> >>is python more popular than coldfusion?
> > For your specific purpose of learning a language to get a job, I
> > suggest visiting the site http://mshiltonj.com/sm/categories/languages/
> > , where it appears that Python is mentioned about as often as Fortran
> > or Ada in job listings at dice.com . Apart from Java, two languages in
> > demand are C++ and Visual Basic. C++ may be easier to learn along with
> > Java since the syntax is similar, but VB is a very easy language to
> > learn and use.
> 
> SQL is also in pretty high demand in the places I watch. Problem is,

Umm, but SQL is not a _programming_ language. If you're job requires
DB stuff, knowledge of SQL would probably be a requisite, but SQL
alone, of course, won't do much good.

> they usually want *specific* SQL variants, so it's a fragmented
> market.
> 
>  --
> Mike Meyer <[EMAIL PROTECTED]>  
> http://www.mired.org/home/mwm/
> Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Employablity of python programmers

2005-01-18 Thread Premshree Pillai
Hi,

I program in Python -- but not at work. There are very few
opportunities for Python work in India. As of now, at least. (If
somebody else has better information, please correct me.)

A lot of people _do_ use Python, but not many organizations use it.

Okay, as an aside, as a computer _science_ graduate, a programming
language alone should not decide what career you choose. Nor should
you choose a career based on the liking of a particular language
alone.

And I kinda don't understand this idea of "choosing what's best". How
do you define "what is best"? I guess you should do what you like --
and not something that is "in demand".

My 2 paisas. :)

On 17 Jan 2005 07:09:09 -0800, Mir Nazim <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Here I am once again to give a bit trouble.
> 
> I am at the verge of completing my graduation in computer sciences. I
> will be graduating within 6-8 months. Now I am faced with the problems
> of my career. I am in a fix what skill set I must choose to be safe as
> far as job openings are concerned. I understand that skill set should
> be that one like most but job is also important. I will try to achieve
> a balance in both with the help of you advice.
> 
> I am currently developing in PHP as a freelance web developer. But I
> want to move to python(for all it all cool reasons discussed a zillion
> times on c.l.py) and wanted to know the job oportunites available to a
> python programmer(I know these have been also discussed a zillion time
> here but still..). I am living in India and would like to know about
> employability of python programmers in India (I know that a few Indians
> frequent c.l.py. Hello Sridhar, where are you).
> 
> I would also like to know that if the knowledge of any other language
> will boost employability of a python programmer. As far as I see it,
> the following combination are desirable.
> 
> 1) C/C++ and Python.
> 2) Java and Python.
> 3) Pure Python.
> 
> Out of the three Java along with python seems to be straight forward
> choice as far as employability is concerned. But I would like to know
> the benifits which one is a better career choice to take out of these
> three choices(other suggestions are welcome). For me choice three would
> be better, not because I have only one language to learn. If I choose
> choice three I could spend more time in learning different approaches
> to develop the application and better master the library and frameworks
> avaialble for python.
> 
> So what are the recomendations from your side. Please help.
> Thanks
> ---
> Mir Nazim.
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Event details changed: Bangalore Python January Meetup

2005-01-21 Thread Premshree Pillai
ur spam/junk/bulk folder?  Add
> > > > [EMAIL PROTECTED] to your address book to ensure that you receive
> > > > all future messages in your Inbox.
> > > >
> > > > -----
> > > > HOW TO UNSUBSCRIBE
> > > > You received this message because you registered this email
> > > > address at Meetup.com.
> > > >
> > > > To remove yourself from individual Meetup Groups and their
> > > > related emails, click the link below and select 'Remove
> > > > yourself' under the name of the appropriate Group:
> > > > http://www.meetup.com/account/
> > > >
> > > > To unsubscribe from ALL your Meetup Groups and the Meetup.com
> > > > service as a whole, click here:
> > > > http://www.meetup.com/account/remove/
> > > > -
> > > >
> > > >
> > >
> > >
> > > =
> > > Swaroop C H
> > > Blog: http://www.swaroopch.info
> > > Book: http://www.byteofpython.info
> > >
> >
> >
> > --
> > Anand B Pillai,
> > Techical Specialist,
> > SETLabs, INFOSYS Technologies,
> > Electronics City,
> > Hosur Road, Bangalore - 560100.
> >
> 
> 
> =
> Swaroop C H
> Blog: http://www.swaroopch.info
> Book: http://www.byteofpython.info
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help! Host is reluctant to install Python

2005-01-26 Thread Premshree Pillai
There are quite a few hosts who offer Python support, no? Maybe you
could change hosts. Pair offers Python, AFAIK.


On Tue, 25 Jan 2005 13:15:45 -0500, Daniel Bickett <[EMAIL PROTECTED]> wrote:
> I've been trying to convince my host to install python/mod_python on
> his server for a while now, however there are a number of reasons he
> is reluctant to do so, which I will outline here:
> 
> 1. His major reason is optimization. He uses Zend's optimization of
> PHP as an example, and he has stated that python is rather resource
> consuming.
> 2. Another one of his points is that he is unexperienced in installing
> python, and he would not know how to do it securely. By 'securely',
> I'm assuming he means disallowing a malicious (or ignorant) user from
> harming the server
> 
> And, in light of point #1, I suggested that if there wasn't any
> optimization immediately available, he could just enable it for my
> account (thus lessening potential resource consumption at any given
> time), to which he retorted "Do /you/ know how to do that?", and I
> must say, he has me cornered ;-)
> 
> I have no experience with this sort of thing, so I'm asking a little
> assistance in the direction of any documents or websites (or what have
> you) I could show him in order to answer some of these questions, or
> perhaps even some unspoken ones -- anything worth noting. (all I'm
> really going to do is link him to this thread once it has accumulated
> any answers)
> 
> Thank you all for your help :)
> 
> Wishing-to-be-liberated-from-the-clutches-of-PHP-ly y'rs,
> Daniel Bickett
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python without OO

2005-01-26 Thread Premshree Pillai
On 25 Jan 2005 13:49:48 -0800, Davor <[EMAIL PROTECTED]> wrote:
> Is it possible to write purely procedural code in Python, or the OO
> constructs in both language and supporting libraries have got so
> embedded that it's impossible to avoid them? Also, is anyone aware of
> any scripting language that could be considered as "Python minus OO
> stuff"? (As you can see I'm completely new to Python and initially
> believed it's a nice&simple scripting language before seeing all this
> OO stuff that was added in over time)
> Thanks,
> Davor

Umm,  just curious -- why would you want to not use the OO stuff?
Python is like pseudocode (the basic OO, which is mostly common to
most OO languages, isn't really complicated).

Moreover, using Python without OO would be like, um, eating mango seed
without the pulp. :)

> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: search engine

2005-01-30 Thread Premshree Pillai
On 30 Jan 2005 11:19:30 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> hi all, i´m doing a search engine using python for the spider and php
> to make a web for the search. The Database i have choosen is

Just curious: is there any particular reason you want to use PHP for
building the web interface?

> postgreSQL. Do you think it is a good choosen? Any suggestion?
> 
> if anybody in interested in colaborate please send an e-mail to
> [EMAIL PROTECTED]
> 
> In a few weeks i will upload all the code to one domain and so i can be
> able to send you information about this project.
> 
> The idea is to build a search engine like "google", but my/our search
> engine only look for tech pages, i also wants that users can select if
> they want to search a web, faqs/howto, manuals/tutorials...
> 
> Thanks.
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
--
http://mail.python.org/mailman/listinfo/python-list


Re: keylogger in Python

2005-07-31 Thread Premshree Pillai
On 30 Jul 2005 01:11:32 -0700, Jay <[EMAIL PROTECTED]> wrote:
> ok, i thought for 2 seconds i might have created a Keylogger in python
> keylogging = keylogger()
> keylog = open("keylog2.log", "w")
> text = raw_input()
> 
> keylog.write(text)
> keylog.close
> keylog = open("keylog2.log", "r")
> keylog.read

OMG!

-- 
Premshree Pillai
http://www.livejournal.com/users/premshree/
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] PyAC 0.1.0

2005-02-28 Thread Premshree Pillai
PyAC 0.1.0 (http://sourceforge.net/projects/pyac/)

* ignores non-image files 
* optional arg is_ppt for ordering presentation images (eg.,
Powerpoint files exported as images)
* misc fixes

Package here: 
http://sourceforge.net/project/showfiles.php?group_id=106998&package_id=115396&release_id=309010

-- 
Premshree Pillai
http://www.livejournal.com/users/premshree/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: creating csv file from

2005-03-02 Thread Premshree Pillai
On Wed, 2 Mar 2005 08:27:35 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote:
> >>>>> "Sandeep" == Sandeep Avinash Gohad <[EMAIL PROTECTED]> writes:
> 
> Sandeep> How can i use the url as an input so that I can save data from
> Sandeep> that particular webpage to comma seperated file (csv).
> 
> This worked for me:
> 
> import urllib, csv
> reader = csv.reader(urllib.urlopen("http://.../some.csv";))
> for row in reader:
> print row

He's not opening a CSV file... he wants to open a 'regular' web-page,
and then "convert it to CSV".

> 
> Skip
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/users/premshree/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Simple XML-to-Python conversion

2005-03-17 Thread Premshree Pillai
On Thu, 17 Mar 2005 12:39:42 +0100, Lutz Horn <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
> > I've been searching high and low for a way to simply convert a small
> > XML configuration file to Python data structures.

If using XML is not absolutely essential, you might want to take a
look at YAML[1, 2].

[1] http://yaml.org/
[2] http://python.yaml.org/dist/

-- 
Premshree Pillai
http://www.livejournal.com/users/premshree/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Variable Variable

2005-03-19 Thread Premshree Pillai
On Sat, 19 Mar 2005 04:35:47 -0500, Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> Tanteauguri wrote:
> > Hi List, is there in python a variable variable like in PHP ($$var)?
> >
> > What I want to do is something like that:
> >
> > pc=["a","b","c"]
> >
> > for i in pc:
> > i = anyclass()
> >
> > a.shutdown()
> > b.update()
> 
> Use a dictionary:
> 
> stuff = {}
> pc = ['a', 'b', 'c']

I think what he wants to do is basically hold object names in a tuple
list, and then call the methods on those objects (while iterating or
whatever).

> 
> for i in pc:
>  stuff[i] = anyclass()
> 
> stuff['a'].shutdown()
> stuff['b'].update()
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/users/premshree/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A scoping question

2004-12-28 Thread Premshree Pillai
On Tue, 28 Dec 2004 19:34:36 GMT, It's me <[EMAIL PROTECTED]> wrote:
> This must be another newbie gotchas.
> 
> Consider the following silly code, let say I have the following in file1.py:
> 
> #=
> import file2
> global myBaseClass
> myBaseClass = file2.BaseClass()
> myBaseClass.AddChild(file2.NextClass())
> #=

You have declared myBaseClass to be global, but it doesn't exist.

Consider the following code:

global name
print name.__len__()

This will return a NamError

However, the following code will run just fine:

global name
name = "python"
print name.__len__()

will return 6

> 
> and in file2.py, I have:
> 
> #=
> global myBaseClass
> class BaseClass:
> def __init__(self):
> self.MyChilds = []
>  ...
> def AddChild(NewChild):
> self.MyChilds.append(NewChild)
> ...
> class NextClass:
> def __init__(self):
> for eachChild in myBaseClass.MyChilds:  # <- ERROR
> ...
> #=
> 
> When I run this, Python complains that myBaseClass is undefined in the last
> line above.
> 
> What am I doing wrong?  (Yes, I know I am thinking too much in C).  I
> thought the global declaration would have been sufficient but it's obviously
> not.
> 
> Thanks,
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 

HTH

-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A scoping question

2004-12-28 Thread Premshree Pillai
On Tue, 28 Dec 2004 19:59:01 GMT, It's me <[EMAIL PROTECTED]> wrote:
> 
> "Premshree Pillai" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On Tue, 28 Dec 2004 19:34:36 GMT, It's me <[EMAIL PROTECTED]> wrote:
> > > This must be another newbie gotchas.
> > >
> > > Consider the following silly code, let say I have the following in
> file1.py:
> > >
> > > #=
> > > import file2
> > > global myBaseClass
> > > myBaseClass = file2.BaseClass()
> > > myBaseClass.AddChild(file2.NextClass())
> > > #=
> >
> > You have declared myBaseClass to be global, but it doesn't exist.
> >
> 
> No, myBaseClass exists in file1.py.   The question is how can I tell

Umm, from the sample code (for file2.py) that you provided, I don't
see myBaseClass. You've only declared it to be global in file2.py, but
it does not exist -- does not exist in the sense that it has no type
associated with it, which in turn means meaning you cannot apply
methods to it.

> file2.py that the global variable is in file1 (without doing a silly
> file1.myBaseClass
> 
> Since I am invoking file2 from file1, I would have thought that global
> variables in file1 exists automatically(too much C thinking, I know)
> 
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: install questions

2004-12-28 Thread Premshree Pillai
Umm, the file is called soap.py, so when you import you'll have to do a:

import soap


On Tue, 28 Dec 2004 13:09:48 -0800 (PST), A Chan <[EMAIL PROTECTED]> wrote:
> Hi, All,
> 
> I'm new in Python. I just install ActivePython 2.4 on
> my PC and also install SOAPpy-0.11.6.zip,
> soapy-0.1.win32.exe. When I run the following script,
> I got no module named SOAPpy. Am I missing any
> modules? Thanks
> 
> Angela
> 
> error message:
> 
> Traceback (most recent call last):
>   File
> "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
> line 310, in RunScript
> exec codeObject in __main__.__dict__
>   File "C:\test1.py", line 1, in ?
> import SOAPpy
> ImportError: No module named SOAPpy
> 
> =
> Python script:
> 
> import SOAPpy
> 
> WSDL_URI =
> "http://www.xmethods.net/sd/2001/TemperatureService.wsdl";
> service = SOAPpy.WSDL.Proxy(WSDL_URI)
> 
> # if you are behind a proxy server, you need to set
> this
> service.soapproxy.http_proxy = 'PROXY_HOST:PROXY_PORT'
> 
> # set config so that we dump the SOAP envelopes
> # (sometimes you will be thrilled to see the SOAP
> envelopes)
> service.soapproxy.config.dumpSOAPOut = 1
> service.soapproxy.config.dumpSOAPIn = 1
> 
> temp = service.getTemp('90210') # get temperature in
> Beverly Hills
> print 'The temperature in Beverly Hills is',temp,'F'
> ===
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The Industry choice

2004-12-30 Thread Premshree Pillai
On 30 Dec 2004 08:58:36 -0800, Sridhar  R <[EMAIL PROTECTED]> wrote:
> >From technical point of view, I could not understand the the reasoning
> behind using Java in major companies.  Sure that Python, is used in
> some, but still Java is considered as a sure-job language.

It certainly is not because Python is bad or something. Organizations
typically take lot of time to change -- be it technology or office
furniture.

We either need time for folks to accept dynamic, "scripting"
languages, or a lot of "modern" language programmers need to gang up
against managers and stuff. :)

> 
> After being a python programmer for long time, I consider it painful to
> learn/use Java now (well, like many I will be forced to do that in my
> job).
> 
> What makes such companies to choose Java over dynamic, productive
> languages like Python?  Are there any viable, technical reasons for
> that?
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/~premshree
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: author index for Python Cookbook 2?

2005-03-29 Thread Premshree Pillai
There's an index here: http://harvestman.freezope.org/cookbook/creds.html

But dunno if all the recipes were finally included. Maybe somebody
(Alex?) can confirm?


On 29 Mar 2005 01:20:46 -0800, Fuzzyman <[EMAIL PROTECTED]> wrote:
> 
> Andrew Dalke wrote:
> > Is there an author index for the new version of the
> > Python cookbook?  As a contributor I got my comp version
> > delivered today and my ego wanted some gratification.
> > I couldn't find my entries.
> >
> >   Andrew
> >   [EMAIL PROTECTED]
> 
> Hey, at least you got your copy. I'm in the UK and still eagerly
> awaiting mine :-) There was an online index somewhere - but not on any
> official site
> 
> Regards,
> 
> Fuzzy
> http://www.voidspace.org.uk/python
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
Premshree Pillai
http://www.livejournal.com/users/premshree/
-- 
http://mail.python.org/mailman/listinfo/python-list