Getting "LazyImporter' object is not callable" error when trying to send email using python smtplib

2018-03-26 Thread Sum
Hi, Getting "LazyImporter' object is not callable" error. I have enabled allow less secure app setting in sender gmail. Code : import smtplib from email import MIMEBase from email import MIMEText from email.mime.multipart import MIMEMultipart from email import Encoders import os def send_email(

Re: Getting "LazyImporter' object is not callable" error when trying to send email using python smtplib

2018-03-26 Thread Sum
, Mar 26, 2018 at 6:04 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Mon, 26 Mar 2018 16:47:26 +0530, Sum wrote: > > > Hi, > > > > Getting "LazyImporter' object is not callable" error. I have enabled > > allow less se

How to add values from test steps in pytest excel report

2018-04-27 Thread Sum
Hi, I am using python 2.7 and pytest version 3.2.1 I am using pytest excel plugin to run the pytest and generate test report in excel format. Step to install pytest excel : pip install pytest-excel I am running my pytest test using below : py.test --excelreport=report.xls e_test.py Output Test

How to set/update value in a xml file using requests in python

2018-02-06 Thread Sum J
My xml file is located in local network : http://192.168.43.109/DevMgmt/NetAppsDyn.xml Below is a part content of above xml I want to update : off I want to set value for 'ResourceUI' and 'Port' field in above xml. I have used below code : data = { 'R

Re: [Python-Dev] How to set/update value in a xml file using requests in python

2018-02-12 Thread Sum J
t; You likely will want a PUT or a POST HTTP verb: > https://stackoverflow.com/questions/107390/whats-the- > difference-between-a-post-and-a-put-http-request > > HTH. > > On Thu, Feb 8, 2018 at 12:38 AM, Sum J wrote: > > My xml file is located in

Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Sum J
Below is my code. Here I want to read the "ip address" from s s= ''' Power On Enabled = On State: connected Radio Module: Unknown noise: -097 signalStrength: -046 ip address: 192.168.75.147 subnet mask: 255.255.255.0 IPv4 address configured by DHCP Mac Addr: a

Re: Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Sum J
Thanks Chris :) Its working now. Regards, Sumit On Thu, Feb 15, 2018 at 4:55 PM, Chris Warrick wrote: > On 15 February 2018 at 12:07, Sum J wrote: > > Below is my code. Here I want to read the "ip address" from s > > > > > > s= ''' &g

How to reset system proxy using pyhton code

2018-02-19 Thread Sum J
Hi, I am using below python code (Python 2.7) to reset the proxy of my Ubuntu (Cent OS 6) system, but I am unable to reset the proxy: Code : import os print "Unsetting http..." os.system("unset http_proxy") os.system("echo $http_proxy") print "http is reset" O

Re: Bitstream -- Binary Data for Humans

2018-03-05 Thread sum abiut
Thanks On 6/03/2018 7:13 AM, "Sébastien Boisgérault" < sebastien.boisgera...@gmail.com> wrote: Hi everyone, I have released bitstream, a Python library to manage binary data (at the byte or bit level), hopefully without the pain that this kind of thing usually entails :) If you have struggled w

pymssql

2016-09-08 Thread sum abiut
Hi, i have used pymssql to connet to windows database but i want to be able iterate and only print out some specific fields. here is what i did conn=pymssql.connect(server,username,password,database) cus=conn.cursor() cus.execute("SELECT * FROM glbud ") for row in cus: pr

Re: pymssql

2016-09-08 Thread sum abiut
te_type) the above code it doesn't print out anything and it doesn't give me any error. any assistance will be very much appreciated. On Fri, Sep 9, 2016 at 1:38 PM, Lawrence D’Oliveiro wrote: > On Friday, September 9, 2016 at 12:48:50 PM UTC+12, sum abiut wrote: > &g

Re: pymssql

2016-09-11 Thread sum abiut
Thanks heaps for your comments, manage to get it work using the as_dict` parameter of the `cursor` object, cus=conn.cursor(as_dict=True) cus.execute("SELECT budget_code,budget_description,rate_type FROM glbud") for row in cus: print(row['budget_code'],row['budget_description'],row['rate_type']

mssql date format

2016-09-11 Thread sum abiut
Hi, I am pulling data from an mssql server database and got a date in this format: 733010 please advise what of date is this and how to i convert it to a readable date? i use pyssql to connect to the database and pull data fro the database. thanks in advance, cheers -- https://mail.python.org/m

Re: mssql date format

2016-09-12 Thread sum abiut
code below: import datetime >>> datetime.datetime.fromordinal(733010) >>> >> datetime.datetime(2007, 11, 30, 0, 0) On Mon, Sep 12, 2016 at 12:15 PM, MRAB wrote: > On 2016-09-12 01:37, sum abiut wrote: > >> Hi, >> I am pulling data from an mssql server da

Julian date to calendar date conversion

2016-09-12 Thread sum abiut
Hi, how to convert julian date to a calander date cheers -- https://mail.python.org/mailman/listinfo/python-list

Re: Julian date to calendar date conversion

2016-09-12 Thread sum abiut
Thanks On Tue, Sep 13, 2016 at 12:37 PM, MRAB wrote: > On 2016-09-13 02:12, sum abiut wrote: > >> Hi, >> how to convert julian date to a calander date >> >> Have a look at the jdcal module on PyPI: > > https://pypi.python.org/pypi/jdcal > > -- > ht

julian 0.14 library

2018-04-03 Thread sum abiut
Hi, Has anyone try this https://pypi.python.org/pypi/julian/0.14 i got this error trying to import julian >>> import julian Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/julian/__init__.py", line 1, in from julian.julian import to_jd

Re: julian 0.14 library

2018-04-04 Thread sum abiut
4, 2018 at 12:24 PM, sum abiut wrote: > >> Hi, > >> Has anyone try this https://pypi.python.org/pypi/julian/0.14 > >> > >> i got this error trying to import julian > >> > >>>>> import julian > >> Traceback (most recent call la

jilian to Gregorian date conversion error

2018-04-24 Thread sum abiut
(rate.columns.date_applied)) sum, -- https://mail.python.org/mailman/listinfo/python-list

Re: jilian to Gregorian date conversion error

2018-04-24 Thread sum abiut
Thanks date example is 736788 in julian On Wed, Apr 25, 2018 at 12:34 PM, Dennis Lee Bieber wrote: > On Wed, 25 Apr 2018 00:55:39 +0100, MRAB > declaimed the following: > > > >Also, the integer is interpreted as a "proleptic Gregorian ordinal", not > >a Julian date. > > You didn't p

Re: jilian to Gregorian date conversion error

2018-04-25 Thread sum abiut
did it like this rate.columns.date_applied.between(covert,convert1) where convert and convert1 are the range of date cheers, On Thu, Apr 26, 2018 at 4:47 AM, Dennis Lee Bieber wrote: > On Wed, 25 Apr 2018 13:43:15 +1100, sum abiut > declaimed > the following: > > >Than

Re: jilian to Gregorian date conversion error

2018-04-29 Thread sum abiut
e template. appreciate any assistances. cheers, On Sun, Apr 29, 2018 at 2:39 AM, Dennis Lee Bieber wrote: > On Thu, 26 Apr 2018 15:43:43 +1100, sum abiut > declaimed > the following: > > >ok so i have fixed that using the for loop > > > >result_proxy=connection.exe

Re: web facing static text db

2016-05-01 Thread sum abiut
Django is an excellent framework. you can use it with sqlite. cheers On Sat, Apr 30, 2016 at 7:17 PM, Gordon Levi wrote: > "Fetchinson ." wrote: > > >Hi folks,go > > >I have a vo ery specific set of requirements for a task and was > >wondering if anyone had good suggestions for the best set of

How to print out html tags excluding the attributes

2019-07-20 Thread sum abiut
I want to use regular expression to print out the HTML tags excluding the attributes. for example: import re html = 'Hitest test' tags = re.findall(r'<[^>]+>', html) for a in tags: print(a) the output is : But I just want the tag, not the attributes -- https://mail.python.or

Re: SQLObject 3.3.0

2017-05-07 Thread sum abiut
Thanks for the info On Mon, May 8, 2017 at 1:25 AM, Oleg Broytman wrote: > Hello! > > I'm pleased to announce version 3.3.0, the first stable release of branch > 3.3 of SQLObject. > > > What's new in SQLObject > === > > Features > > > * Support for Python 2.6 is decl

converting Julian date to normal date

2017-06-05 Thread sum abiut
i am using python,and django as my web framework. I use sqlalchemy to connect to MSSQL data that is running Epicor database. Epicor is using julian * date. How to you convert julian date to normal date* *cheers,* -- https://mail.python.org/mailman/listinfo/python-list