[Tutor] tadaahh! But how to identify zLinux?

Albert-Jan Roskam fomcl at yahoo.com
Tue Apr 2 12:44:22 CEST 2013


> Subject: Re: [Tutor] tadaahh! But how to identify zLinux?
> 
> On 02/04/13 09:00, Alan Gauld wrote:
>> On 01/04/13 21:04, Albert-Jan Roskam wrote:
>> 
>>> program is supposed to work with zLinux (IBM system Z). But how do I
>>> know that this system is used?
>> 
>> I have no idea what the answer is but I'm curious why you would care?
>> Are you expecting that your code will be run on an IBM mainframe?
> 
> Perhaps he is :-)

Umm, well it'd be cool. And it's also kind of to satisfy my intellectual hunger/curiosity. I had never heard of zLinux before, but now I've read a thing or two about it.
 
> Albert-Jan asks because his package is an interface to an external binary
> library, and the location of that library differs according to the platform:

 
Yes, exactly right. It's cool if it just works for all supported platforms.
 
>https://bitbucket.org/fomcl/savreaderwriter/src/09b9c82406e82d43223d6610ba9cbfbf234b16d4/savReaderWriter/generic.py?at=master
> 
> By the way, I don't know that changing directory is a good idea, if you can
> avoid it at all. I for one would be *extremely* annoyed if, after calling
> what otherwise seems like an innocent library routine, opening files suddenly
> started failing (or worse, the wrong file was opened!) because the current
> directory was different. Even though you do restore the current directory
> when you are done, that makes your routines unsafe for threads.

 
That loadLibrary method has been kind of a challenge. The chdir may very well be only needed on Windows. I'd have to test this (in sofar as I've access to any of these platforms). I like the fact that, under Windows, things work out of the box, without needing to modify PATH.


More information about the Tutor mailing list