PyScripter Hangs

379 views
Skip to first unread message

Dave Berk

unread,
Mar 30, 2008, 4:42:15 PM3/30/08
to PyScripter
Hi all

I've just started experimenting with PyScripter. I'm using ver.
1.9.9.2 with python 2.5.1, and I have a problem.
Just about any file i'm opening - not too long - about 200 lines or so
- hang once every few minutes. Also, I see a crazy spike in the CPU
usage of PyScripter at that time. Any idea what causes this?

Thanks
Dave

PyScripter

unread,
Mar 30, 2008, 6:57:38 PM3/30/08
to PyScripter
Haven't heard of this before. PyScripter is quite fast generally and
of course in opening files. Where are the files located (hard disk,
network?) Is opening the same files by say Notepad fast?
Anyone else has seen this?

Eric S. Johansson

unread,
Mar 30, 2008, 7:07:05 PM3/30/08
to PyScr...@googlegroups.com
PyScripter wrote:
> Haven't heard of this before. PyScripter is quite fast generally and
> of course in opening files. Where are the files located (hard disk,
> network?) Is opening the same files by say Notepad fast?
> Anyone else has seen this?
>
I've seen this with a few applications under windows, usually firefox and
thunderbird. I think it is a windows failure sort of like window's inability to
keep any program out of swap space

--
Speech-recognition in use. It makes mistakes, I correct some.

thynnus

unread,
Mar 30, 2008, 9:51:26 PM3/30/08
to PyScripter
Have not seen anything like that that is specifically b/c of
pyscripter.

On Mar 30, 7:07 pm, "Eric S. Johansson" <e...@harvee.org> wrote:
> ...out of swap space
>
Good guess, Eric.

I'd also place a bet on 'Running out of disk space'

With a small side wager on: 'Many instances of pythonw.exe while
trying to work out debugging GUI scripts'

Way way outside chance: 'Has not turned off NTFS Last Access Time
Update' (I can imagine (only) that could slow down starting a
complicated environment.)

What does task manager say is eating the cycles when it pauses? Try
Process Explorer for a better clue.
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Dave Berk

unread,
Mar 31, 2008, 1:23:05 AM3/31/08
to PyScripter
Nope, nothing like it. I've about 80GB left in my system harddisk and
100GB in my second harddisk. The files are located in the second hard
disk, PyScripter is in the 'c:\program files' directory. I have about
4 pythonw process running in the task manager. One of them is the
Eric4 IDE, with whom I've had no similar problem. Still, I prefer
PyScripter, if I will be able to make it behave.
Anyway, I've narrowed down the problem. It seems that the files are
opened fine.The problem occur when I try to scroll with the mouse. If
I scroll with the arrow keys nothing happens. Also if I scroll with
the mouse it doesn't happen immediately. It takes a few seconds, then
it hangs for a few more seconds, then back again...
I've run Process Explorer. All it's telling me is that usually
PyScripter uses about 1.5% CPU. Then in those few seconds it hangs -
it jumps to a 100%, 98%... I've a dual core P4 machine with 2GB of
memory. I can't imagine what is causing this.

Dave

PyScripter

unread,
Mar 31, 2008, 7:13:26 AM3/31/08
to PyScripter
- Could you please reboot and try again with PyScripter only open?
- Are the files you are opening part of a complex package with many
imports?
- Does the problem happen with a module with no imports?

Dave Berk

unread,
Mar 31, 2008, 9:06:53 AM3/31/08
to PyScripter
Well, you nailed it. Once I remove the import statements (there were
5) the problem's gone. Is it the auto completion acting up? What can I
do to fix it? It's really a shame because so far PyScripter seems like
the best python IDE in terms of speed and convenience..

PyScripter

unread,
Mar 31, 2008, 10:05:22 AM3/31/08
to PyScripter
The simplest thing is to go to Tools, Options, IDE options and disable
"Show code hints".
Instead you could try and add some modules that are hard to parse into
the Special packages (another IDE option).

See the help file about what these options do.

But I would like to know why the code hints cause such a delay. So if
you could come up with a minimum set of files that demonstrates the
issue I would like to have a closer look. It could be a bug in
PyScripter, a bottleneck that can be eliminated, or maybe there are
too many modules to parse and it is just slow.

Dave Berk

unread,
Mar 31, 2008, 10:53:28 AM3/31/08
to PyScripter
I think just about anything with pyglet will do. Anyway try the
example file from here: (script download link at the bottom of the
page)
http://tartley.com/?p=264

Thanks for all the help, PyScripter.

Dave

PyScripter

unread,
Mar 31, 2008, 11:46:08 AM3/31/08
to PyScripter
What is causing the delay is the statement
from pyglet.gl import *

If you do the following in the interpreter
>>> import pyglet
>>> import pyglet.gl
>>> dir(pyglet.gl)
>>> len(_)
you will find that piglet.gl imports around 6000 (!) identifiers

If you add pyglet and pyglet.gl to the special packages (Tools,
Options, IDE options), Code Hints and Code Completion should work
well.


On Mar 31, 5:53 pm, Dave Berk <dave....@gmail.com> wrote:
> I think just about anything with pyglet will do. Anyway try the
> example file from here: (script download link at the bottom of the
> page)http://tartley.com/?p=264

Dave Berk

unread,
Mar 31, 2008, 12:33:10 PM3/31/08
to PyScripter
Thanks again.

Another problem I've noticed, when trying the tutorials from pyglet:
this one, for example:
http://pyglet.org/doc/1.1/programming_guide/subclassing_window.html

When running the script twice in succession (Ctrl-F9) I get weird
exception the second time. As well as getting the usual windows error
screen when coming out of PyScripter.

Regards
Dave

PyScripter

unread,
Mar 31, 2008, 12:47:01 PM3/31/08
to PyScripter
For GUI scripts use the remote interpreter and reinitialize the remote
engine before each run.
Please see http://pyscripter.googlepages.com/remotepythonengines.

Dave Berk

unread,
Mar 31, 2008, 1:00:49 PM3/31/08
to PyScripter
Thanks again. Another quick question. Where can I choose the encoding
for the file? I have an asci file I need to save as a utf-8. How do I
do that?

regards
Dave

PyScripter

unread,
Mar 31, 2008, 2:22:08 PM3/31/08
to PyScripter
If it is a Python file make sure you read http://www.python.org/dev/peps/pep-0263/.
All you need to do is to provide a file encoding comment.

Otherwise
Edit, File Format

Dave Berk

unread,
Apr 1, 2008, 9:00:11 AM4/1/08
to PyScripter
PyScripter, thanks a lot for your help. Now everything's working fine.

Regards
Dave
Reply all
Reply to author
Forward
0 new messages