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 

ImportError: No module named _curses

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



Joined: 15 Jan 2005
Posts: 24
Location: Sooke, BC, Canada

PostPosted: Mon Jul 30, 2012 7:34 pm    Post subject: ImportError: No module named _curses Reply with quote

Hi; I have just installed Python for OpenVMS on OpenVMS Alpha 8.3 (thanks very much, JFP, the install was totally straightforward!). I then tried a simple program using curses:

import curses

myscreen = curses.initscr()
myscreen.border(0)
myscreen.addstr(12, 25, "Python curses!")
myscreen.refresh()
myscreen.getch()
curses.endwin()

but it died with these messages:

Traceback (most recent call last):
File "curse1.py", line 1, in <module>
import cursesmyscreen = curses.initscr()myscreen.border(0)myscreen.addstr(12, 25, "Python curses!")myscreen.refresh()myscreen.ge
tch()curses.endwin()
File "/python_root/lib/curses/__init__.py", line 15, in <module>
from _curses import *
ImportError: No module named _curses

Do you think this is this something I can fix myself?
_________________
Howard Taylor
Badger Consulting
Sooke, BC, Canada
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: Tue Jul 31, 2012 8:43 am    Post subject: Reply with quote

Hi,

The _curses modules is a binding for the C curses C library and if I remember correctly, this module doesn't build on OpenVMS.

But you can use the vms specific library vms.screen or directly the vms.rtl.smg.

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



Joined: 15 Jan 2005
Posts: 24
Location: Sooke, BC, Canada

PostPosted: Tue Jul 31, 2012 11:09 pm    Post subject: Reply with quote

Thanks, JF. I think it's possible that Python curses uses ncurses, which I seem to recall has not been ported to OpenVMS.

vms.screen looks like someone has put a lot of work into it, a big thanks to the authors. Before I start, is there any documentation outside of help (vms.screen) ?

Cheers, Howard
_________________
Howard Taylor
Badger Consulting
Sooke, BC, Canada
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