forum.vmspython.org Forum Index forum.vmspython.org
Forum system
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

reading/writing to a mailbox

 
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> Python for OpenVMS
View previous topic :: View next topic  
Author Message
dlaroche-ca



Joined: 03 Jul 2013
Posts: 32
Location: Montréal, Québec, Canada

PostPosted: Tue Mar 17, 2015 10:08 pm    Post subject: reading/writing to a mailbox Reply with quote

Would someone have an example on how to use the channel returned by vms.starlet.crembx. I tried os.write, os.fdopen to create a file object, but none of them work.

Thanks in advance.
Back to top
View user's profile Send private message Send e-mail
jfp



Joined: 12 Jul 2004
Posts: 618

PostPosted: Thu Mar 19, 2015 9:22 am    Post subject: Reply with quote

A small example:
Code:
from vms.starlet import crembx
status, chan = crembx(lognam="MY_MAILBOX")
f = open('my_mailbox', 'w')
print >>f,'test'
f.close()
f = open('my_mailbox','r')
print f.readline()
f.close()
status = dassgn(chan)


JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dlaroche-ca



Joined: 03 Jul 2013
Posts: 32
Location: Montréal, Québec, Canada

PostPosted: Thu Mar 19, 2015 1:23 pm    Post subject: Reply with quote

Super, merci beaucoup.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> Python for OpenVMS All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group