Building a GUI Toolkit

2010-04-18 Thread Tim Diels

Hi

I was thinking of writing a GUI toolkit from scratch using a basic '2D 
library'. I have already come across the Widget Construction Kit.


My main question is: Could I build a GUI toolkit of reasonable 
performance with the Widget Construction Kit, would it still feel more 
or less lightweight? By reasonable I mean that the user wouldn't think 
of the interface as being slow or unresponsive.


I've also thought of using pyglet to build widgets with, but this would 
seem to be overkill. As a side question: by using opengl, the work would 
be delegated to the GPU rather than the CPU; is this always a good 
thing, or does it have downsides as well (performance, power usage, ...)?


Are there any other libraries that may be of interest to me?

Thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list


Re: Building a GUI Toolkit

2010-04-22 Thread Tim Diels

On 20/04/2010 20:53, Lie Ryan wrote:

On 04/19/10 03:06, Martin P. Hellwig wrote:

On 04/18/10 12:49, Tim Diels wrote:

Hi

I was thinking of writing a GUI toolkit from scratch using a basic '2D
library'. I have already come across the Widget Construction Kit.

My main question is: Could I build a GUI toolkit of reasonable
performance with the Widget Construction Kit, would it still feel more
or less lightweight? By reasonable I mean that the user wouldn't think
of the interface as being slow or unresponsive.

I've also thought of using pyglet to build widgets with, but this would
seem to be overkill. As a side question: by using opengl, the work would
be delegated to the GPU rather than the CPU; is this always a good
thing, or does it have downsides as well (performance, power usage, ...)?

Are there any other libraries that may be of interest to me?

Thanks in advance


It probably depends on how low level you want to go, I have pondered
about the possibility myself to have an all python(ic) gui toolkit,
capable of writing a (x11) windowing manager itself with.
But I decided that using tkinter and just live with its rough corners is
more bang for the buck for me than to reimplement tkinter badly.



Rather than writing a windowing toolkit from the low-level, I would
rather like to see some wrapper for existing windowing toolkit which
uses more pythonic idioms.

Most popular python GUI toolkit currently in use are only a simple thin
wrapper over the library they're wrapping and exposes a lot of the
design considerations of the language that the toolkit was originally
written in. Yes, even Tkinter that comes with the standard lib is a hack
on top of python and looks much more Tcl-ish than pythonic.

I have always had the idea of writing a windowing toolkit wrapper that
creatively uses python features for maximum expressiveness (e.g.
decorator, with-statement, for-each), but never got the time to write
anything like that.


When (or if) I'd finish this low-level gui toolkit, I'd incorporate it 
into my original plans, which were: writing a library that provides the 
programmer with 1 API, yet can display the GUI in a terminal (curses), 
on the desktop(X/win32/...) or in your web browser (DHTML). Terminal 
support would likely be very limited though.


I think I'll go ahead and try to write a wrapper around pyglet and start 
writing some basic widgets.

--
http://mail.python.org/mailman/listinfo/python-list


Python3: API Documentation generator

2010-09-26 Thread Tim Diels

 Hi all

I've just switched to python3 and it turns out my current API 
documentation generator (epydoc) no longer works. I am looking for a 
tool that reads the docstrings of all classes, ... in my project and 
turns it into HTML documentation.


Thanks for your time

limyreth
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python3: API Documentation generator

2010-09-27 Thread Tim Diels

On 27/09/2010 09:02, Chris Rebert wrote:

On Sun, Sep 26, 2010 at 11:56 PM, Tim Diels  wrote:

  Hi all

I've just switched to python3 and it turns out my current API documentation
generator (epydoc) no longer works. I am looking for a tool that reads the
docstrings of all classes, ... in my project and turns it into HTML
documentation.


Sphinx (http://sphinx.pocoo.org/ ) is the new gold standard. You'll
want to enable the `autodoc` extension:
http://sphinx.pocoo.org/ext/autodoc.html

Cheers,
Chris
--
http://blog.rebertia.com


I tried, but it fails to run through python code that's not backwards 
compatible with older python versions.


It fails with: ...autodoc can't import/find module 'pytilities', it 
reported error: "invalid syntax (overload.py, line 55)"...


This is line 55 (runs in python3, not in python):
def process_args(self, *args, kwargs={})

Greetings

Tim (limyreth)
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python3: API Documentation generator

2010-10-24 Thread Tim Diels

On 27/09/2010 20:44, Ken Watford wrote:

On Mon, Sep 27, 2010 at 1:15 PM, Tim Diels  wrote:

On 27/09/2010 09:02, Chris Rebert wrote:

On Sun, Sep 26, 2010 at 11:56 PM, Tim Dielswrote:

  Hi all

I've just switched to python3 and it turns out my current API
documentation
generator (epydoc) no longer works. I am looking for a tool that reads
the
docstrings of all classes, ... in my project and turns it into HTML
documentation.

Sphinx (http://sphinx.pocoo.org/ ) is the new gold standard. You'll
want to enable the `autodoc` extension:
http://sphinx.pocoo.org/ext/autodoc.html

Cheers,
Chris
--
http://blog.rebertia.com

I tried, but it fails to run through python code that's not backwards
compatible with older python versions.

It fails with: ...autodoc can't import/find module 'pytilities', it reported
error: "invalid syntax (overload.py, line 55)"...

This is line 55 (runs in python3, not in python):
def process_args(self, *args, kwargs={})


As far as I'm aware, autodoc works by importing the modules and then
reading doctext straight from the __doc__ attributes.
So the module in question has to import correctly in whatever
interpreter Sphinx is using. You probably need to install Sphinx with
python3 to get it to use the right interpreter. If you're using
easy_install or pip, check if you have an easy_install-3.1 or pip-3.1
(or similar) script installed.


Sorry for the late reaction, but I still have trouble getting sphinx to 
work with python3.


I downloaded the latest version at PyPI:
http://pypi.python.org/pypi/Sphinx/1.0.4

Ran:
python3 setup.py

And it failed with a syntax error at line 50 which happens to be an 
old-styled print statement stating it requires at least py2.4.


I'd find it odd that the python3 documentation would refer to sphinx as 
a good tool if the tool wouldn't support it, so am I downloading the 
wrong package or ...?


Thanks in advance

Greetings

Tim
--
http://mail.python.org/mailman/listinfo/python-list