Overhead of individual python apps

2005-09-27 Thread Qopit
I'm setting up a system that consists of several small python applications that all communicate amongst each other on the same pc. When running in Windows, launching each application generates a process, and each of those processes ends up taking up > 4MB of system memory. This memory usage is as

Re: __call__ in module?

2005-09-27 Thread Qopit
Nope - you can't even force it by binding a __call__ method to the module. For future reference, you can check to see what things *are* callable with the built-in function 'callable'. eg (with sys instead of MyApp): >>> import sys >>> callable(sys) False Also - a thing you can do to sort of do

Re: Overhead of individual python apps

2005-09-28 Thread Qopit
Thanks - this is all very interesting... > Ah, but is that physical memory consumed, or virtual memory MAPPED > to the processes. and > for python, the "private" memory use is usually ~1.5 megabytes for a "empty" > 2.4 > process, and some of that will only occupy space in the paging file... fo

"Compile time" checking?

2005-08-10 Thread Qopit
Hi there, I'm pretty new to Python and am trying to figure out how to get "will this code compile?"-like code checking. To me this is a pretty basic language/environment requirement, especially when working with large projects. It is *much* better to catch errors at "compile-time" rather than at

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> Why not just find out, by trying to compile it? :-) This will likely certify me as a python newbie, but... how do you mean? How do you compile a .py file? If you mean to .pyc by doing an import on it, that may work fine for the simple example I typed up earlier, but that is easy to bypass by s

Re: "Compile time" checking?

2005-08-10 Thread Qopit
How embarassing... thanks, jk. I grabbed a copy of pychecker v0.8.14 directly (not the one in SPE) and it catches it exactly as you showed. Now I wonder why the SPE one doesn't catch it (and why it is sooo comparatively slow)! Now I'm running into another snag when checking some other code I have

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> def tester(a, b, c): > global tester > print "bogus test function", a, b, c > def tester(a, b): > print "other test function", a, b > > tester(1, 2, 3) # This runs fine. > tester(1, 2)# This too. Interesting example. In that case, pychecker does spit out a warning

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> if __name__ == '__main__': Yep - that does it... should have thought of that. Thanks. This works fine for pychecker with no hangage: #--- if __name__ == "__main__": while 1: x = raw_input("meh:") #--- -- http://mail.python.org/mailman/listinfo/python-list

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> if debug: print "v=%s" % (v,) Not that important, but I assume the first one was supposed to be: if debug: print "v=", s right? -- http://mail.python.org/mailman/listinfo/python-list

Suppressing checking of modules with pychecker

2005-08-25 Thread Qopit
Does anyone know how to stop the command line pychecker from analyzing particular modules? It really gets slowed down on some big ones. In particular having 'import wx' takes a long while (30 - 60s). If you try pycheck'ing the program below it takes a while and prints a zillion warnings. #--- i