I have been having a very strange problem concerning popen2. I have written a test-file that calls popen2 and then prints the results. When I Jythonize this testfile it works perfectly. The code is shown below:

import javaos

x = javaos.popen2("set")

y = x[1].readlines()

print y


I was using this testfile to make sure that I had the correct version of javaos installed. I have a much larger piece of code that uses popen2 in it. Now both the testfile and larger piece of code are being compiled into the exact same directory. When I try to compile my larger piece of code I get the following error:

AttributeError: module 'javaos' has no attribute 'popen2'

I have verified that both of these pieces of code are accessing the same version of javaos (I only have one version of javaos on my machine). The only difference between the way I compile these is that the file that is not working is compiled using the "-d" option. I do not know why this option would break the larger files use of popen2. I have even tried copying the exact code from the testfile into a portion of my larger file and I get the same error! Any help would be greatly appreciated. Thanks in advance.

- Morgan