Prompt window scrolls to wrong position

Developers
2009-07-28
2013-04-26
  • Mervin Beng

    Mervin Beng - 2009-07-28

    I am using the latest (3.11.0) version on ubuntu and windows, and see the following problem:

    In a Python window, if the output of a command is long (eg. os.listdir('.') for a big directory, at the end of the output, the screen not scrolled to the bottom ('>>>') of the panel. From then on, that panel becomes very difficult to use, as the screen is always scrolled up after each command.

    After hunting around the source, I suspect that somehow self.ScrollToLine(....) is not working as expected in drPrompt.py. However self.GoToPos works, and I have implemented this workaround which works for me:

    drPrompt.py, add at line 300, before event.Skip():
             if keycode == wx.WXK_RETURN:
                 self.GotoPos(self.GetCurrentPos())

    This makes the interpreter much easier to use, as the window and cursor will always remain at the bottom of the screen after print output.

     
    • Mervin Beng

      Mervin Beng - 2009-07-28

      Html has gobbled up my spaces. The code should be:

      drPrompt.py, add at line 300, before event.Skip():
      ........if keycode == wx.WXK_RETURN:
      ...........self.GotoPos(self.GetCurrentPos())

       
      • Franz Steinhaeusler

        BTW: I have seen, you show interest (also because of the former postings) in drpyhton. Do you want to become a project member? If so, I can give you svn write access.

         
        • Mervin Beng

          Mervin Beng - 2009-07-28

          You might regret that offer! :)

          I am not so proficient -- only very determined to learn when I see this type of problem.

          We have a batch of students using drPython as a 'beginner's IDE', and I get a little irritated by these little issues. There are many better programmers in the school. For the moment I will check out the latest code, and give it a test drive. I will check if anyone else in the team has been looking into drPython source.

           
          • Franz Steinhaeusler

            Thanks anyway ;) The project is not very active anymore. I have a bunch of bug fixes, which I also want to check in. I add your patch and want to release a 3.11.1 soon.

             
    • Franz Steinhaeusler

      Thanks for your report. Alas, I have not to much time now.  I have also made some changes, and I hope I can check in into svn these and your patches. It would be real time to make a new release. ;)

       
    • Franz Steinhaeusler

      One more thing:

      You said, you are using it on windows and linux, very good. If you adust the default encoding to cp-1252 (on linux, you would have to patch the code for that, because it is not visible and you open then a pyhton interpreter, and type something like print("anything"), on both (windows and linux) drpython crashes. I'm only curious, if that happen also on your pc. It is a very annoying bug for me. I have looked quite a time, but I found no solution for that.

      Just for the info: I haven't heard from out project leader (Dan) much for a long time, so for some coding things, I cannot explain everything. For example not, why cp1252 is on windows, but not in linux for drpython.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks