Re: [sqlkit] how to getting started

35 views
Skip to first unread message

Alessandro Dentella

unread,
Jan 31, 2013, 5:56:31 PM1/31/13
to sql...@googlegroups.com
On Thu, Jan 31, 2013 at 02:23:06PM -0800, j...@sferacarta.com wrote:
> Hi all,
>
> I downloaded sqlkit in my ubuntu box but I can not figure out how to start
> I'd like to run the demo and play with it a little but honestly I did not
> understand where to go.
> Can you help me with baby steps? ;)

Sure. Can you tell me if you used the deb package or the the sources?
In both ways you should start just running command 'sqledit' (open terminal
and run sqledit from the prompt).

If it's correctly installed the first window that appears has a button to
launch the demo.

Another possibility is to run sqledit command with arguments, e.g.:

sqledit postgresql://localhost/my_db_name

Then I suggest you read the tutorial here [1]


sandro
*:-)



[1] http://sqlkit.argolinux.org/misc/tutorial.html#sqledit-sqlkit



j...@sferacarta.com

unread,
Feb 1, 2013, 1:39:04 AM2/1/13
to sql...@googlegroups.com


Il giorno giovedì 31 gennaio 2013 23:56:31 UTC+1, sandro dentella ha scritto:

Sure. Can you tell me if you used the deb package or the the sources?


Hi Sandro
,
Thanks for your response to my question.
I'm afraid I do not have installed sqlkit in the right way
because when I run the demo there are only empty windows.
Here's how I installed sqlkit:


Sqlkit on Pypi

Sqlkit is available via Pypi (Python Package Index), so -if you have already installed setuptools that provides the command easy_install- you can install it via easy_install or better pip:

easy_install pip
pip install sqlkit

Beware that that will fail if you don’t already have PyGTK installed.

You can also install directly with easy_install that often will fail understanding already installed packages. Should you have problems with pip you can revert to:

 
 

I also installed  SQLite version 2.8.17 by my own.

j

Alessandro Dentella

unread,
Feb 1, 2013, 6:21:50 PM2/1/13
to sql...@googlegroups.com
On Thu, Jan 31, 2013 at 10:39:04PM -0800, j...@sferacarta.com wrote:
>
>
> Il giorno gioved� 31 gennaio 2013 23:56:31 UTC+1, sandro dentella ha scritto:
>
> Sure. Can you tell me if you used the deb package or the the sources?
>
>
> Hi Sandro,
> Thanks for your response to my question.
> I'm afraid I do not have installed sqlkit in the right way
> because when I run the demo there are only empty windows.
> Here's how I installed sqlkit:
>
> ***** Sqlkit on Pypi *****
> Sqlkit is available via Pypi (Python Package Index), so -if you have
> already installed setuptools that provides the command easy_install-
> you can install it via easy_install or better pip:
> easy_install pip
> pip install sqlkit
> Beware that that will fail if you don�t already have PyGTK installed.
> You can also install directly with easy_install that often will fail
> understanding already installed packages. Should you have problems
> with pip you can revert to:

that doen't seem to be a wrong way to install it. Maybe the installer is not
working properly on yuor system. Can you tell me which OS release are you
using?

sandro
*:-)



--
Sandro Dentella *:-)
http://www.reteisi.org Soluzioni libere per le scuole
http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy



j...@sferacarta.com

unread,
Feb 2, 2013, 11:53:01 AM2/2/13
to sql...@googlegroups.com
KUBUNTU:

cat /proc/version
Linux version 2.6.24-23-generic (buildd@palmer) (gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)) #1 SMP Thu Nov 27 18:44:42 UTC 2008 (Ubuntu 2.6.24-23.46-generic)

cat /proc/issue
Ubuntu 8.04.1

cat /etc/debian_version
lenny/sid

I can not understand where sqlkit was installed (in which directory)
and if I have to working in a specific directory
or if I can run the sqledit  from anywhere.


j


Il giorno sabato 2 febbraio 2013 00:21:50 UTC+1, sandro dentella ha scritto:
On Thu, Jan 31, 2013 at 10:39:04PM -0800, j...@sferacarta.com wrote:
>
>
> Il giorno gioved� 31 gennaio 2013 23:56:31 UTC+1, sandro dentella ha scritto:
>
>      Sure. Can you tell me if you used the deb package or the the sources?
>
>
> Hi Sandro,
> Thanks for your response to my question.
> I'm afraid I do not have installed sqlkit in the right way
> because when I run the demo there are only empty windows.
> Here's how I installed sqlkit:
>
>      ***** Sqlkit on Pypi *****
>      Sqlkit is available via Pypi (Python Package Index), so -if you have
>      already installed setuptools that provides the command easy_install-
>      you can install it via easy_install or better pip:
>      easy_install pip
>      pip install sqlkit
>      Beware that that will fail if you don�t already have PyGTK installed.
>      Beware that that will fail if you don�t already have PyGTK installed.
>      Beware that that will fail if you don�t already have PyGTK installed.

Alessandro Dentella

unread,
Feb 2, 2013, 1:40:06 PM2/2/13
to sql...@googlegroups.com
On Sat, Feb 02, 2013 at 08:53:01AM -0800, j...@sferacarta.com wrote:
> KUBUNTU:
>
> cat /proc/version
> Linux version 2.6.24-23-generic (buildd@palmer) (gcc version 4.2.4 (Ubuntu
> 4.2.4-1ubuntu3)) #1 SMP Thu Nov 27 18:44:42 UTC 2008 (Ubuntu 2.6.24-23.46-
> generic)
>
> cat /proc/issue
> Ubuntu 8.04.1

It's a pretty old release. I'd bet it's completely compatible with sqlkit,
but you need to be sure some python modules are updated. The forst that must
be updated is sqlalchemy and the way you installed should guarantee that...

> I can not understand where sqlkit was installed (in which directory)

Try this:

$ python -c 'import sqlkit; print sqlkit'
<module 'sqlkit' from '/misc/src/hg/py/sqlkit/sqlkit/__init__.pyc'>

> and if I have to working in a specific directory

Nota at all!

> or if I can run the sqledit� from anywhere.

sure you can.

I ca't remember where the demo directory is placed by the installer, but you
can find it with:

locate ex_16_join.py

and you move in the resulting directory.

Another possibility is to download the sources, untar them and go into
directory demo/sql:

wget http://pypi.python.org/packages/source/s/sqlkit/sqlkit-0.9.5.1.tar.gz
tar xzvf sqlkit-0.9.5.1.tar.gz
cd sqlkit-0.9.5.1/demo/sql
./demo.py


sandro
*:-)

j...@sferacarta.com

unread,
Feb 3, 2013, 11:01:15 AM2/3/13
to sql...@googlegroups.com


Il giorno sabato 2 febbraio 2013 19:40:06 UTC+1, sandro dentella ha scritto:
On Sat, Feb 02, 2013 at 08:53:01AM -0800, j...@sferacarta.com wrote:
> KUBUNTU:
>
> cat /proc/version
> Linux version 2.6.24-23-generic (buildd@palmer) (gcc version 4.2.4 (Ubuntu
> 4.2.4-1ubuntu3)) #1 SMP Thu Nov 27 18:44:42 UTC 2008 (Ubuntu 2.6.24-23.46-
> generic)
>
> cat /proc/issue
> Ubuntu 8.04.1

It's a pretty old release.
I know I installed it in January 2009 , more than four years.
This is why I love Linux. You install it and forget about doing it. ;)

 
I'd bet it's completely compatible with sqlkit,
but you need to be sure some python modules are updated. The forst that must
be updated is sqlalchemy and the way you installed should guarantee that...

What was missing
after the installation was the creation of the database
Once I located the file schema.sql
I created my sqlite3 db 'movies' and I loaded with schema.sql
Then I launched sqledit  sqlite :/ / / movies
and now everything seems working


> I can not understand where sqlkit was installed (in which directory)

Try this:

  $ python -c 'import sqlkit; print sqlkit'
  <module 'sqlkit' from '/misc/src/hg/py/sqlkit/sqlkit/__init__.pyc'>

> and if I have to working in a specific directory

Nota at all!

> or if I can run the sqledit� from anywhere.

j...@sferacarta.com

unread,
Feb 5, 2013, 9:21:54 AM2/5/13
to sql...@googlegroups.com

As you suggest I tried this :

wget http://pypi.python.org/packages/source/s/sqlkit/sqlkit-0.9.5.1.tar.gz
  tar xzvf sqlkit-0.9.5.1.tar.gz
  cd sqlkit-0.9.5.1/demo/sql
  ./demo.py

but the result is exactly the same. The main window is emplty all the time.
I edited demo.py and I changed line 139
from:  if opts.test:  
to:      if not opts.test:
then sqledit starts to open all windows with properly data.
Maybe you can figure what happens in this way.

139 if opts.test:
140    start = opts.offset and int(opts.offset) or 0
141    stop = opts.number and start + int(opts.number) or None
142    print start, ':', stop
143    for demo in d.demos[start:stop]:
144        print "------------------ %s %s --------------" % (d.demos.index(demo), demo)
145        try:
146            t = d.load_module(demo)
147            if opts.reload:
148                t.reload()
149        except Exception, e:
150            print e
151            if opts.exit:
152                sys.exit(1)

 

j...@sferacarta.com

unread,
Feb 5, 2013, 9:31:42 AM2/5/13
to sql...@googlegroups.com


Ok, now it works.
You need to run sqledit as root
sudo sqledit works.
j
 
 
Reply all
Reply to author
Forward
0 new messages