On Tue, 2004-08-03 at 16:38, Magnus Therning wrote:
> I've almost finished my "translation" to Python of the examples in the
> ORBit Beginners Documentation (v1.6)[1]. The last one is the
> multi-threaded calculator and I am not too sure how useful it'll be to
> do (except for my learning :-) so I've left it for now.
> 
> I would very much like to have some feedback on it all, suggestions for
> improvement are especially welcome.
> 
> Also someone sent me a private email offering some help. Unfortunately I
> lost the email (I have been known to do some aggressive cleaning of my
> inbox at times), I'd love it if you contacted me again.
> 
> You can find the page here:
>  http://magnus.therning.org/pyorbit_beg_exs.html
> 
> These are some of the things I've been pondering, any answers/comments
> are welcome:
> 
>  1. I had a practical problem with putting Python code on a web page (<>
>     got lost) and I went looking for a py2html pretty printer that
>     didn't create outrageous stuff (basically I want something rather
>     low-key, and preferably not full html pages with body-tags and all
>     but rather output that can be included. I found nothing and swapped
>     to texinfo for the moment. Anyone with a solution to the problem?

I haven't used it in a while but enscript does a good job and can output
html. Something like enscript --color --pretty-print=python
--language=html -p [output_file] input_file should give you what you
want.

> 
>  2. (This relates to the NameResolve example) I couldn't get
>     CORBA.ORB_init() to accept sys.argv (and hence I couldn't register a
>     name-service with -ORBInitRef NameService=IOR:... on the command
>     line. I probably made some trivial mistake. Any pointers?
> 
>  3. (This relates to the Factory example) With interfaces like this:
> 
>      module M {
>       interface IA { .. };
>       interface IB { IA createA(); };
>      };
> 
>     and Python classes like this:
> 
>      class myIA(M__POA):
>       ...
> 
>      class myIB(M__POA):
>       ...
> 
>     then myIB.createA() can't be naively implemented like this:
> 
>      def createA(self):
>       return myIA()
> 
>      but has to
>       1. create, and keep an instance of myIA alive
>       2. return that instance's _this()
> 
>      Why is it like this? (I guess it has its positive sides to not have
>      the CORBA server-side representation of an object keep the instance
>      alive, but I can't quite see them.)
> 
>      Anyone with an idea of how to kill the server-side Python instance
>      immediately? (I currently simply remove it from the list (the list
>      is the way I keep the objects alive in the first place) and garbage
>      collection will get around to them, can I make sure it happens
>      sooner?)
> 
> Well, that's it for now. Looking forward to being flooded with responses
> ;)
> 
> /M
> 
> 1. http://www.gnome.org/projects/ORBit2/orbit-docs/orbit/index.html
-- 
Steve McClure <[EMAIL PROTECTED]>

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to