Onscreen IDE & dynamic instant update [_v0.5.4_]

Hey, i am having some trouble running it (using panda few days newer(buildbot) than 1.7.1) on windows.

This is code that i use to run it, it should be ok?

codepad.org/v33SNdmL

And this is error that i get.
pasteall.org/pic/show.php?id=10680
Its probably sometahing on my part, but i am not quite sure what could it be…

Ok, i seem to have found out whats causing that bug.
If i create file in directory which has python packages in it(dirs with init.py) it will cause freeze/crash.
if i rename init.py ide launches file correctly but then imports wont work…

game(DIR)
    main.py
    code(DIR)
        __init.py__
    data(DIR)

That layout will cause crash.

It clearly failed in importing InteractiveInterpreter :

from code import InteractiveInterpreter

Module code here is \Python26\lib\code.pyc, so python tried to import InteractiveInterpreter from your own code.py module, which doesn’t exist.

No, i dont, i have “code” directory/py module in my dir. If you want, i can send you simple zip with project tree which fails to run with your IDE.
dl.dropbox.com/u/14000546/errors.7z
here it is, you can try and rename init.py inside code directory.

That’s the problem. Python already has code module, so you should never create your own module/package with the same name.

Oh thank you very much! :slight_smile:
Renamed directory to gameCode, and it aworks now!

I also have one idea/feature request :slight_smile:
Display current scope level (maybe even in separate wx window, or at some side panel or increase number of rows in statusbar).

So once when you mouse cursor is in some place, it would read something like this
any other code for example inside init() method would not be visible in hierarchy view

global
  class World():
    def init(self):
      for i in range(5):
        if i==1:
          #this IF is dummy!
          !!!Here you are!!!
    

It would be like code view, but with everything where your mouse cursor is not automatically folded (this could be used for code navigation easily). It would also inform you of bad indentation.

If its too much work, maybe its a lot easier just to show where you are currently in status bar?

so status bar would have text like:
if i==1: #this IF is dummy!
and commentar would be different color :slight_smile:

EDIT1: Oh nvm, i didnt knew before that there is notification on changing scope level. You can pretty much ignore last request.

So you want to fold all code blocks except the one on which the cursor is ?

Yeah, but not in main window/panel, but somewhere at side, basically it is code browser which also shows you where are you currently working. But as i see now that there is notification when you change depth/nesting/scope, it is not that much needed :slight_smile:

How can i change amount of time for which will that notification be active?

What notification are you talking about ?
This one ?
[Onscreen IDE & dynamic instant update [_v0.5.4_])

When you are writing code and you change your nesting level, it shows marker line if line which changes nesting (class, def, for, when, if,…) is on screen, and if it is not on screen, it pops notification showing you where you are.

For example if you have class World(), and it has 20 methods, and you go to newline while writing last one and press Backspace cursor will go one tab back (i use tabs) and it will draw marker up to start of function/method you are writing, and if you press Backspace once more, it will show start of class World() and couple of first lines in it.

And nvm, i got used to that notification time, so i dont need to change it :slight_smile:

Ah i am once more amazed by your IDE :slight_smile:
Awesome work!

So yes it’s what you’re talking about.
I don’t call it notification, but indentation notch close up view. :smiley:

Nobody else does this but me, right ? :laughing:

If you want to change the duration, it’s in IDE_drawIndentHelperLine() in IDE.py, the Wait( .8 ).

ynjh_jo:

I noticed that the last post on this thread and plugin was April of this year. Are you still supporting this plugin at all? I just wanted to know before I downloaded it and tried it

Yes of course.

[size=150][v0.5][/size]
[X]
fixed uncaught mouse-up event if there is a menu when mouse was down
[X] fixed Create New File to be available also when there is no open file :astonished:
[X] fixed Open File without selecting any file
[X] exit response on normally closing the P3D window is now limited only in certain modes
[X] caret blink now stops if there is any menu or onscreen dialog
[X] split TextDrawer extension’s Windows binaries & source code from IDE code package, so it can be downloaded separately based on your P3D version
[X] improved software upgrade system
[X] added selection by Shift + mouse-down
[X] added Preferences button to the rightmost of status bar
[X] added onDestroy argument to PopupMenu class and onMove argument to DropDownMenu class
[X] added supported display resolutions list to choose from, if fullscreen toggle fails

Hello.

I’m trying to run the IDE with the sample dyn1.py I get the following output:

STARTING IDE.....
Traceback (most recent call last):
  File "IDEmini.py", line 47, in <module>
    FILE_SRV = IDEFileSrv.FileServer()
  File "/home/colinn/Documents/tanks/pysrc/ide/IDEFileSrv.py", line 9, in __init__
    self.bind(('', PORT))
  File "/usr/lib64/python2.7/asyncore.py", line 335, in bind
    return self.socket.bind(addr)
  File "/usr/lib64/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
OverflowError: getsockaddrarg: port must be 0-65535.

Is there something wrong with my Python configuration?

Looks like PY2.7 yells if the port number isn’t in 16bit (0-65535) range. Just change the PORT variable in IDEFileSrv.py between 49152-65535.

I downloaded everything just as you said. I extracted everything into the same folder and tried to run IDE_STARTER it just didn’t do anything. No response at all

How did you run it ?
What’s the OS ?

I’m using windows 7 64bit. I started the program by double-clicking IDE_STARTER. Then, when nothing happened I also tried right-click -> “open with” -> pythonw and right-click -> “open with” -> python. In general Panda3d runs fine. I’m using aptana, no troubles there

Is there any error message ?
Could you post the console output here ?

Running it in the console there’s an error message that says:

File "...IDE_STARTET.pyw", line 86
    print f
          ^
SyntaxError: invalid syntax

I’ve looked at the code and you’re making a call to print without braces. I’ve added the braces and ran it again. There was a similar error, this time in line 116. I added all the missing braces in the code and finally had this output:

File "...IDE_STARTET.pyw", line 5, in <module>
ImportError: No module named pandac.PandaModules

[/code]