How to copy the entire outlook message content in python

2020-12-29 Thread nikhil k
Hello All, I'm a beginner trying to achieve the below in my python script: Can anyone help me on this? I'm stuck at step2. 1. Input: A locally saved outlook mail (*.msg) path 2. Go to the path and Copy the entire body of the mail 3. Create a new mail and paste the contents into new mail 4. sen

Fwd: Merge Two List of Dict

2016-12-01 Thread Nikhil Verma
Just editing the count it was from Indian place value notation. -- Forwarded message -- From: Nikhil Verma Date: Thu, Dec 1, 2016 at 12:44 PM Subject: Merge Two List of Dict To: python-list@python.org Hey guys What is the most optimal and pythonic solution forthis situation

Merge Two List of Dict

2016-11-30 Thread Nikhil Verma
Hey guys What is the most optimal and pythonic solution forthis situation A = [{'person_id': '1', 'adop_count': '2'}, {'person_id': '3', 'adop_count': '4'}] *len(A) might be above 10L* B = [{'person_id': '1', 'village_id': '3'}, {'person_id': '3', 'village_id': '4'}] *len(B) might be above 20L*

Network Simulator

2016-02-23 Thread nikhil amraotkar
Hi...I need help to design a network simulator consisting for 5 routers in python...Any help would be appretiated... Thanks.. -- https://mail.python.org/mailman/listinfo/python-list

Re: *.sdf database access

2014-11-21 Thread Nikhil Joshi
On Saturday, April 21, 2012 6:55:55 AM UTC-4, Alex Willmer wrote: > On Apr 19, 9:18 pm, Page3D wrote: > > Hi, I am trying to connect and access data in a *.sdf file on Win7 > > system using Python 2.7. I have three questions: > > > > 1. What python module should I use? I have looked at sqlite3 and

Re: iterating over a file with two pointers

2013-09-18 Thread nikhil Pandey
On Wednesday, September 18, 2013 5:14:10 PM UTC+5:30, Peter Otten wrote: > nikhil Pandey wrote: > > > > > hi, > > > I want to iterate over the lines of a file and when i find certain lines, > > > i need another loop starting from the next of that &quo

Re: iterating over a file with two pointers

2013-09-18 Thread nikhil Pandey
On Wednesday, September 18, 2013 4:51:51 PM UTC+5:30, Chris Angelico wrote: > On Wed, Sep 18, 2013 at 9:12 PM, nikhil Pandey > wrote: > > > hi, > > > I want to iterate over the lines of a file and when i find certain lines, i > > need another loop starting from t

iterating over a file with two pointers

2013-09-18 Thread nikhil Pandey
hi, I want to iterate over the lines of a file and when i find certain lines, i need another loop starting from the next of that "CERTAIN" line till a few (say 20) lines later. so, basically i need two pointers to lines (one for outer loop(for each line in file)) and one for inner loop. How can

Re: Want to learn Python

2013-08-16 Thread Nikhil Bansode
On Thursday, August 15, 2013 7:51:43 PM UTC+5:30, prem kumar wrote: > Hi All, > > > > Presently Iam working with QTP(VBscript)..Now planning to learn PYTHON..Could > you please suggest me like is ti good to learn what is the present condition > for Python in IT Companies.. > > Iam not thinkin

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-17 Thread Rishiyur Nikhil
>If you have trouble getting hold of "The Essence of Algol", ... There seems to be a downloadable copy at: www.cs.cmu.edu/~crary/819-f09/Reynolds81.ps It's in PostScript, which is easily convertible to PDF if you wish. Nikhil On Wed, Apr 17, 2013 at 5:30 AM,

Unconverted data remains

2012-11-08 Thread Nikhil Verma
'Sunday December 9 2012 7:00pm ', 'Friday November 9 2012 6:00pm ', \ 'Friday November 9 2012 7:00pm ', 'Friday November 9 2012 7:00pm '] final_event_time = [datetime.strptime(iterable, '%A %B %d %Y %I:%M%p') for iterable i

How can we covert string into Datetime object

2012-05-11 Thread Nikhil Verma
string let say date_created = '11 May Friday PM ' and i want to convert it into datetime object like this datetime.datetime(2012, 5, 11, 4, 12, 44, 24734) Thanks in advance. Any help will be appreciated -- Regards Nikhil Verma +91-958-273-3156 -- http://mail.python.org/mailman/listinfo/python-list

increment date present list of tuple by weeks python

2012-05-11 Thread Nikhil Verma
Neuropancreatic')('21 May monday AM Neuropancreatic')('28 May monday AM Neuropancreatic'), ('8 May tuesday PM Cardiovascular'),('15 May monday AM Neuropancreatic'),('22 May monday AM Neuropancreatic'),('29 May monday AM Neuropancreatic')] Th

Re:rndom number tweaks

2012-05-09 Thread Nikhil Verma
-- Forwarded message -- From: Chris Angelico To: python-list@python.org Cc: Date: Wed, 9 May 2012 17:44:00 +1000 Subject: Re: tweaking random number On Wed, May 9, 2012 at 5:01 PM, Nikhil Verma wrote: > Hi All > > I want to generate a random number of 8 digits which involve 3 number and

tweaking random number

2012-05-09 Thread Nikhil Verma
like this "Kkrgt56r" Thanks in advance -- Regards Nikhil Verma +91-958-273-3156 -- http://mail.python.org/mailman/listinfo/python-list

Re: return respective values when mutiple keys are passed in dictionary

2012-05-09 Thread Nikhil Verma
Thanks Arnaud List comprehension method really works nicely.sorry for late reply. On Mon, May 7, 2012 at 7:10 PM, Arnaud Delobelle wrote: > On 7 May 2012 12:31, Nikhil Verma wrote: > > HI All > > > > I was clearing my concepts on dictionary and stuck in this

return respective values when mutiple keys are passed in dictionary

2012-05-07 Thread Nikhil Verma
pple' What i want is some i pass keys in get and in return i should have all the values of those keys which i pass. ## mydict.get('a','b','c')###demo for what i want 'apple','boy','cat'### Output i want # -- Regards Nikhil Verma +91-958-273-3156 -- http://mail.python.org/mailman/listinfo/python-list

Re: DateTime objectFormatting

2012-05-02 Thread Nikhil Verma
Thanks On Wed, May 2, 2012 at 8:27 PM, Chris Rebert wrote: > On Wed, May 2, 2012 at 7:49 AM, Nikhil Verma > wrote: > > > def __unicode__(self): > > return "%s %s" % (self.name, self.date_created.strftime("%A %B > %d")) > > > &g

DateTime objectFormatting

2012-05-02 Thread Nikhil Verma
en GI Monday AM, May 7 Pancreas Tuesday PM, May 8 How can achieve AM and PM also ? with this datetime object Thanks in advance -- Regards Nikhil Verma +91-958-273-3156 -- http://mail.python.org/mailman/listinfo/python-list

Re: How to filter a dictionary ?

2012-04-10 Thread Nikhil Verma
my concept which i just forgot. On Tue, Apr 10, 2012 at 12:54 PM, Shashank Singh < shashank.sunny.si...@gmail.com> wrote: > > > On Tue, Apr 10, 2012 at 12:16 AM, Dave Angel wrote: > >> On 04/10/2012 02:04 AM, Shashank Singh wrote: >> > On Mon, Apr 9, 2012 at 10:49

Re: How to filter a dictionary ?

2012-04-09 Thread Nikhil Verma
Thanks Shashank . It worked. On Tue, Apr 10, 2012 at 11:34 AM, Shashank Singh < shashank.sunny.si...@gmail.com> wrote: > > > On Mon, Apr 9, 2012 at 10:49 PM, Nikhil Verma wrote: > >> >> for_patient_type = {37: u'Test', 79: u'Real', 80: u&#

Re: random number

2012-03-26 Thread Nikhil Verma
: > * Nikhil Verma [2012-03-26 08:49]: > > Hi > > > > I want something to achieve like this :- > > > > def random_number(id): # I am passing it from request > > # do something > > return random_number > > > > Output > > > &

Re: random number

2012-03-25 Thread Nikhil Verma
;%06d' % random.randint(0, 99) it gives : '192862' (a string ) Thanks in advance. On Mon, Mar 26, 2012 at 11:47 AM, Daniel da Silva wrote: > If you want it as an int: > random.randint(10, 99) > > Or as a string: > s = '%06d' % random.randint(0, 99) &g

random number

2012-03-25 Thread Nikhil Verma
. Thanks in advance -- Regards Nikhil Verma +91-958-273-3156 -- http://mail.python.org/mailman/listinfo/python-list

make a string a list

2008-05-29 Thread Nikhil
ition. Thanks, Nikhil -- http://mail.python.org/mailman/listinfo/python-list

Re: Using MySQLdb to select into the local file

2008-05-23 Thread Nikhil
John Nagle wrote: Nikhil wrote: I am using the MySQLdb python module. I have a table named 'testing' with few columns, under the 'test' database, what is hosted on a remote mysql server. I want to run the following query to get a comma-separated information from the tabl

Using MySQLdb to select into the local file

2008-05-22 Thread Nikhil
module? I am sorry if this is supposed to go to only MySQL, but not really sure so copying the relevant assumed. Thanks, Nikhil -- http://mail.python.org/mailman/listinfo/python-list

Re: simple way to touch a file if it does not exist

2008-05-21 Thread Nikhil
bukzor wrote: On May 21, 5:10 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: On 22 Mag, 01:15, Nikhil <[EMAIL PROTECTED]> wrote: what are the simple ways? I could think of os.open(), os.exec(touch file) are there any simpler methods? Just use os.path.exists

simple way to touch a file if it does not exist

2008-05-21 Thread Nikhil
what are the simple ways? I could think of os.open(), os.exec(touch file) are there any simpler methods? -- http://mail.python.org/mailman/listinfo/python-list

Re: AttributeError: module object has no attribute

2008-05-20 Thread Nikhil
Marc 'BlackJack' Rintsch wrote: On Tue, 20 May 2008 23:31:15 +0530, Nikhil wrote: Peter Otten wrote: Nikhil wrote: I have recently written a small module. When I import the module, I always get the error only when I do >>> from local.my.module import * -- Tracebac

Re: preserve history in the interactive python

2008-05-20 Thread Nikhil
Nikhil wrote: Hi, I am using python -i, and I find it hard typing/pasting the commands from the previous interactive shell. Basically, is there anyway that I can preserve the history in the shell? I guess but not sure there should be something like ~/.pyrc for configuring such but can

Re: preserve history in the interactive python

2008-05-20 Thread Nikhil
Nikhil wrote: Hi, I am using python -i, and I find it hard typing/pasting the commands from the previous interactive shell. Basically, is there anyway that I can preserve the history in the shell? I guess but not sure there should be something like ~/.pyrc for configuring such but can

preserve history in the interactive python

2008-05-20 Thread Nikhil
know what is the effective environment variable to preserve the history? Thanks, Nikhil -- http://mail.python.org/mailman/listinfo/python-list

Re: AttributeError: module object has no attribute

2008-05-20 Thread Nikhil
Peter Otten wrote: Nikhil wrote: I have recently written a small module. When I import the module, I always get the error only when I do >>> from local.my.module import * -- Traceback (most recent call last): File "", line 1, in AttributeError: 'module'

AttributeError: module object has no attribute

2008-05-20 Thread Nikhil
ile' --- but when I do the below, I do not get any error. -- >> import local.my.module >> -- Any ideas on what could be wrong? Thanks in advance. Nikhil -- http://mail.python.org/mailman/listinfo/python-list

Re: readlines with line number support?

2008-05-14 Thread Nikhil
Arnaud Delobelle wrote: The standard Python way is using enumerate() for i, line in enumerate(fp): print "line number: " + lineno + ": " + line.rstrip() I guess you meant to say : for lineno, line in enumerate(fp): print "line number: " + lineno + ": " + line.rstrip() Thanks. --

Re: readlines with line number support?

2008-05-14 Thread Nikhil
Arnaud Delobelle wrote: Nikhil <[EMAIL PROTECTED]> writes: Hi, I am reading a file with readlines method of the filepointer object returned by the open function. Along with reading the lines, I also need to know which line number of the file is read in the loop everytime. I am sure, th

Re: readlines with line number support?

2008-05-14 Thread Nikhil
Arnaud Delobelle wrote: Nikhil <[EMAIL PROTECTED]> writes: Hi, I am reading a file with readlines method of the filepointer object returned by the open function. Along with reading the lines, I also need to know which line number of the file is read in the loop everytime. I am sure, th

readlines with line number support?

2008-05-14 Thread Nikhil
number of the file. If there is none, do I have to end up using the counter in the loop? fp = open("file", "r") lineno = 0 for line in fp.readlines(): print "line number: " + lineno + ": " + line.rstrip() lineno = lineno + 1 -- Thanks,

Re: list.__len__() or len(list)

2008-05-14 Thread Nikhil
led magic methods for a reason. ;) Christian Thanks for the useful insight. Then why to have __len__() internal method at all when the built-in len() is faster? I heard, in Python3, this internal method is being pruned/renamed to something else? Can someone please shed light here? Thanks. Nikh

list.__len__() or len(list)

2008-05-13 Thread Nikhil
which one is better? and why? __len__() is a built-in function of the list object and is updated along with the list object elements and will be useful incase the list is very huge. len() is an external method again, which may require the processing cycles again. Is it right? -- http://mai

Re: Python for a 10-14 years old?

2005-03-24 Thread nsm . nikhil
i think that if she starts out with HTML or something it would be easier. I feel it is easier to learn computers when you are younger cos I am 14 now and i started at 12 and the journey has been quite easy. If she can handle a proper language like python then you might as well go ahead. -- http:/