mailRe: relax in Windows


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on September 04, 2006 - 09:03:
Yikes, I never realised how many parts of Python were UNIX only.  This
could take a while to sort out.  Thanks for all the help in tracing
down the problematic import statements.  I have specific comments
below.

On 9/4/06, Daniel Perez <daniel.perez@xxxxxxxxxxxxxxxx> wrote:

Edward d'Auvergne wrote: > Here is a patch file which has all the changes I've made to the 1.2 > line of the repository for making relax work under Windows. Don't > worry about the 'docs/latex/infrastruct.tex' file, this was just a few > fixes to the relax manual. > > Edward



Hi Edward,

Thank you and Chris for looking at this window issue.

Windows still resists to relax. I included the changes contained in the
patch file, but after that other error messages came out.
I followed the strategy of commenting out lines, but finally I got an
ImporError message from Phython.
Following I show you the sequence of error messages along with the lines
I commented out each time:




\relax-1.2.6\processes.py", line 24, in ? from popen2 import Popen3 ImportError: cannot import name Popen3

#from popen2 import Popen3





\relax-1.2.6\processes.py", line 36, in ?
     class RelaxPopen3(Popen3):
NameError: name 'Popen3' is not defined

#class RelaxPopen3(Popen3):
#    def __init__(self, cmd, capturestderr=0, bufsize=-1):
#        """Extended Popen3 class."""
#
#        # Run the init function of the Popen3 class.
#        Popen3.__init__(self, cmd, capturestderr, bufsize)




\relax-1.2.6\generic_fns\minimise.py", line 27, in ? from processes import RelaxPopen3 ImportError: cannot import name RelaxPopen3

#from processes import RelaxPopen3




\relax-1.2.6\thread_classes.py from processes import RelaxPopen3 ImportError: cannot import name RelaxPopen3

#from processes import RelaxPopen3

I've commented these previous two import statements from the repository (1.2 line). It essentially removes all the import problems you detailed above. It will unfortunately break the threading code, but as this is broken anyway it's not a current issue. For the developers reading this thread, I've created task #3629 (https://gna.org/task/index.php?func=detailitem&item_id=3629) for resolving this problem.


\relax-1.2.6\prompt\interpreter.py", line 26, in ?
     import readline
ImportError: No module named readline

#import readline




\Python24\lib\rlcompleter.py", line 42, in ? import readline ImportError: No module named readline



Well, my excursion went until here. What do you think? Do you have in
mind some W. alternative to this "Popen3"?


These last two error could be fatal for relax under MS Windows!  The
'readline' module is essential for the relax prompt based interface.
I just looked it up and the Python library documentation says that
it's UNIX only!!!  Without this module there is no prompt based
interface.  It could exist but it would be severely crippled and would
make using relax in Windows very painful.

There may however be a way around the readline problem.  There appears
to be an alternative for MS Windows that you can download from
http://sourceforge.net/project/showfiles.php?group_id=82407&package_id=84552.
If you install this, does the 'readline' import error disappear?
Hopefully there aren't any more UNIX only import statements in relax!

I hope this helps,

Edward



Related Messages


Powered by MHonArc, Updated Mon Sep 04 18:40:31 2006