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 

Mailbox read/write

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



Joined: 21 Dec 2004
Posts: 2

PostPosted: Tue Dec 21, 2004 2:15 pm    Post subject: Mailbox read/write Reply with quote

Hi there!

First of all I would like to say a big thank you for porting Python to VMS. My favourite programming language on my favourite operating system. Great job!

Secondly, I would like to ask you about handling mailboxes. As far as I see the crembx routine is in the starlet, so I'm able to create mailbox from my python code. But there is no qio so I must handle mailboxes with the RMS or through the built in file object.

In my program I would like to use timeout. If there is no response in the mailbox in time my program should stop the read and continue with the next request comming from other source.

Any ideas how to do this?

Thx,
Istvan Zoltan Toth
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 633

PostPosted: Tue Dec 21, 2004 5:45 pm    Post subject: Reply with quote

Hi,

Thanks for your interest for Python and OpenVMS Very Happy

QIO routine is a fairly complex, so I have never build the interface, it is on my todo list, but as nobody had neveer requested such feature... It has not a very high priority.

As you have done, you can use the built in file object but, you are right, there is no timeout parameter.

I think the simpler is to write a small C module which export a read method with timeout.
It is, now very easy to do this, and the source kit contains many modules build like this.

There is a template module example, or you can use SWIG.

If you want I can help you to do this.

Regards,

Jean-François
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tiz



Joined: 21 Dec 2004
Posts: 2

PostPosted: Wed Dec 22, 2004 1:50 pm    Post subject: Reply with quote

Hi,

unfortunatelly I have DEC C 6.2 and Python.h says I need 6.5 to compile it. Theoretically we have 6.5 license but HP has some confusion about where that license is. Sad

Is it possible to compile external modules with 6.2?

bye,
tiz
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 633

PostPosted: Wed Dec 22, 2004 2:03 pm    Post subject: Reply with quote

Hi,

Quote:
Is it possible to compile external modules with 6.2?

Probably,

This test was added because some of the Python source files (socket?) don't compile.
But for a external module, thids can work.

So, remove the offending test in Python.h, then try to build a minimal module. I think this can work.


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



Joined: 30 Jun 2010
Posts: 3

PostPosted: Wed Jun 30, 2010 8:42 pm    Post subject: Reply with quote

I have been working on a small extension module to handle reading and writing to mailboxes using QIO and QIOW. Its not entirely complete at this time, but it's been working well for my uses so if anyone would like a copy of this I could find a place to post it.
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 633

PostPosted: Thu Jul 01, 2010 8:54 am    Post subject: Reply with quote

Sure, you can send me a zip file with you module, I will take a look and put your routines it in the vms.starlet module.

Thanks,
Jean-François
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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