Email messages from grouped email using IMAPClient in Python.

2019-09-11 Thread Srinivas Pullabhotla
Hello, I am trying to fetch email messages from a gmail inbox. So, there will be 1000s of messages sent to Inbox and since they are 1000s, the emails are grouped 100 per each email item. When I tried this method, the program only fetches some but not all and especially it happens with grouped

Re: N-grams

2016-11-10 Thread srinivas devaki
no extra advantage over that as with n=1 tee just returns a wrapper around the iterable. Regards Srinivas Devaki Senior (4th year) student at Indian Institute of Technology (ISM), Dhanbad Computer Science and Engineering Department phone: +91 9491 383 249 telegram: @eightnoteight -- https://mai

Re: N-grams

2016-11-09 Thread srinivas devaki
On Thu, Nov 10, 2016 at 12:43 PM, srinivas devaki wrote: > complexity wise it's O(N), but space complexity is O(N**2) to execute > this function, I'm sorry, that is a mistake. I just skimmed through the itertoolsmodule.c, and it seems like the space complexity is just O(N), as

Re: N-grams

2016-11-09 Thread srinivas devaki
timeit list(myngrams(range(1000), n=100)) 1000 loops, best of 3: 1.46 ms per loop In [12]: --- Regards Srinivas Devaki Senior (4th year) student at Indian Institute of Technology (ISM), Dhanbad Computer Science and Engineering Departme

Re: Counting words in a string??

2016-09-30 Thread srinivas devaki
is a little bit slower when compared to defaultdict for this kind of purpose. Regards Srinivas Devaki Senior (final yr) student at Indian Institute of Technology (ISM), Dhanbad Computer Science and Engineering Department ph: +91 9491 383 249 telegram_id: @eightnoteight -- https://mail.python.org/mailman/listinfo/python-list

event loop vs threads

2016-09-26 Thread srinivas devaki
the extra overhead for threads come from ? -- Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 telegram_id: @eightnoteight -- https://mail.python.org/mailman/listinfo/python-list

Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?

2016-05-12 Thread srinivas devaki
On May 9, 2016 5:31 AM, "Tim Chase" wrote: > > then that's a bad code-smell (you get quadratic behavior as the > strings are constantly resized), usually better replaced with > I just want to point out that in Python s += str in loop is not giving quadratic behavior. I don't know why but it runs

Re: String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?)

2016-05-08 Thread srinivas devaki
f be gfdnbh be b GB GB BH GB vbjfhjb GB bffbbubbv GB hbu hbu fjbjfbbbufhbvh VB have fqbgvfb NB bb GB GB GB GB bbu GB vu GB vu GB GB b GB fbufjnb BH GB GB bvvfbubbjubuv GB b fbufbbby GB bfff GB f GB bbbu GB GB ffinj GB vh vh fjb GB fj GB h h GB gjfthey're the b GB gjf GBG GBG q GB fb

Re: String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?)

2016-05-08 Thread srinivas devaki
I'm so sorry, forgot to lock my phone. On May 9, 2016 9:01 AM, "srinivas devaki" wrote: > f be gfdnbh be b GB GB BH GB vbjfhjb GB bffbbubbv GB hbu hbu > fjbjfbbbufhbvh VB have fqbgvfb NB bb GB GB GB GB bbu GB vu GB vu GB GB > b GB fbufjnb BH GB GB bvvfbubfff

how to set nth bit of large binary file.

2016-04-25 Thread srinivas devaki
://stackoverflow.com/questions/3407505/writing-binary-data-to-middle-of-a-sparse-file but it only supports if you are constructing the data in file from scratch and aria2c can resume the download too i.e not from scratch. -- Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT

Re: Help me

2016-03-30 Thread srinivas devaki
ahh, this is the beginning of a conspiracy to waste my time. PS: just for laughs. not to offend any one. Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 telegram_id: @eightnoteight On Mar 30

Re: sobering observation, python vs. perl

2016-03-18 Thread srinivas devaki
y/) { > $tn = $1; > } > elsif (/release_req/) { > print "$tn\n"; > } > } > > Look at those numbers: > 1 minute for python without precompiled REs > 1/2 minute with precompiled REs > 5 seconds with perl. > -- > https://mail.python.org/mailman/listinfo/python-list -- Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 telegram_id: @eightnoteight -- https://mail.python.org/mailman/listinfo/python-list

Re: looping and searching in numpy array

2016-03-13 Thread srinivas devaki
ou can just use the else case which will work for all cases but if your npArray2 has such a pattern then the above code will perform better. Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 telegram

Re: even faster heaps

2016-03-07 Thread srinivas devaki
ap', u' 0.03 ( 3.73x) 0.42 ( 2.55x) 4.34 ( 2.35x) 38.37 ( 2.62x)') (u'remove', u'RemovalHeap', u' 0.05 ( 1.00

Re: Continuing indentation

2016-03-04 Thread srinivas devaki
gt; 'this is terrible' > print \ > 'but still not incorrect > > Still terrible. But not quite as useless as a knee-jerk reaction > might suggest. > > I actually hacked together a binary-diff something like this, > emitting every hex-formatted b

Re: Multiple Assignment a = b = c

2016-02-16 Thread srinivas devaki
es or names and then put the value of rhs in them. as `a` is a name, so the rhs reference is copied to the a `roots[a]` is a reference to an object, so it is initialized with the reference of rhs. anyway I got it, and all my further doubts are cleared from that compiled code. I tried some oth

Multiple Assignment a = b = c

2016-02-16 Thread srinivas devaki
__getitem__ 6 __setitem__ 6 6 But the output that i expected is __setitem__ 4 6 __getitem__ 4 __getitem__ 6 __setitem__ 4 6 SO isn't it counter intuitive from all other python operations. like how we teach on how python performs a swap operation??? I just want to get a better idea around this

Re: Storing a big amount of path names

2016-02-11 Thread srinivas devaki
ldren, each node can be of two types a file and folder. if you come to think about it this is most intuitive way to represent the file structure in your program. you can extract the directory name from the file object by traversing it's parents. I hope this helps. Regards Srinivas Devaki Ju

Re: There has to be a better way to split this string!

2016-02-09 Thread srinivas devaki
On Feb 10, 2016 7:23 AM, "srinivas devaki" wrote: > > > On Feb 10, 2016 6:56 AM, "Anthony Papillion" wrote: > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA512 > > > > Hello Everyone, > > > > I am using datetime.now

Re: There has to be a better way to split this string!

2016-02-09 Thread srinivas devaki
)-(\d{2})-(\d{2})-(\d{2})-(\d{2})-(\d{4})', 'myfile-2015-02-09-19-08-45-4223') In [37]: mat Out[37]: <_sre.SRE_Match object; span=(0, 31), match='myfile-2015-02-09-19-08-45-4223'> In [38]: mat.groups() Out[38]: ('myfile', '2015', '02', &#

Re: Heap Implementation

2016-02-09 Thread srinivas devaki
er you've removed the element. > If you can do it with C pointers then you can do it with python's references/mutable objects. :) in case of immutable objects, use a light mutable wrapper or better use list for performance. Regards Srinivas Devaki Junior (3rd yr) student at Indian Scho

Re: Heap Implementation

2016-02-08 Thread srinivas devaki
On Feb 8, 2016 5:17 PM, "Cem Karan" wrote: > > On Feb 7, 2016, at 10:15 PM, srinivas devaki wrote: > > On Feb 8, 2016 7:07 AM, "Cem Karan" wrote: > > > I know that there are methods of handling this from the client-side (tuples with unique counters come

Re: Heap Implementation

2016-02-07 Thread srinivas devaki
ily subclass with just using self._counts dict in your subclass. but still I think it is good to introduce it as a feature in the library. Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 teleg

Re: _siftup and _siftdown implementation

2016-02-06 Thread srinivas devaki
st level, the optimization is occurring in that place. Which makes the reason behind the heapq module's choice of _siftup code is not at all related to this cause. PS: please copy the table to some text editor, for better visualization. On Fri, Feb 5, 2016 at 11:12 PM, srinivas devaki wrote: > wow

Re: _siftup and _siftdown implementation

2016-02-05 Thread srinivas devaki
same. I'm attaching the files. do you have any idea why this happened? On Fri, Feb 5, 2016 at 9:57 PM, Sven R. Kunze wrote: > > Can we do better here? > I don't know, I have to read TAOP knuth article. -- Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mine

Re: _siftup and _siftdown implementation

2016-02-05 Thread srinivas devaki
On Fri, Feb 5, 2016 at 8:12 PM, Sven R. Kunze wrote: > On 05.02.2016 02:26, srinivas devaki wrote: > What do you think about our use-case? > Oh, the logic is sound, every element that we have inserted has to be popped, We are spending some *extra* time in rearranging the elements only t

Re: _siftup and _siftdown implementation

2016-02-04 Thread srinivas devaki
On Feb 5, 2016 5:45 AM, "Steven D'Aprano" wrote: > > On Fri, 5 Feb 2016 07:50 am, srinivas devaki wrote: > > > _siftdown function breaks out of the loop when the current pos has a valid > > parent. > > > > but _siftup function is not implemented in

_siftup and _siftdown implementation

2016-02-04 Thread srinivas devaki
is so, is it just to make the code look simple??? Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 telegram_id: @eightnoteight -- https://mail.python.org/mailman/listinfo/python-list

Re: Heap Implementation

2016-02-01 Thread srinivas devaki
On Feb 1, 2016 10:54 PM, "Sven R. Kunze" wrote: > > Maybe I didn't express myself well. Would you prefer the sweeping approach in terms of efficiency over how I implemented xheap currently? > complexity wise your approach is the best one of all that I have seen till now > Without running some be

Re: Heap Implementation

2016-01-30 Thread srinivas devaki
> not intend to rewrite the incredibly fast and well-tested heapq > implementation. I just re-used it. > > I would really be grateful for your feedback as you have first-hand > experience with heaps. > > @srinivas > You might want to have a look at the removal implementation

Re: How to remove item from heap efficiently?

2016-01-13 Thread srinivas devaki
On Wed, Jan 13, 2016 at 4:50 PM, Cem Karan wrote: > > Is that so? I'll be honest, I never tested its asymptotic performance, I > just assumed that he had a dict coupled with a heap somehow, but I never > looked into the code. > I have just tested the code, the aymptotic performance is O(log(n)

Re: How to remove item from heap efficiently?

2016-01-11 Thread srinivas devaki
On Jan 10, 2016 12:05 AM, "Paul Rubin" wrote: > > You could look up "timing wheels" for a simpler practical approach that > the Linux kernel scheduler used to use (I think it changed a few years > ago). this is not related to OP's topic I googled about "timing wheels" and "Linux kernel scheduler

Re: How to remove item from heap efficiently?

2016-01-11 Thread srinivas devaki
On Jan 11, 2016 12:18 AM, "Sven R. Kunze" wrote: > Indeed. I already do the sweep method as you suggested. ;) > > Additionally, you provided me with a reasonable condition when to do the sweep in order to achieve O(log n). Thanks much for that. I currently used a time-bases approached (sweep each

Re: How to remove item from heap efficiently?

2016-01-08 Thread srinivas devaki
suggestion. > > On 08.01.2016 14:21, srinivas devaki wrote: >> >> You can create a single heap with primary key as timestamp and >> secondary key as priority, i.e by creating a tuple >> insert the elements into the heap as >> (timestamp, priority) > > I think I can

Re: How to remove item from heap efficiently?

2016-01-08 Thread srinivas devaki
You can create a single heap with primary key as timestamp and secondary key as priority, i.e by creating a tuple insert the elements into the heap as (timestamp, priority) If there is any underlying meaning for creating 2 heaps. please mention. On Fri, Jan 8, 2016 at 4:22 AM, Sven R. Kunze wr

Re: Trailing zeros of 100!

2016-01-02 Thread srinivas devaki
let's put an end to this. from math import log # simple one to understand. complexity: O(n*log(n)) def countzeros_va(n): count = 0 for x in xrange(1, n + 1): while x % 5 == 0: count += 1 x //= 5 return count # better approach. complexity: O(log(n)) def

Re: How to use internal python c funtions, from python code

2015-12-10 Thread srinivas devaki
Thank you Chris, later I decided that this would be cheating and I have to think about another algorithmic approach. most of the competitive programming platforms provide python with a time limit of 5 times of c/c++ time limit. but in many cases like if the algorithms are recursive(like segment

How to use internal python c funtions, from python code

2015-12-09 Thread srinivas devaki
Hi I'm coming from this link ( https://groups.google.com/forum/#!topic/python-ideas/cBFvxq1LQHM), which proposes to use long_to_decimal_string(), int_to_decimal_string() functions for printing integers in different bases. Now is there anyway i can use such internal functions from pure python code,

Re: Reading lines of text from 7z compressed files in Python

2015-12-09 Thread srinivas devaki
On Dec 9, 2015 3:07 PM, "Anmol Dalmia" wrote: > > > I wish to use the native LZMA library of Python 3.4 for faster performance > than any other third- party packages. Is it possible to do so? > you can check the source of lzma module main compression and decompression algorithms were written in c

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-09 Thread srinivas devaki
On Dec 9, 2015 4:45 PM, "Steven D'Aprano" wrote: > > Maildir is also *much* safer too. With mbox, a single error when writing > email to the mailbox will likely corrupt *all* emails from that point on, > so potentially every email in the mailbox. With maildir, a single error > when writing will, a

Re: How To Create A Endles List Of Lists In Python...???

2015-11-20 Thread srinivas devaki
On Fri, Nov 20, 2015 at 11:58 PM, srinivas devaki wrote: > def __str__(self): > if len(self.list) == 0: > return '(' + str(self.data) + ')[...]' > return ''.join(['(', str(self.data), ')[

Re: How To Create A Endles List Of Lists In Python...???

2015-11-20 Thread srinivas devaki
On Fri, Nov 20, 2015 at 6:39 PM, Chris Angelico wrote: > My crystal ball suggests that defaultdict(list) might be useful here. > > ChrisA I used something similar to this for some problem in hackerrank, anyway i think this is what you want. class defaultlist(object): def __init__(self, facto

Re: Unbuffered stderr in Python 3

2015-11-06 Thread srinivas devaki
On Mon, Nov 2, 2015 at 1:22 PM, Steven D'Aprano wrote: > > So how come Python 3 has line buffered stderr? And more importantly, how can > I turn buffering off? > > I don't want to use the -u unbuffered command line switch, because that > effects stdout as well. I'm happy for stdout to remain buffe

required help with python code.

2015-08-25 Thread Srinivas, Jostna
0] r Regards, Jostna Srinivas | Staples Enterprise Reporting | m. +91.984.017.8090 | jostna.srini...@staples.com<mailto:jostna.srini...@staples.com> -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with simple OOP Python question

2011-09-05 Thread srinivas hn
Hi, You are getting same object because you are overriding the dictionary update. Its printing the proper value with the last updated instance of B. If you want to see the two different instances of class B give print self.sub inside the sub_add method in class A. CHEERS CNA 9986229891 On Mon,

Re: Trapping MySQLdb warnings

2011-06-16 Thread srinivas hn
Hi Tim, Use this method it will sort tour problem. def do_query(insert_query): import warnings with warnings.catch_warnings(): warnings.simplefilter('error', MySQLdb.Warning) try: cursor.execute(insert_query) conn.commit() return 'Success' except MySQLdb.Error, e

job for python lead

2011-04-07 Thread srinivas hn
Hi , There is a opening for the position of python lead in a company called TEK systems global services for bangalore location.Interested candidates can send in their profiles to snara...@teksystems.com. CHEERS CNA 9986229891 -- http://mail.python.org/mailman/listinfo/python-list

Re: Which is the best book to learn python

2011-01-24 Thread srinivas hn
search for byte of python in google its good book for beginners . . CHEERS CNA 9986229891 On Mon, Jan 24, 2011 at 10:39 PM, santosh hs wrote: > Hi All, > i am beginner to python please tell me which is the best available > reference for beginner to start from novice > -- > http://mail.python

Links and pointers to basics of soap and suds

2010-12-15 Thread srinivas hn
Hi All, I am very new to the soap and its python client suds.Can anyone tell me how the actual will happens i nthe webservices including suds and soap API. Thanks in advance CHEERS CNA 9986229891 -- http://mail.python.org/mailman/listinfo/python-list

DDE using Python

2010-11-15 Thread Santosh Srinivas
Hello Group, I want to connect to an application on my desktop that I understand provides access to few topics and data via DDE. But, I don't know the topic names. Is there any way that I can connect and find out what the available options are? Thanks. S -- http://mail.python.org/mailman/listi

Re: Python documentation too difficult for beginners

2010-11-02 Thread srinivas hn
If you are really beginner in python you can look into the dive into python,search as in google as the same its quite helpful for beginners.Also you can go for the byte of python. CHEERS CNA 9986229891 On Tue, Nov 2, 2010 at 4:42 PM, jk wrote: > Hi, > > I've been coding in PHP and Java for yea

MS Word Document to html conversion

2010-08-16 Thread srinivas hn
solve this problem. Thanks in advance Srinivas HN -- http://mail.python.org/mailman/listinfo/python-list

Problem With the PyRtf Footers

2010-07-07 Thread srinivas hn
section.Footer for the subsequent pages.I am not able to figure out what is exactly the problem.If any body knows please help me. Thanks in Advance ! Srinivas HN ph-9986229891 -- http://mail.python.org/mailman/listinfo/python-list

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

Python for 64bit Linux version

2009-09-03 Thread Bhanu Srinivas Mangipudi
Hello Every one, I just want to that s there a 64 bit Linux version for python ? if yes can you provide me any links for it.I could find a 64bit windows version but could not find Linuux version Your help is appriciated. Thanks Bhanu -- 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's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/

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's breaking stories, chosen by

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

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

2009-05-05 Thread srinivasan srinivas
Could you list down those advantages?? - Original Message From: Bruno Desthuilliers To: python-list@python.org Sent: Tuesday, 5 May, 2009 1:07:41 PM Subject: Re: Which one is best Python or Java for developing GUI applications? Paul Rubin a écrit : > srinivasan srinivas wri

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

2009-05-04 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 -- http://mail.python.org/mailman/list

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 to

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

2009-04-22 Thread srinivasan srinivas
: What is the best framework or module in Python for a small GUI based application development? On Apr 22, 8:11 am, srinivasan srinivas wrote: > 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

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

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 http://beta.cricket.ya

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

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

Fw: Query regarding Python sybase module

2009-03-25 Thread srinivasan srinivas
- Forwarded Message From: srinivasan srinivas 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, Srini

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/ -- http://mail.python.org/mailman/listinfo/pyt

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-18 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/ -- http://m

Re: string to list conversion

2009-02-19 Thread Srinivas
John, Try the following code .. hope this helps and solves your problem . I have run in the interactive mode >>> s='' >>> a=[s,'12'] >>> print a ['', '12'] regards Srinivas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Module for console text formatting?

2009-02-18 Thread srinivasan srinivas
PM, srinivasan srinivas 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 to http://in.webmes

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/ -- http://mail.python.

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

Re: Doubts related to subprocess.Popen()

2009-01-20 Thread srinivasan srinivas
am getting 'Too many open files' error. Thanks, Srini - Original Message From: Mark Wooding To: python-list@python.org Sent: Tuesday, 20 January, 2009 6:16:17 PM Subject: Re: Doubts related to subprocess.Popen() srinivasan srinivas writes: > Does subprocess.Popen() count a

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 http://messenger.yahoo.com/i

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 http://messen

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

2009-01-08 Thread srinivasan srinivas
): ---> 92 return cls.__new__(cls, *args) 93 94 def _slotnames(cls): : __new__() takes exactly 3 arguments (1 given) - Original Message From: Chris Rebert To: srinivasan srinivas Cc: python-list@python.org Sent: Thursday, 8 January, 2009 1:56:27 PM Subject: Re: How to dee

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)     val.append(item

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(, _subtype = 'text') msg1.add_header('Content-Disposition', 'attachment') outer.attach(msg1) body = email.mime.

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 PROTE

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

2008-11-19 Thread srinivasan srinivas
hon-list@python.org Sent: Wednesday, 19 November, 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 en

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

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 __re

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 -- http://mail.python.or

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/ -- http://mail.python.org/mailma

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 http://in.messenger.yahoo.com/win

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 1

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

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

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

2008-08-21 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

Re: Getting pid of a remote process

2008-08-19 Thread srinivasan srinivas
etting pid of a remote process srinivasan srinivas wrote: > This is wat i am doing : > > args = [ "SSH", ,  ] > 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

Re: Getting pid of a remote process

2008-08-19 Thread srinivasan srinivas
a remote 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 --

Re: Getting pid of a remote process

2008-08-18 Thread srinivasan srinivas
ivasan srinivas schrieb: > 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 remot

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 Unlimit

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/ -- http://mail.python.org/mailman/listin

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/ -- http://mail.python.org/mailman/listinfo/python-list

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

  1   2   >