Re: How to use python to register a service (an existing .exe file)

2010-03-01 Thread Eman
On Feb 15, 4:10 pm, News123  wrote:
> Hi,
>
> Is there a python way to register new windows services.
>
> I am aware of the
> instsrv.exe program, which can be used to install services.
> I could use subprocess.Popen to call
>
> instsrv.exe "service_name" program.exe
>
> but wondered, whether there's already an existing function.
>
> Thans in advance and bye
>
> N


Try my favorite 3rd pary tools maker, Chilkatsoft.com.
http://www.chilkatsoft.com/refdoc/pythonCkServiceRef.html

Eman_No1
-- 
http://mail.python.org/mailman/listinfo/python-list


Help on Reading Attached Image on Excel

2009-07-30 Thread eman
Anyone know how to read included images in Excel using Python?

I've tried xlrd and pyexcelerator, but i couldn't figure out how to do
it.

If anyone has experience in this, please help.

Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help on Code logic to remove duplicate mails from webapp mail box

2019-10-30 Thread eman banerjee
On Wednesday, 30 October 2019 12:40:06 UTC+5:30, eman banerjee  wrote:
> Hi
> 
> I am working on a project where we make connections to webapp mail and 
> extract subject, sender,body etc from mails and save it in dataframe and 
> insert it n SQL DB.
> 
> My next challenge is to remove any duplicate mails from mailbox.
> Could you kindly help me.
> It can be a new mail which is entering the mailbox is first checked , if its 
> a duplicate email,it will not be inserted to mail box
> 
> 
> Thanks





code is below




class EmailAnalysis:

'''Method help to communicate with outlook''' 

def emailExchangeCredentials(self):
try:
cipher = Fernet(b'***')
account_details = b'*'
user_details = b''
sec_details = b'*'
account_details_decrypt = 
cipher.decrypt(account_details).decode('utf-8')
user_details_decrypt = cipher.decrypt(user_details).decode('utf-8')
sec_details_decrypt = cipher.decrypt(sec_details).decode('utf-8')
credentials = Credentials(user_details_decrypt, sec_details_decrypt)
account = Account(account_details_decrypt, credentials=credentials, 
autodiscover=True)
return account
except:
account = 'Failure'
return account




def createDBConn(self):
cipher = Fernet(b'*')
ip = b'***'


port = 
service_name = b'*'
attuid = b'**'
password = b''
ip_decrypt = cipher.decrypt(ip).decode('utf-8')
service_name_decrypt = cipher.decrypt(service_name).decode('utf-8')
attuid_decrypt = cipher.decrypt(attuid).decode('utf-8')
password_decrypt = cipher.decrypt(password).decode('utf-8')
dsn_tns = ora.makedsn(ip_decrypt, port,service_name_decrypt)
conn = ora.connect(attuid_decrypt,password_decrypt,dsn_tns)
return conn

def extractEmail(self, account, Email_Data, conn):

self.Email_Data = Email_Data
SUBJECT = []
SENDER = []
JOB_NAME = []
EMAIL_DATE = []
EMAIL_BODY = []
REMEDIATION_ID = []
PRIORITY = []
i = 0

to_folder = account.inbox / 'Read-Mail'
cursor = conn.cursor()
#print("Type...:",type(account.inbox.all()))
for item in account.inbox.all().order_by('-datetime_received')[:20]:
if len(item.sender.email_address.split('*.com'))>1:
if len(item.subject.split('GREEN'))<2:


SUBJECT.append(item.subject)



SENDER.append(item.sender.email_address) 

find_Job = item.sender.email_address.split('@')
job_name = find_Job[0]
JOB_NAME.append(str(job_name))
   
   
#print("Date time received: ",item.datetime_received.date())
EMAIL_DATE.append(item.datetime_received.date())
date = item.datetime_received.date()
date_ = date.strftime('%Y-%m-%d')
print("Date:",date_)
  


soup = BeautifulSoup(item.body)
email_body_unfor = soup.get_text()
#print("Emain Body Ori:- ",email_body_unfor)
email_body_unfor_arr = email_body_unfor.split('-->')
if len(email_body_unfor_arr) > 1:
email_body_unfor_foot = email_body_unfor_arr[1]
#print("Emain Body Ori2:- ",email_body_unfor_foot)
email_body_unfor_sp_arr = 
email_body_unfor_foot.split("This message is for the designated recipient only")
if len(email_body_unfor_sp_arr) > 1:   
email_body_unfor_sp = email_body_unfor_sp_arr[0]
#print("Emain Body Ori3:- ",email_body_unfor_sp)
email_body_1 = email_body_unfor_sp.strip()
email_body_2 = email_body_1.rstrip()
email_body = email_body

A Question about Python

2014-05-06 Thread doaa eman


hello;
I'm a researcher from Cairo University (Information science Dep.)
i want to know how can i use Paython language on CiteULike
i need to use it for extracting only tagged articles in the field of medicine 
for example for my Ph.D research.
another question please :
can this webpage help me 
citeulike_api 0.1.3dev : Python Package Index
 
 citeulike_api 0.1.3dev : Python Package Index
a python api for http://citeulike.org/  
View on pypi.python.org Preview by Yahoo  
thanks for your time and i hope u can help me in that
Eman Ali-- 
https://mail.python.org/mailman/listinfo/python-list