Jython "Attribute not found"
Question: I'm attempting to use some of the tkinter functionality in JES, on v3.4. But
I'm getting an error after import.

Code begin with this:

    
    
    import Turtle
    import math
    myPen = Turtle.turtle()
    window = Turtle.screen()
    

Returns the error

> The error was:class 'Turtle' has no attribute 'turtle'  
>  Attribute not found.

(Note I'm on the right version (3.4.3) of python for "Turtle" instead of
"turtle")  
`import turtle` gives `The error was: turtle (wrong name: Turtle)`

I tried some troubleshooting in the Python console as recommended by a similar
thread, the results are below. I believe the output should have been
`"turtle.py"` or similar but as you can see, not working.

    
    
    >>> import sys
    >>> sys.path
    ['', 'C:\\Windows\\SYSTEM32\\python34.zip', 'C:\\Python34\\DLLs', 'C:\\Python34\
    \lib', 'C:\\Python34', 'C:\\Python34\\lib\\site-packages']
    >>> import turtle
    >>> turtle.__file.__
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: 'module' object has no attribute '__file'
    >>>
    

Following the path `C:\Python34\Lib` I found there is a folder
`C:\Python34\Lib\turtledemo` containing file `turtle.cfg` but no `turtle.py`  
Also `C:\Python34\DLLs` contains `_tkinter.pyd` (and many others) but no
`_turtle.pyd`

I'm just a student trying to use `turtle` in JES for a project, so I hope this
question makes sense.


Answer: Your problem is that you're looking for a screen in the module. You have to
create a turtle object. That will have a screen attribute. I'm using CPython
3.5 and `import turtle` works.

    
    
    >>> import turtle
    >>> t = turtle.Turtle()
    >>> t.screen
    <turtle._Screen object at 0x10cd25a20>
    

You may have to modify this on your platform.

