Re: Composition of functions

2010-06-30 Thread Zubin Mithra
> Er, I don't think you thought that one entirely through (/ tried it out): > > My Apologies. Here is a working one. >>> x="123" >>> t = list(x) >>> t.reverse() >>> print ''.join(t) 321 But of course, the method which was suggested earlier is far more elegant. >>> print ''.join(reversed(list(

Re: Composition of functions

2010-06-30 Thread Zubin Mithra
Hello, >>> y=list(x).reverse() > >>> print y > None > >>> L = ["a", "b", "c"] >>> L.reverse() >>> L ["c", "b", "a"] As you can see, L.reverse() performs the operation on itself and returns nothing. Hence, the return type None. Instead of y=''.join(list(x).reverse()) you should probably do, >

Re: Using Python for web applications

2010-06-30 Thread Zubin Mithra
On Wed, Jun 30, 2010 at 11:34 PM, Wyatt Schwartz wrote: > Dear Python-List members, > > Sorry for asking such a simple (or possibly complicated) question, as I am > new to Python programming. Anyways, I have read online that many popular > websites use Python for some of their web-based applicatio

Re: Hwy doesn't len(None) return zero ?

2010-06-30 Thread Zubin Mithra
On Thu, Jul 1, 2010 at 12:09 AM, Stef Mientki wrote: > hello, > > I've lot of functions that returns their result in some kind of tuple / > list / array, > and if there is no result, these functions return None. > Now I'm often what to do something if I've more than 1 element in the > result. > S

D-Bus

2010-03-17 Thread Zubin Mithra
Hello, I have experience writing scripts to connect to the D-Bus interface provided by different applications but have no experience writing a D-Bus interface for an application. Could someone point me in the right direction? A tutorial or a good example would be nice. Cheers!!! Zubin Mithra

PyAutoRun

2010-02-26 Thread Zubin Mithra
Hello, I have been using python for quite some time; however this is the first python project i have worked on. The code is hosted at http://github.com/zubin71/PyAutoRun The code needs re-factoring and feature additions; i have put up a TODO list there too. It`d be great if anyone could work on

socket programming

2009-12-30 Thread Zubin Mithra
The code snippet i have pasted at, http://paste.pocoo.org/show/160555/ produces a traceback which also has been pasted at the above link. The snippet attempts at socket programming using OOPs concepts. Please help. Thankx in advance Zubin Mithra -- http://mail.python.org/mailman/listinfo

code review

2009-12-23 Thread Zubin Mithra
the right "pythonic" way of doing it. The package can be found at www.code.google.com/p/pyautorun I`d love any feedback, ideas and criticism after a code review. Thank you in advance. cheers!!! Zubin Mithra -- http://mail.python.org/mailman/listinfo/python-list

Re: more efficient?

2009-12-22 Thread Zubin Mithra
thank you for your help and support. i`ll keep your advice in mind. :) cheers!!! Zubin On Tue, Dec 22, 2009 at 8:07 PM, Lie Ryan wrote: > On 12/22/2009 5:13 PM, Zubin Mithra wrote: >> >> I have the following two implementation techniques in mind. >> >> def myf

more efficient?

2009-12-21 Thread Zubin Mithra
I have the following two implementation techniques in mind. def myfunc(mystring): check = "hello, there " + mystring + "!!!" print check OR structure = ["hello, there",,"!!!"] def myfunc(mystring): structure[2] = mystring output = ''.join(mystring) i heard that string concatenat