Pdf download using mechanize

2010-07-06 Thread srinivasan srinivas
HI, I am using mechanize module for web scraping projects. One of y tasks is to download pdf file from a page and store it. Is there a way to download pdf file using mechanize how we do it in Perl's WWW::Mechanize? Thanks, Srini -- http://mail.python.org/mailman/listinfo/python-list

conversion of Python object to perl object

2009-08-18 Thread srinivasan srinivas
Hi, I have to call a perl method which takes a hash as its argument from a python module. Is there a way to convert python dictionary to perl hash ( not hash ref)? Thanks, Srini See the Web#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz.

calling obect method

2009-07-30 Thread srinivasan srinivas
Hi, I would like to know if i have an object and one of its methods as a string. How to call the method using this string? For ex If object is x and string y has one of its method names. x.value(y)() ---. Is there a way to do this? Thanks, Srini See the Web#39;s breaking stories, chosen

Python debugger

2009-07-03 Thread srinivasan srinivas
Hi, Could you suggest some python debuggers? Thanks, Srini Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Which one is best Python or Java for developing GUI applications?

2009-05-05 Thread srinivasan srinivas
Could you tell me does Python have any advantages over Java for the development of GUI applications? Thanks, Srini Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox --

Re: Which one is best Python or Java for developing GUI applications?

2009-05-05 Thread srinivasan srinivas
a écrit : srinivasan srinivas sri_anna...@yahoo.co.in writes: Could you tell me does Python have any advantages over Java for the development of GUI applications? Yes. Indeed. -- http://mail.python.org/mailman/listinfo/python-list Cricket on your mind? Visit the ultimate cricket

Query related to matplotlib

2009-04-28 Thread srinivasan srinivas
I would like to draw a chart which takes 'dates' in x axes and some values in y axes.   I would like to draw a simple chart using matplotlib. Can someone tell me which submodule i could use for this purpose? The module has to support in the way that i can draw more than one set can be passed

What is the best framework or module in Python for a small GUI based application development?

2009-04-22 Thread srinivasan srinivas
Hi, Could you suggest me some modules in Python which can be used to develop GUI based applications? and tell me which could be the best(in terms of efficiency) one for a small GUI based application development? Thanks, Srini Bollywood news, movie reviews, film trailers and more! Go to

Re: What is the best framework or module in Python for a small GUI based application development?

2009-04-22 Thread srinivasan srinivas
:33 PM Subject: Re: What is the best framework or module in Python for a small GUI based application development? On Apr 22, 8:11 am, srinivasan srinivas sri_anna...@yahoo.co.in wrote: Hi, Could you suggest me some modules in Python which can be used to develop GUI based applications? and tell

Can someone explain about the usage of unittest.TestSuite?

2009-04-09 Thread srinivasan srinivas
Hi, I would like to know about the unittest.TestSuite clearly like at what situations i can use this TestSuite? I am not getting the clear difference between this and unittest.TestCase. Thanks, Srini Cricket on your mind? Visit the ultimate cricket website. Enter

Fw: Query regarding Python sybase module

2009-03-25 Thread srinivasan srinivas
- Forwarded Message From: srinivasan srinivas sri_anna...@yahoo.co.in To: s...@pobox.com Sent: Tuesday, 24 March, 2009 7:42:35 PM Subject: Re: Query regarding Python sybase module NO. I tried with what u have mentioned in the previous update. But it gave only one result set. Thanks

What way is the best to check an empty list?

2009-03-25 Thread srinivasan srinivas
For ex: to check list 'A' is empty or not.. if A == []: if A.count == 0: if len(A) == 0: if not A: Thanks, Srini Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ -- http://mail.python.org/mailman/listinfo/python-list

What way is the best to check an empty list?

2009-03-25 Thread srinivasan srinivas
For ex: to check list 'A' is empty or not.. if A == []: if A.count == 0: if len(A) == 0: if not A: Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/ -- http://mail.python.org/mailman/listinfo/python-list

Query regarding Python sybase module

2009-03-23 Thread srinivasan srinivas
Hi, Does Sybase Python driver module implement multiple result sets from a single command? Could anyone guide e in finding answer for this? Thanks, Srini Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ --

Is there any way for a program to choose between 32 bit or 64-bit python dynamically?

2009-03-20 Thread srinivasan srinivas
Hi, Is thera any way for a program to choose between 32-bit or 64-bit dynamically? Thanks, Srini Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ -- http://mail.python.org/mailman/listinfo/python-list

what does 64-bit python mean?

2009-03-19 Thread srinivasan srinivas
Hi, Could someone help me in understanding what 64-bit python means? tahnks, Srini Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ -- http://mail.python.org/mailman/listinfo/python-list

Difference between 32 bit and 64 bit Python

2009-03-04 Thread srinivasan srinivas
Hi, I would like to know more about the advantages of 64-bit python. What appliactions can use 64-bit python and all? Can someone help me out in this? Thanks, Srini Bring your gang together. Do your thing. Find your favourite Yahoo! group at http://in.promos.yahoo.com/groups/ --

Re: Python Module for console text formatting?

2009-02-18 Thread srinivasan srinivas
:19 PM, srinivasan srinivas sri_anna...@yahoo.co.in wrote: Hi, Does anyone know any python module other than 'ConsoleFormat0.1.1' used to format text on console? For example, printing bold characters on console. Thanks, Srini      Did you know? You can CHAT without downloading messenger. Go

Python Module for console text formatting?

2009-02-17 Thread srinivasan srinivas
Hi, Does anyone know any python module other than 'ConsoleFormat0.1.1' used to format text on console? For example, printing bold characters on console. Thanks, Srini Did you know? You can CHAT without downloading messenger. Go to http://in.webmessenger.yahoo.com/ --

How do i add body to email.mime.multipart.MIMEMultipart instance?

2009-02-04 Thread srinivasan srinivas
Hi, Could someone tell me the way to add body to the instance email.mime.multipart.MIMEMultipart instance which has attachments? Thanks, Srini Bollywood news, movie reviews, film trailers and more! Go to http://in.movies.yahoo.com/ -- http://mail.python.org/mailman/listinfo/python-list

How do i add body to 'email.mime.multipart.MIMEMultipart' instance?

2009-02-03 Thread srinivasan srinivas
Hi, Could someone tell me the way to add body content to 'email.mime.multipart.MIMEMultipart' instance? Thanks, Srini Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ -- http://mail.python.org/mailman/listinfo/python-list

Doubts related to subprocess.Popen()

2009-01-20 Thread srinivasan srinivas
Hi, Does subprocess.Popen() count a new open file for each suprocess? I mean does it occupy an entry in file descriptor table of parent process? If so, wat is each file descriptor connected to? Thanks, Srini Add more friends to your messenger and enjoy! Go to

Re: Doubts related to subprocess.Popen()

2009-01-20 Thread srinivasan srinivas
'Too many open files' error. Thanks, Srini - Original Message From: Mark Wooding m...@distorted.org.uk To: python-list@python.org Sent: Tuesday, 20 January, 2009 6:16:17 PM Subject: Re: Doubts related to subprocess.Popen() srinivasan srinivas sri_anna...@yahoo.co.in writes: Does

Getting OSError, Could someone suggest?

2009-01-19 Thread srinivasan srinivas
Hi,  I have written a script which will spawn more than 200 no of subprocesses. I have used subprocess.Popen to do that.  OSError: [Error 24] Too many open files. Could someone help me in fixing this error? Thanks, Srini Add more friends to your messenger and enjoy! Go to

How to deepcopy a list of user defined lists?

2009-01-08 Thread srinivasan srinivas
Hi, I have a class which is a subclass of builtin-type list. #-- class clist(list):     def __new__(cls, values, ctor):     val = []     for item in values:     item = ctor(item)    

Re: How to deepcopy a list of user defined lists?

2009-01-08 Thread srinivasan srinivas
(cls, *args) 93 94 def _slotnames(cls): type 'exceptions.TypeError': __new__() takes exactly 3 arguments (1 given) - Original Message From: Chris Rebert c...@rebertia.com To: srinivasan srinivas sri_anna...@yahoo.co.in Cc: python-list@python.org Sent: Thursday, 8 January, 2009 1:56

How to send body and attachements in an email message?

2008-12-03 Thread srinivasan srinivas
HI, I would like to send an email message with body-content 'test' and an attachment. The snippet i used is: outer = email.mime.multipart.MIMEMultipart() msg1 = email.mime.text.MIMEText(filename1, _subtype = 'text') msg1.add_header('Content-Disposition', 'attachment') outer.attach(msg1) body =

Inheriting frozenset gives bug if i overwrite __repr__ method

2008-11-19 Thread srinivasan srinivas
Hi, I am getting an error while executing the following snippet. If i comment out method __repr__ , it works fine. class fs(frozenset):     def __new__(cls, *data):     data = sorted(data)     self = frozenset.__new__(cls, data)     self.__data = data     return self     def

Getting fractional part from a float without using string operations

2008-11-19 Thread srinivasan srinivas
Thanks, Srini Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting fractional part from a float without using string operations

2008-11-19 Thread srinivasan srinivas
, 2008 7:14:17 PM Subject: Re: Getting fractional part from a float without using string operations On Wed, Nov 19, 2008 at 8:35 AM, srinivasan srinivas [EMAIL PROTECTED] wrote: Thanks, Srini      Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ -- http

Re: Getting fractional part from a float without using string operations

2008-11-19 Thread srinivasan srinivas
Yes it works for most of the cases.  But it doesn't for the following case: str(abs(int(1234567.89)-1234567.89)) '0.88999898' Thanks, Srini - Original Message From: Tino Wildenhain [EMAIL PROTECTED] To: srinivasan srinivas [EMAIL PROTECTED] Cc: Jeremiah Dodds [EMAIL PROTECTED

Python certification

2008-10-17 Thread srinivasan srinivas
Hi, I m planning to do certification in Python?? Is therr any good certification available in Python like Sun certification for java?? Thanks, Sirni Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php --

Is there any nice way to unpack a list of unknown size??

2008-09-14 Thread srinivasan srinivas
I want to do something like below: 1. first, second, third, *rest = foo  2. for (a,b,c,*rest) in list_of_lists: Please suggest. Thanks, Srini Bring your gang together. Do your thing. Find your favourite Yahoo! group at http://in.promos.yahoo.com/groups/ --

Extracing data from webpage

2008-09-11 Thread srinivasan srinivas
Hi, I am trying to download data from a webpage. I use mechanize python module. Could someone tell me how to set/pass an agent like Mozilla or IE that we do in perl's WWW::Mechanize?? Thanks, Srini Be the first one to try the new Messenger 9 Beta! Go to

Directory creation

2008-09-06 Thread srinivasan srinivas
Can someone tell me is there any module available to create directories?? I tried os, tempfile. I was facing some issues with os.mkdir(). The mode setting was not proper with this method. I created the directory 'stdin' with '0700' mode using os.mkdir() method. $ ls -alR stdin/ stdin/: total

Creating directories

2008-09-04 Thread srinivasan srinivas
Can someone tell me is there any module available to create directories?? I tried os, tempfile. I was facing some issues with os.mkdir(). The mode setting was not proper with this method. I created the directory 'stdin' with '0700' mode using os.mkdir() method. $ ls -alR stdin/ stdin/: total 12

Do we have python equivalent of 'perl -e'??

2008-08-22 Thread srinivasan srinivas
HI, Like we run perl small code snippet using perl -e, do we have anything like that in python?? Thanks, Srini Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/ -- http://mail.python.org/mailman/listinfo/python-list

Python one-liner??

2008-08-22 Thread srinivasan srinivas
Hi, Do we have python one-liner like perl one-liner 'perl -e'?? Thanks, Srini Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting pid of a remote process

2008-08-19 Thread srinivasan srinivas
process srinivasan srinivas schrieb: HI, I am using Solaris and subprocess.Popen to spawn a process on a remote machine. No, you are *not* doing that. You are maybe using subproces to run SSH to spawn a remote process. Why don't you *show* us how you actually do that? DIEZ -- http

Re: Getting pid of a remote process

2008-08-19 Thread srinivasan srinivas
: Getting pid of a remote process srinivasan srinivas wrote: This is wat i am doing : args = [ SSH, hostname,  script_name] I am giving this to subprocess.Popen() Thanks, Srini Then the answer is simple: how would you figure out the remote process pid using ssh? Once you found that out, pass

Getting pid of a remote process

2008-08-18 Thread srinivasan srinivas
Hi, Could you please suggest me a way to find pid of a process started on a remote machine by the current process?? I should get pid in the current process environment. The approach should be somewhat generic. It shouldn't expect the remote process to print its pid. Thanks, Srini

Re: Getting pid of a remote process

2008-08-18 Thread srinivasan srinivas
HI, I am using Solaris and subprocess.Popen to spawn a process on a remote machine. Thanks, Srini - Original Message From: Diez B. Roggisch [EMAIL PROTECTED] To: python-list@python.org Sent: Monday, 18 August, 2008 9:23:20 PM Subject: Re: Getting pid of a remote process srinivasan

Suggestion for converting PDF files to HTML/txt files

2008-08-11 Thread srinivasan srinivas
Could someone suggest me ways to convert PDF files to HTML files?? Does Python have any modules to do that job?? Thanks, Srini Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/ --

Python Modules To convert PDF files to HTML files

2008-07-30 Thread srinivasan srinivas
Hi, could someone tel me any python modules which can be used to convert PDF files to HTML files?? Thanks, Srini Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/ --

We programming

2008-07-28 Thread srinivasan srinivas
Hi, Could someone suggest me better python modules for developing web programming related projects like web-pages download and uopload?? Thanks, Srini Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/ -- http://mail.python.org/mailman/listinfo/python-list

Do we have perl's Data::Dumper equivalent in Python??

2008-07-14 Thread srinivasan srinivas
Thanks, Srini Bollywood, fun, friendship, sports and more. You name it, we have it on http://in.promos.yahoo.com/groups/bestofyahoo/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pickle bound methods

2008-07-03 Thread srinivasan srinivas
From: Peter Otten [EMAIL PROTECTED] To: python-list@python.org Sent: Thursday, 3 July, 2008 12:13:45 PM Subject: Re: How to pickle bound methods srinivasan srinivas wrote: Please don't top-post. Could you please explain the code breifly?? I am not getting what it does. import copy_reg import

How to identify whether a function is module scoped function or static method of a class by using its fully qualified name

2008-07-02 Thread srinivasan srinivas
Thanks, Srini Best Jokes, Best Friends, Best Food and more. Go to http://in.promos.yahoo.com/groups/bestofyahoo/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pickle bound methods

2008-07-02 Thread srinivasan srinivas
Subject: Re: How to pickle bound methods srinivasan srinivas wrote: I would like to know how to pickle a bound method?? $ cat pickle_method.py import copy_reg import new def make_instancemethod(inst, methodname):     return getattr(inst, methodname) def pickle_instancemethod(method

Re: How to pickle bound methods

2008-07-02 Thread srinivasan srinivas
July, 2008 5:15:41 PM Subject: Re: How to pickle bound methods srinivasan srinivas wrote: (Please don't top-post) It works will for instance and class methods. But it doesn't work for static methods. Can you tel me how to pickle static methods as well?? For static methods pickling is not so easy

Re: How to pickle bound methods

2008-07-02 Thread srinivasan srinivas
Peter, Could you please explain the code breifly?? I am not getting what it does. Thanks, Srini  - Original Message From: Peter Otten [EMAIL PROTECTED] To: python-list@python.org Sent: Wednesday, 2 July, 2008 12:53:19 PM Subject: Re: How to pickle bound methods srinivasan srinivas

How to pickle bound methods

2008-07-01 Thread srinivasan srinivas
Hi, I would like to know how to pickle a bound method?? Thanks, Srini Meet people who discuss and share your passions. Go to http://in.promos.yahoo.com/groups/bestofyahoo/ -- http://mail.python.org/mailman/listinfo/python-list

Is there any way to find out sizeof an object

2008-06-23 Thread srinivasan srinivas
Hi, I have written a class which has some attributes. I want to know how do i find out the size of an instance of this class?? class T(object):     def __init__(self, fn_name, *args, **kwds):         self.fn_name = fn_name         self.args = args         self.kwds = kwds Thanks, Srini

Execute a script on a remote machine

2008-06-20 Thread srinivasan srinivas
Hi, My requirement is i have to execute a python script on a remote machine as a subprocess from a python script and to get the subprocess pid of the process running the script. Is there anyway to do that?? I have used subprocess.popen() method to do that. I have done as following: executable =

Re: Execute a script on a remote machine

2008-06-20 Thread srinivasan srinivas
This is ok. Is there any other way to find it out? Thanks, Srini - Original Message From: Gerhard Häring [EMAIL PROTECTED] To: python-list@python.org Sent: Friday, 20 June, 2008 10:03:30 PM Subject: Re: Execute a script on a remote machine srinivasan srinivas wrote: Hi, My

python socket programming

2008-06-19 Thread srinivasan srinivas
HI, I want to know the different kind of exceptions may occur in client-server  socket communication and the way to handle those scenarios. 1. What does the server do when a socket error occurs at any point: accepting a connection, sending data to a client, receiving data from a client, waiting

Socket Programming

2008-06-14 Thread srinivasan srinivas
Hi, Is there any way(method) to find whether the socket got closed or not?? Thanks, Srini Best Jokes, Best Friends, Best Food and more. Go to http://in.promos.yahoo.com/groups/bestofyahoo/ -- http://mail.python.org/mailman/listinfo/python-list

Python Socket programming

2008-06-13 Thread srinivasan srinivas
Hi, I am going to do some socket related programming in Python. Before that, I wish to know the Gotchas of Python Scoket Programming. Can anyone send me any link that satisfies my needs?? Thanks, Srini Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/ --