View previous topic :: View next topic |
Author |
Message |
dlaroche-ca
Joined: 03 Jul 2013 Posts: 32 Location: Montréal, Québec, Canada
|
Posted: Tue Mar 17, 2015 10:08 pm Post subject: reading/writing to a mailbox |
|
|
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 |
|
 |
jfp
Joined: 12 Jul 2004 Posts: 623
|
Posted: Thu Mar 19, 2015 9:22 am Post subject: |
|
|
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 |
|
 |
dlaroche-ca
Joined: 03 Jul 2013 Posts: 32 Location: Montréal, Québec, Canada
|
Posted: Thu Mar 19, 2015 1:23 pm Post subject: |
|
|
Super, merci beaucoup. |
|
Back to top |
|
 |
|