Re: Help to understand the data structure

2019-09-27 Thread Mohan L
Hi All, Please ignore it, I was able to figure out it. for dev in devlist: print (dev.name, dev.id) -- Thanks & Regards Mohan L On Fri, Sep 27, 2019 at 8:41 PM Mohan L wrote: > Hi All, > > I am using get_devices_list method from this module: > https://github.com/

Help to understand the data structure

2019-09-27 Thread Mohan L
: devicename1 10 devicename2 11 devicename3 12 I spend quit some time still not able to figure out how to parse. Can some one through some light on how to phrase it. -- Thanks & Regards Mohan L -- https://mail.python.org/mailman/listinfo/python-list

Re: subprocess : AttributeError: 'Popen' object has no attribute 'read'

2019-01-03 Thread Mohan Mohta
On Thursday, January 3, 2019 at 1:49:31 PM UTC-6, Chris Angelico wrote: > On Fri, Jan 4, 2019 at 6:46 AM Mohan Mohta wrote: > > > > Hello, > > I am trying to grep the keyword (which I got from report_file ) from > > report_file > > > > I tried multip

subprocess : AttributeError: 'Popen' object has no attribute 'read'

2019-01-03 Thread Mohan Mohta
Hello, I am trying to grep the keyword (which I got from report_file ) from report_file I tried multiple ways but am unable to get it to work. Below are the methods I tried. fp=open(txt_file,'r') for line in fp : line=line.strip() var1=line.lower() g_info=subprocess

text mining

2018-06-15 Thread mohan shanker
anotology using text mining in python pls any one one described fo me -- https://mail.python.org/mailman/listinfo/python-list

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread Mohan Mohta
a couple of notes on style: the terminating semicolons in your code > is unnecessary. It's only needed for multiple statements on a single line. > Please use a single space on each side of a binary operator or assignment - > it improves readability. > > Regards, > >

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread Mohan Mohta
On Monday, September 26, 2016 at 8:08:13 PM UTC-5, MRAB wrote: > On 2016-09-27 01:34, Mohan Mohta wrote: > > On Monday, September 26, 2016 at 6:56:20 PM UTC-5, Nathan Ernst wrote: > >> On Mon, Sep 26, 2016 at 6:00 PM, MRAB wrote: > >> > >> > On 2016-09-2

Re: xlsxwriter considering worksheet.write as tuple ???

2016-09-26 Thread Mohan Mohta
On Monday, September 26, 2016 at 6:56:20 PM UTC-5, Nathan Ernst wrote: > On Mon, Sep 26, 2016 at 6:00 PM, MRAB wrote: > > > On 2016-09-26 23:03, M2 wrote: > > > >> Hello > >> The program is designed to collect different statistics from servers > >> across the network and populate in excel sheet.

[pyinotify] help required to send only one mail for chunk of events

2016-05-23 Thread Mohan L
Hi All, I am using the bellow script to watch directories. Using 20 seconds to aggregate together a larger chunk of events and enabled coalescing of events. I wanted to send an email notification with content of logfile after 15 mins on any change. The idea is I want to send only one mail for ch

Re: Python Scheduling

2015-08-07 Thread Suneel Mohan SG
Sairam, What's your OS? Windows 7 does have a Task Scheduler. Go to Control Panel -> Administrative Tools -> Task Scheduler. Hope this helps. Br, Suneel. On Friday, August 7, 2015 at 2:27:03 PM UTC+5:30, sairam kumar wrote: > Hi Experts, > > >     I am Automating some repetitive works throu

Re: Multiple thread program problem

2015-06-03 Thread Mohan Mohta
On Wednesday, June 3, 2015 at 5:34:31 PM UTC-5, Waffle wrote: > You think "(f)" makes a tuple, but it does not. > the parentesis is not the tuple constructor, the comma is > try: > t=thread.start_new_thread(proc,(f,)) Thanks for the pointer waffle. The program executes now but still not the way I

Re: Multiple thread program problem

2015-06-03 Thread Mohan Mohta
On Wednesday, June 3, 2015 at 4:01:13 PM UTC-5, Sam Raker wrote: > proc(f) isn't a callable, it's whatever it returns. IIRC, you need to do > something like 'start_new_thread(proc, (f,))' If I execute something like t=thread.start_new_thread(proc,(f)) I get: Traceback (most recent call last):

Multiple thread program problem

2015-06-03 Thread Mohan Mohta
Hello I am trying to create multiple thread through the below program but I am getting an error #! /usr/bin/python import os import subprocess import thread import threading from thread import start_new_thread def proc(f) : com1="ssh -B " com2=line.strip('\n') com3= " un

Re: compare two list of dictionaries

2013-10-03 Thread Mohan L
On Fri, Oct 4, 2013 at 12:14 AM, MRAB wrote: > On 03/10/2013 17:11, Mohan L wrote: > >> Dear All, >> >> I have two list of dictionaries like below: >> >> In the below dictionaries the value of ip can be either hostname or ip >> address. >> &

compare two list of dictionaries

2013-10-03 Thread Mohan L
me': 'hostname8', 'ip_addr': ''}, {'hostname': 'hostname200', 'ip_addr': 'xxx.xx.xxx.200'}, {'hostname': 'hostname300', 'ip_addr': 'xxx.xx.xxx.400'}, ) trying to get the following difference from the above dictionary 1). compare the value of 'ip' in output1 dictionary with either 'hostname' and 'ip_addr' output2 dictionary and print their intersection. Tried below code: for doc in output1: for row in output2: if((row["hostname"] == doc["ip"]) or (row["ip_addr"] == doc["ip"])): print doc["ip"],doc["count"] *output:* hostname1 212 hostname2 27 hostname10 1 hostname8 2 xxx.xx.xxx.11 3 xxx.xx.xxx.12 90 xxx.xx.xxx.13 12 xxx.xx.xxx.14 21 xxx.xx.xxx.15 54 xxx.xx.xxx.16 34 2). need to print the below output if the value of 'ip' in output1 dictionary is not there in in output2 dictionary(ip/hostname which is there in output1 and not there in output2): xxx.xx.xxx.1 3 xxx.xx.xxx.2 4 xxx.xx.xxx.3 8 xxx.xx.xxx.4 10 hostname3 513 hostname4 98 xxx.xx.xxx.17 11 xxx.xx.xxx.18 2 xxx.xx.xxx.19 19 xxx.xx.xxx.20 21 xxx.xx.xxx.21 25 xxx.xx.xxx.22 31 xxx.xx.xxx.23 43 xxx.xx.xxx.24 46 xxx.xx.xxx.25 80 xxx.xx.xxx.26 91 xxx.xx.xxx.27 90 xxx.xx.xxx.28 10 xxx.xx.xxx.29 3 3). Ip address with is there only in output2 dictionary. xxx.xx.xxx.200 xxx.xx.xxx.400 Any help would be really appreciated. Thank you Thanks Mohan L -- https://mail.python.org/mailman/listinfo/python-list

Re: help on python regular expression named group

2013-07-16 Thread Mohan L
On Tue, Jul 16, 2013 at 2:12 PM, Joshua Landau wrote: > On 16 July 2013 07:55, Mohan L wrote: > > > > Dear All, > > > > Here is my script : > > > > #!/usr/bin/python > > import re > > > > # A string. > > logs = "dat

help on python regular expression named group

2013-07-16 Thread Mohan L
27;} need help to correct the below regex (?P(date=(?P[^\s]+))\s+(time=(?P[^\s]+)))" so that It will have : 'datetime': '2012-11-28 21:14:59' instead of 'datetime': 'date=2012-11-28 time=21:14:59' any help would be greatly appreciated Thanks Mohan L -- http://mail.python.org/mailman/listinfo/python-list

pip and distutils

2013-01-28 Thread Vraj Mohan
I have created a source distribution using distutils which specifies external packages using: setup( ..., requires = ['Foo (>= 0.7)', 'Bar (>= 2.4.5)'], ... ) When I use pip to install this distribution, I find that it does not automatically install the packages Foo and Ba

RE: Where is the latest step by step guide to use Jython to compilePython into Java?

2012-06-04 Thread Narayanaswamy, Mohan
David, Thanks for the link, here that compilation steps won’t produce java code, but it could create .class file (or jar). Regards Mohan From: David Shi [mailto:davidg...@yahoo.co.uk] Sent: Monday, June 04, 2012 11:35 PM To: Narayanaswamy, Mohan Cc: python-list@python.org Subject

RE: Where is the latest step by step guide to use Jython to compilePython into Java?

2012-06-04 Thread Narayanaswamy, Mohan
, since python types are dynamically identified, not identified during compilation. Regards Mohan From: python-list-bounces+mohan.narayanaswamy-2=sc@python.org [mailto:python-list-bounces+mohan.narayanaswamy-2=sc@python.org] On Behalf Of David Shi Sent: Monday, June 04, 2012 10:36

Re: Python Training

2012-04-07 Thread Mohan kumar
On Apr 7, 2:21 pm, Mohan kumar wrote: > Hi, > We are an IT Training company located in Bangalore, Chennai and > Coimbatore. We provide Python training with Placement Assistance. For > more details, email to mo...@cgonsoft.com We also provide Online Training. -- http://mail.python

Python Training

2012-04-07 Thread Mohan kumar
Hi, We are an IT Training company located in Bangalore, Chennai and Coimbatore. We provide Python training with Placement Assistance. For more details, email to mo...@cgonsoft.com -- http://mail.python.org/mailman/listinfo/python-list

ckjdlkfnl,ndf,nfd,fndfnkdnk mmdlssdlndnll; k; as; lkds sjdsljdlskjdsl; kdslksdl; ddlk

2011-12-25 Thread D. Mohan M. Dayalan
http;//123maza.com/48/moon670/ -- http://mail.python.org/mailman/listinfo/python-list

ckjdlkfnl,ndf,nfd,fndfnkdnk mmdlssdlndnll; k; as; lkds sjdsljdlskjdsl; kdslksdl; ddlk

2011-12-16 Thread D. Mohan M. Dayalan
http;//123maza.com/48/moon670/ -- http://mail.python.org/mailman/listinfo/python-list

combuter is use full message

2011-12-15 Thread D. Mohan M. Dayalan
http;//123maza.com/48/moon670/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Load averages and Python threads on different Linux cloud provider setup

2011-05-31 Thread Mohan
On May 31, 10:22 pm, Chris Angelico wrote: > On Tue, May 31, 2011 at 9:25 PM, Mohanaraj Gopala Krishnan > > wrote: > > Any suggestion on why the load would be a lot higher or how I could > > debug this further is greatly appreciated. > > First off, an easy question: Is system load low and compara

Help on formatting xml document

2010-10-04 Thread Santosh Mohan
Hi, Need help in formatting xml document using xml.doc.minidom I have a raw xml output, I need to format the xml output and write it to a file. rawdata="""Santosh 29 Bangalore """ I would appreciate your help. Thanks, Santosh -- http://mail.python.org/mailman/listinfo/python-list

Re: Python docs disappointing

2009-08-02 Thread Mohan Parthasarathy
style) so that the functions/classes are documented better. At least I am planning to use PythonDoc for the code that I am going to write. Let me know if there is a better one.. -mohan On Fri, Jul 31, 2009 at 1:10 PM, kj wrote: > > > > I'm pretty new to Python, and I like a

Bridging Python and C

2009-07-23 Thread Mohan Parthasarathy
this ? thanks mohan -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling functions: Why this complicated ?

2009-07-14 Thread Mohan Parthasarathy
All named arguments: foo(bar=a, baz=b, qux=c) > - All sequential arguments: foo(a, b, c) > - All sequential arguments, with a few optional arguments given by > name: foo(a, b, c, flag=True, style=qux) - Simple pass-through: foo(*args, **kwargs) > > Granted, there's 4 of the

Calling functions: Why this complicated ?

2009-07-14 Thread Mohan Parthasarathy
naming the arguments, but there are so many other ways here that is very confusing. Do people really use all these features ? Perhaps, there is a equivalent book to "Javascript: Good Parts" for Python ? -thanks mohan -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-28 Thread Mohan Parthasarathy
ten. With Python, that is impossible > because there are no types bound to parameters, so any type that fits is > allowed (duck typing). > I just downloaded the Aptana IDE which has Python support and I have not tried it yet. But I remebered seeing this thread. Has anyone used the Aptana ID

Re: Performance java vs. python

2009-05-19 Thread Mohan Parthasarathy
ned to handle low CPU, memory and power environments. Similarly, Python can also be used to program on Nokia phones etc. Of course programming natively (C/C++) would make a difference in environments where CPU, memory and power are a big constraint. Given the context, do we know how Python compar

Performance java vs. python

2009-05-19 Thread Mohan Parthasarathy
s there any performance comparison between Java and Python ? For example, if I use the J2EE solution vs. python (Django etc.) on the server side, would one perform better over the other ? -mohan P.S: I have changed the subject line to reflect the new thread > > -- > Aahz (a...@pythonc

Circular relationship: object - type

2009-05-14 Thread Mohan Parthasarathy
t and all objects are inherited from object class". Why can't just type be the class from which object class is instantiated ? Why does it have to be a subclass of object also ? Sorry if this has been answered before. Thanks in advance, mohan -- http://mail.python.org/mailman/listinfo/python-list

How to see the code definiton in the shell ?

2009-05-13 Thread Mohan Parthasarathy
? thanks mohan -- http://mail.python.org/mailman/listinfo/python-list

Re: Using with CSV library in Python 2.2!!!

2007-01-09 Thread mohan
[EMAIL PROTECTED] wrote: > mohan> 1. Does Python 2.2 come with CSV library module or not? If yes, > mohan>have I lost it somewhere?? > > As the docs for the csv module indicate, it was new in 2.3. > > mohan> 2. If Python 2.2 does not come with CSV module, is

Using with CSV library in Python 2.2!!!

2007-01-09 Thread mohan
t come with CSV module, is it possible to add the CSV module to the Python root and start working?? 3. If yes, where do I get this module from?? Would be glad to have an answer for these questions. Thanks in advance. Cheers, Mohan. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-15 Thread mohan
n program "ATS.py" will be put in the folder D:\\dSPACE\ATS\ and my modules will be put in other folders inside the folder ATS, D:\\dSPACE\ATS\ Level Regulation, D:\\dSPACE\ATS\ Curve Detection and so on. So, I would like to tell the interpreter to look in to these folders to import the modules. Is that possible??? Regards, Mohan -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-12 Thread mohan
BartlebyScrivener wrote: > mohan wrote: > > > I had created my own modules (.py files) in > > drives and folders other than the python root. > > Probably easiest if you keep them all in one place. Then add that > "place" to your path by going into Contro

How do I edit a PythonWin path to import custom built modules???

2006-12-11 Thread mohan
uld I add a new path to access my own modules. Thanks in advance, Mohan Swaminathan. -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2006-11-06 Thread mohan
Hi Kaushal, Other than "Core Python" by Chun, also try "Python: How To Program" by Dietel & Dietel. It is one of the good books for bigginers. Good Luck, Mohan. On Nov 6, 10:00 am, "kaushal" <[EMAIL PROTECTED]> wrote: > Hi > > How do i star

Simple problem with GUI!!

2006-10-27 Thread mohan
5 2003, 11:29:09) [MSC 32 bit (Intel)] on win32. Portions Copyright 1994-2001 Mark Hammond Please let me know why is this happening and also if I am missing something in the way of programming. Thanks in advance. Cheers, Mohan. -- http://mail.python.org/mailman/listinfo/python-list