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 

Python 2.5 and ODS-2

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



Joined: 26 Oct 2005
Posts: 8

PostPosted: Fri Sep 22, 2006 3:07 pm    Post subject: Python 2.5 and ODS-2 Reply with quote

I have installed the PYTHON250 V1.10-0 kit on an ODS-5 volume.

When I try to import a script that resides on an ODS-2 volume I get:
ImportError: No module named <myScript>

This was no problem with version 2.3.5, has something changed here?
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 633

PostPosted: Mon Sep 25, 2006 6:07 pm    Post subject: Reply with quote

I was not aware of this problem,
I have reproduce Embarassed
I will take a look and try to find a fix.
This was a bug introduce by the startup speed fix...

Is it a big problem?

Sorry for the inconvenience.


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



Joined: 26 Oct 2005
Posts: 8

PostPosted: Tue Sep 26, 2006 10:44 am    Post subject: Reply with quote

We have an environment for development, test and production with a mixture of ODS-2 and ODS-5 volumes on all machines.

I'm afraid we cannot use the new version of Python until it can
import modules on ODS-2 volumes.

Dag
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 633

PostPosted: Tue Sep 26, 2006 1:03 pm    Post subject: Reply with quote

A workaround would be to do
$ define PYTHONCASEOK 1

before running any script which import module from an ODS2 volume.

After reviewing the code, I think that the current behaviour is the correct one.

In 2.3.5 this will probably work for module which are only lower case, and probably don't work on a module like Foo. I can't test because I haven't an enough old 2.3 installed.

using PYTHONCASEOK you will, probably, be able to restore the old behaviour and this will work for any module name, Foo, foo, FOO, etc...

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



Joined: 26 Oct 2005
Posts: 8

PostPosted: Tue Sep 26, 2006 1:18 pm    Post subject: Reply with quote

Yes, it seems to solve the problem! Very Happy

The other day I experimented with PYTHON_EFS_CASE_PRESERVE
and PYTHON_EFS_CASE_SPECIAL, but they didn't make any difference.

Thanks for the tip!

Dag
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 633

PostPosted: Tue Sep 26, 2006 1:46 pm    Post subject: Reply with quote

Very Happy

In the next version I will do this automatically for ODS2 volume, I think it's not very difficult.
PYTHON_EFS_* are just wrapper for the corresponding decc$* feature.

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



Joined: 12 Jul 2004
Posts: 633

PostPosted: Wed Oct 18, 2006 10:08 am    Post subject: Reply with quote

The problem is fixed in the new version: PYTHON250 V1.11-0

If the imported module is stored on an ODS-2 volume no case validation are done, so you don't have to define PYTHONCASEOK, on an ODS-5 volume the standard behaviour is unchanged.

JF
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