Re: CGIXMLRPCRequestHandler example

2009-04-08 Thread O.R.Senthil Kumaran
On Apr 5, 12:24 pm, a...@pythoncraft.com (Aahz) wrote: > [posted & e-mailed, please respond on-group] There was some problem with the CGIXMLRPCRequestHandler code in the SimpleXMLRPC Server. It was not getting the length to read from the CONTENT_LENGTH environement variable ( as it the CGI server

IPv6 name resolution using getaddrinfo

2007-09-16 Thread O.R.Senthil Kumaran
proto, canonname, sa = res return cannoname The above function does not seem to work. It returns blank value only. Any help/ pointers? -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2: handle an error (302)

2007-09-11 Thread O.R.Senthil Kumaran
27;Dive Into Python'. Have a look here: http://www.diveintopython.org/http_web_services/index.html Example 11.1 openanything.py Implement your program along those lines. Thanks, Senthil -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: os.sep and os.path.sep

2007-09-09 Thread O.R.Senthil Kumaran
right. There are no differences. They exists there for utility purposes. Removing them would be a bad idea. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.5 problems

2007-09-09 Thread O.R.Senthil Kumaran
on.org and if you face the same problem, try the python distribution available from ActiveState. If both of them give the same problem, good chances that the problem is with your OS. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: ??????urllib post????????????

2007-09-06 Thread O.R.Senthil Kumaran
params) >>> print f.read() Hope this helps. - Senthil > On Sep 6, 2007, at 10:40 AM, O.R.Senthil Kumaran wrote: > > > If possible, please post your query in ASCII. > > > > -- > > Senthil > > > > > > * [EMAIL PROTECTED] <[EMAIL PROTECTED

Re: ??????urllib post????????????

2007-09-05 Thread O.R.Senthil Kumaran
t; http://mail.python.org/mailman/listinfo/python-list -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking if elements are empty

2007-09-05 Thread O.R.Senthil Kumaran
> Doran, Harold wrote: > > I presume you meant > > x = ' \t\'ff' > > > > Is there a way to check if the first element of y is null? > > You can use startswith() method of string objects. if x.startswith(' '): print True -

Re: PythonAlley.com

2007-09-05 Thread O.R.Senthil Kumaran
; don't have an idea, most likely others wont have as well. :) -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

ShowMeDo.com Announces Winner of Most-Video-Plays of the Month

2007-09-03 Thread O.R.Senthil Kumaran
//www.silverstripesoftware.com/ > > So who will win this month? It could be you! How about a screencast > showcasing a different web framework like TurboGears or Twisted Web? Or > something about databases, either relational or object. > > Jeff Rush > Python Advocacy Coor

Re: 400 Bad Request calling urllib2.urlopen()

2007-09-03 Thread O.R.Senthil Kumaran
the url which is throwing this error? To me, it does seem urllib2 issue, it could be the (improper ??) redirection setup at webserver. > -- > http://mail.python.org/mailman/listinfo/python-list -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: online doc bug

2007-08-24 Thread O.R.Senthil Kumaran
> hyperlink "site module documentation" in Section 4.1 on page > http://docs.python.org/inst/search-path.html leads to a nonexistent > page. Thank you. Submitted the report and patch at: http://bugs.python.org/issue1012 -- O.R.Senthil Kumaran http://uthcode.s

Re: Regarding Classes

2007-08-22 Thread O.R.Senthil Kumaran
tw, you are free to use any other term as well instead of 'self'. But that just is not the practise. You can call it anything you want. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: passing arguments with ampersands

2007-08-19 Thread O.R.Senthil Kumaran
print args [EMAIL PROTECTED] ~]$ python 1.py something anotherthing \& yetanother ['something', 'anotherthing', '&', 'yetanother'] [EMAIL PROTECTED] ~]$ python 1.py "something anotherthing & yetanother" ['something anotherthing & yetano

Re: yet another indentation proposal

2007-08-19 Thread O.R.Senthil Kumaran
and _} to the >language proper is not going to be acceptable by many users/programmers. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: passing arguments with ampersands

2007-08-18 Thread O.R.Senthil Kumaran
x27;] > Can you share the portion of the code? Are you quoting the argument that you are passing? for e.g: #cat 1.py import sys print sys.argv[1] #python 1.py "I am able to print the spaces and & characters" I am able to print the spaces and & characters -- O.R.Senthil Ku

Re: import * is not allowed ??

2007-08-14 Thread O.R.Senthil Kumaran
aste the stack trace or a link to the program? -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Best programs written completly in Python

2007-08-05 Thread O.R.Senthil Kumaran
uestion to answer as the software are aplenty and there is no judgement basis as this one is the best. Head on to www.python.org and see for yourself for programs under each category. And moreover, "written entirely in python" is a constrain to find the programs. Why do you need such a list

Re: the one python book

2007-08-04 Thread O.R.Senthil Kumaran
find it useful. Btw, do not miss to read Official Python Tutorial written by Guido. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with subprocess.Popen()

2007-08-01 Thread O.R.Senthil Kumaran
ts in any error (post back the error message) and try setting the executable argument explicit. subprocess.Popen(r'test.bat -t ABC_DE_001 "C:\ABCD.TXT",executable="test.bat",shell=True) -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Singleton in Python Cookbook

2007-07-25 Thread O.R.Senthil Kumaran
se also. > (I haven't presented the original code as I am not sure about copyrights). > If there is an online version of the code, please point to us that. Or you can ask the author of the book directly. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: set_proxy in urllib2 is driving my crazy

2007-07-23 Thread O.R.Senthil Kumaran
PHandler) urllib2.install_opener(opener) print urllib2.urlopen(req).read() > urllib2.URLError: The error indicates a network issue. Please see the difference when you use the ProxyHandler to try it. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: importing a module from a specific directory

2007-07-22 Thread O.R.Senthil Kumaran
ith the from module import name form of import statement. These explicit relative imports use leading dots to indicate the current and parent packages involved in the relative import. From the surround module for example, you might use: from . import echo from .. import Formats from ..Filter

Re: urllib to cache 301 redirections?

2007-07-17 Thread O.R.Senthil Kumaran
tting as how this wont be thread-safe. > > That's also an inefficient way to test for an empty dictionary. > How should it be done, otherwise? I am looking for alternative methods as well. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib to cache 301 redirections?

2007-07-17 Thread O.R.Senthil Kumaran
racker? > > If not, please do, and point us at it. I'll comment there. Posted: http://www.python.org/sf/1755841 Thanks, -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib to cache 301 redirections?

2007-07-16 Thread O.R.Senthil Kumaran
Thank you for the reply, Mr. John and I apologize for a very late response from my end. * John J. Lee <[EMAIL PROTECTED]> [2007-07-06 18:53:09]: > "O.R.Senthil Kumaran" <[EMAIL PROTECTED]> writes: > > > Hi, > > There is an Open Tracker item against urlli

urllib to cache 301 redirections?

2007-07-05 Thread O.R.Senthil Kumaran
ing what "cache - redirection" implies and what should be done with the urllib2 module. Any pointers? Thanks, -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter toggle a Label Widget based on checkbutton value

2007-07-04 Thread O.R.Senthil Kumaran
* Wojciech Mu?a <[EMAIL PROTECTED]> [2007-07-04 20:13:06]: > O.R.Senthil Kumaran wrote: > > Any suggestions on how can i make this checkbutton effect. > > 1) Press Enable IP, the Label IP should be shown. > > 2) Toggle Enable IP (So that its unset). the L

Tkinter toggle a Label Widget based on checkbutton value

2007-07-04 Thread O.R.Senthil Kumaran
;",command=display) proxy.grid(row=2,column=0) root.mainloop() -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: using subprocess for non-terminating command

2007-07-04 Thread O.R.Senthil Kumaran
bprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,shell=True) >>> process.pid 3475 >>> import os >>> import signal >>> os.kill(process.pid,signal.SIGINT) >>> process.stdout.read() '' >>> # required output is lost! -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: using subprocess for non-terminating command

2007-07-04 Thread O.R.Senthil Kumaran
Yes, I have tried to kill and then get the standard output result. But the result has been the same. I could not read the Popen returned file object. > You could emulate having a timeout on child.stdout.read by registering > a callback with Timer to kill the child. I dont know how to do this. I

Re: mysteries of urllib/urllib2

2007-07-03 Thread O.R.Senthil Kumaran
#x27; : 'Michael Foord', 'location' : 'Northampton', 'language' : 'Python' } headers = { 'User-Agent' : user_agent } data = urllib.urlencode(values) req = urllib2.Request(url, data, headers) response = urllib2.urlopen(req) the

Re: what is the PythonWin

2007-07-02 Thread O.R.Senthil Kumaran
"win32 extensions for python", I think > of what Mark labels "win32api". I'm reasonably certain that, Thanks for the explaination, Cameron. Yeah, there was a confusion from my end. I hope the OP, got what he needed from the URL tough. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the PythonWin

2007-07-01 Thread O.R.Senthil Kumaran
in". > PythonWin is a separate project by Mark Hammond providing win32 extensions for python. http://sourceforge.net/projects/pywin32/ -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 : https and proxy

2007-07-01 Thread O.R.Senthil Kumaran
does not support PROXY for HTTPS. Your case seems the same, I would suggest you to look up the Python Tracker for any already open issues, or if not kindly log one yourself. I shall if I can help further, working on urllib2 is a project am doing as part of Summer of Code 2007. Thanks, -- O

Re: urllib2 : https and proxy

2007-06-28 Thread O.R.Senthil Kumaran
urllib2.install_opener(opener) Substitute PROXY_* with actual values and then do urllib2.urlopen(site) which will go through the proxy. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list

Re: New Thread- Supporting Multiline values in ConfigParser

2007-06-26 Thread O.R.Senthil Kumaran
self.SECTCRE.match(line) and not self.OPTCRE.match(line) and > cursect is not None and optname: > Thanks Gabriel, this suggestion worked and helped me understand the ConfigParser a bit better as well. -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list