[Tutor] tadaahh! But how to identify zLinux?

Steven D'Aprano steve at pearwood.info
Tue Apr 2 00:42:54 CEST 2013


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 :-)

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:

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.



-- 
Steven


More information about the Tutor mailing list