Re: execute gyrus-python



I haven't seen the gyrus' code in a while, so pick my comments
with a grain of salt.

On Mon, 2008-03-24 at 14:18 -0300, Claudio Saavedra wrote:
> El lun, 24-03-2008 a las 01:14 -0300, Francisco escribió:
> > Hi guys
> > 
> > Why now i can't execute gyrus-python  with?
> > 
> > 	./src/python gyrys.py
> 
> I doubt you could launch gyrus that way (unless you have a python
> executable under src)
> 
> > 
> > it was very simple, now i have to do "make" and "make install". 
> 
> Because we switched to autotools. It may be a little more overhead, but
> one particular advantage of this is that you get to run gyrus installed,
> and you make sure that things work when it's installed, from the
> beginning.

IMVHO, autotools is too painful for a Python program.

distutils (well used) is supposed to be easier and safer:
http://docs.python.org/dist/dist.html

But I saw it was used previously.

setuptools are supposed to be even easier and safer 
than distutils:

http://peak.telecommunity.com/DevCenter/setuptools
http://peak.telecommunity.com/DevCenter/PythonEggs
http://peak.telecommunity.com/DevCenter/EasyInstall

> > and ... what format hast the files? tab width 8?
> 
> If you want to switch to a more appropriate indentation level, feel free
> to patch the sources and file a bug.

The Python Style Code is defined in PEP-8:
http://www.python.org/dev/peps/pep-0008/

For vim, I use:

if has("autocmd")
    autocmd FileType python set shiftwidth=4 tabstop=4 expandtab
    autocmd FileType python set textwidth=79

    autocmd FileType python set foldmethod=indent
    autocmd FileType python let python_highlight_all=1
    autocmd FileType python set encoding=utf-8
    autocmd FileType python set autoindent

    autocmd FileType python set complete+=k/home/gpoo/bin/pydiction isk
+=.,(

    highlight BadWhitespace ctermbg=red guibg=red
    autocmd FileType python syntax match BadWhitespace /\s\+$/
    autocmd FileType python syntax match BadWhitespace /\t\+/
endif

You can get pydiction (for autocomplete) from:
http://www.vim.org/scripts/script.php?script_id=850

And for changing every tab for 4 spaces, just :retab

A patch was filed
http://bugzilla.gnome.org/show_bug.cgi?id=524244

But still is not PEP-8 compliant.

-- 
Germán Poó-Caamaño
Concepción - Chile
http://www.calcifer.org/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]