[ANN] sqlite 0.8.3

2008-11-11 Thread sandro
  ANNOUNCE: sqlkit 0.8.3 

November, 10  2008


I'm happy to announce release 0.8.3 of sqlkit package for python -  the first
public release.

  http://sqlkit.argolinux.org/

The package
---
SQLkit PyGtk package provides Mask and Table widgets to edit database
data. It's meant as a base for database desktop applications.

The application
---
It also provides 'sqledit' a PyGTK application based on sqlkit that can be
used from command line to browse and edit data.

The package has 2 very rich demo suites for sql widgets (the main one in
sqlkit/demo/sql/demo.py) and for layout creation
  
Main features of sqlkit:


  * editor of databases in 2 modes: table & mask
  * based on sqlalchemy: can cope with many different databases
  * very powerfull filtering capabilities:
- each field can be used to filter records
- filter may span relationship
- date filtering possible also on relative basis (good for saved 
  queries)
  * completion on all text field and foreign keys
  * very easy way to draw a layout for mask views
  * completely effortless editing of relationships
  * very easy way to set defaults
  * possibility to display totals of numeric fields
  * any possible sql constraint can be attached to a Mask or a 
Table. It can be expressed a s a normal sqlalchemy query or with 
django-like syntax
  * sqledit: python script to edit db
  

Sqlkit is based on:
---
  * python (>= 2.4) 
  * PyGtk   
  * Sqlalchemy (>= 0.5)
  * glade
  * dateutils


Dowload & more:
---

  * http://docs.argolinux.org/sqlkit/sqlkit/download.html
  * hg clone http://hg.argolinux.org/py/sqlkit
  * google group: http://groups.google.it/group/sqlkit/
  * License: GNU GPL

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


Re: [ANN] SQLkit 0.8.3.2

2008-11-12 Thread sandro
Thorsten Kampe wrote:


>> 
>> I'm happy to announce release 0.8.3 of sqlkit package for python - the
>> first public release.
>
> Are you aware that you announced "sqlite 0.8.3" in the subject??!!
>

Ops, I wasn't aware, just too tired...  thanks for telling.



Anyhow, since I had some problems in the demo I packaged a new
release...


   ANNOUNCE: sqlkit 0.8.3.2

November, 12  2008



I'm happy to announce release 0.8.3 of sqlkit package for python -  the first
public release.

  http://sqlkit.argolinux.org/

The package
---
SQLkit PyGtk package provides Mask and Table widgets to edit database
data. It's meant as a base for database desktop applications.

The application
---
It also provides 'sqledit' a PyGTK application based on sqlkit that can be
used from command line to browse and edit data.

The package has 2 very rich demo suites for sql widgets (the main one in
sqlkit/demo/sql/demo.py) and for layout creation
  
Main features of sqlkit:


  * editor of databases in 2 modes: table & mask
  * based on sqlalchemy: can cope with many different databases
  * very powerfull filtering capabilities:
- each field can be used to filter records
- filter may span relationship
- date filtering possible also on relative basis (good for saved 
  queries)
  * completion on all text field and foreign keys
  * very easy way to draw a layout for mask views
  * completely effortless editing of relationships
  * very easy way to set defaults
  * possibility to display totals of numeric fields
  * any possible sql constraint can be attached to a Mask or a 
Table. It can be expressed a s a normal sqlalchemy query or with 
django-like syntax
  * sqledit: python script to edit db
  

Sqlkit is based on:
---
  * python (>= 2.4) 
  * PyGtk   
  * Sqlalchemy (>= 0.5)
  * glade
  * dateutils


Dowload & more:
---

  * http://sqlkit.argolinux.org/sqlkit/download.html
  * hg clone http://hg.argolinux.org/py/sqlkit
  * google group: http://groups.google.it/group/sqlkit/
  * License: GNU GPL

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


loading modules, metaclasses, chicken & eggs

2008-11-12 Thread sandro
Hi,

   I had two packages working fine toghether: debug and sqlkit. Debug
provides a metaclass just for debuggging purposes to sqlkit (to log
methods following a recipe on ASPN. It worked very well, just logging
depending on the value of a module variable in debug module. That
means module debug and it's variable where to be loaded before sqlkit.



Now I merged the two repos/packages (as I have publicly released them
and I thought it was easied to handle), but so doing:

   from sqlkit import debug

already implies loading  the class I want to log. In fact this class
Is loaded in 

   sqlkit/__init__.py

as it's the main one of the packages


Is there a way to solve this? I'd like ro force a reload of the
metaclass after 'debug'  has been loaded and debug.DBG set to True, 
but that doesn't seem to happen...

Any hints?

sandro
*:-)



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


pygoocanvas binaries for windows?

2008-11-12 Thread sandro
Hi,
  
  I really need binaries for goocanva s for windows. 
  There are plenty of places in innternet of people that tried to
  compile with no success. Have anybody of you managed to get them?

thanks
sandro

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


Re: loading modules, metaclasses, chicken & eggs

2008-11-12 Thread sandro
Aaron Brady wrote:

> On Nov 12, 9:38 am, sandro <[EMAIL PROTECTED] wrote:
>> Hi,
>> Is there a way to solve this? I'd like ro force a reload of the
>> metaclass after 'debug'  has been loaded and debug.DBG set to True,
>> but that doesn't seem to happen...
>>
>> Any hints?
>>
>> sandro
>> *:-)
>>
> http://sqlkit.argolinux.orgttp://sqlkit.argolinux.org
>
> Look at the 'reload' function.
>

That's  exactely what I did but I get the followin error:

Traceback (most recent call last):
  File "/home/misc/src/hg/py/pysia/program.py", line 123, in ore_mask
self.om = SqlMask(Class=Real, **self.meta)
  File "/misc/src/hg/py/sqlkit/sqlkit/widgets/mask/mask.py", line 51, in 
__init__
sqlwidget.SqlWidget.__init__(self, *args, **kw)
TypeError: unbound method __init__() must be called with SqlWidget instance as 
first argument (got SqlMask instance instead)


(SqlMask inherits from SqlWidget)

?

sandro
*;-)
--
http://mail.python.org/mailman/listinfo/python-list


Re: How to create an entry in the "Program menu" of Windows?

2011-02-02 Thread sandro
Alexander Kapps wrote:

> On 01.02.2011 22:43, Diesel wrote:
>>
>> Hi,
>>
>> I'd like to add menu entry in the Program Menu as part of the
>> installation of an application. Is it possible to do that from Python?
>>
>> Any examples or link? I have not been able to find anything with
>> google...
>>
>> thanks in advance
>> s/
>>
>
> AFAIK, the startmenu entries are just .lnk files, placed either in 
> the "All Users" or "Some Specific User" Startmenu directory. I only 
> have a German XP and can't boot it to test at the moment, so I can't 
> give more details, but there are surely registry entries to find the 
> Startmenu location for the current user or for "All Users".
>
> See http://codesnippets.joyent.com/posts/show/529 for an example how 
> to place .lnk files. However, for real deployment, you probably want 
> to use a real installer framework like NSIS for example.
>

Thanks Alexander, in the meanwhile I also found this [1] message that
reports the following snippet that uses module winshell (and win32...):

[1] http://www.mail-archive.com/[email protected]/msg05411.html

import os, sys
import winshell

startup = winshell.startup () # use common=1 for all users
print startup

winshell.CreateShortcut (
 Path=os.path.join (winshell.startup (), "Python.lnk"),
 Target=sys.executable,
 Icon=(sys.executable, 0),
 Description="Python"
)

thanks again
*:-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-07 Thread Sandro Volery
Hey Maruf

> I want to start learning python.
Good for you! Fun times ahead.

> Is learning C essential or not for learning python?
No, I would not say that learning C is essential for learning Python. However, 
C can serve as a great set of fundamentials in programming and understanding 
machines on a low level, such as memory management, etc., which all had to be 
done manually at this time.

It also seems important to note the differences between execution on runtime, 
and compiled languages, but there is many videos / articles that do a better 
job at explaining it than it do.

Best,
Sandro
-- 
https://mail.python.org/mailman/listinfo/python-list


Tkinter & GTK in the same application?

2006-01-08 Thread Sandro Dentella

I need to use tkinter.canvas in a gtk application. Is that any possible. I
guess I should use threads: is there any example of how to start the 2
mainloops? 

Thanks for any possible hint
sandro
*:-)

-- 
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


project-like or plan extension?

2006-01-08 Thread Sandro Dentella

I'd like to find a plan or project-like extension to use in a PyGtk
application. I need very basic functionaluties: time-zooming, possibility to
set tooltip for objects, possibility to move around chunks of a job.

Any ideas?

TIA
sandro

-- 
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


2D canvas for GTK

2006-01-08 Thread Sandro Dentella
I need a (decent) canvas for PyGTK. I used tkinter.canvas with real pleasure
in the past but now I need to use the canvas in a Gtk application. Does
anybody know of one with similar capabilities? It must work on Windows too.
It must be able to produce postscript output.

Thanks

sandro
*:-)

-- 
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 2D canvas for GTK

2006-01-09 Thread Sandro Dentella
Il 2006-01-09, John Bauman <[EMAIL PROTECTED]> ha scritto:
>
> "Sandro Dentella" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
>>I need a (decent) canvas for PyGTK. I used tkinter.canvas with real 
>>pleasure
>> in the past but now I need to use the canvas in a Gtk application. Does
>> anybody know of one with similar capabilities? It must work on Windows 
>> too.
>> It must be able to produce postscript output.
>
> I think that PyCairo might be what you're looking for, at least if you're 
> using gtk 2.8.

No, that's definitely a lower level tool. I need someting that has
rectangles, lines, possibility to move object around, easy bindings, tags
for objects, grouping. All that is already in tkinter.canvas but I need to
use it from a GTK application.

Any other ideas?

sandro
*:-)

-- 
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


psycopg2, gtk and float

2006-06-14 Thread Sandro Dentella
Hi all,

while building an applycation in pygtk I noticed that psycopg2 returns the
floats rouded (eg: 4.123 -> 4.0).

This turns out to be a problem of psycopg2 (psycopg behaves correctly) when
you 'import gtk' !!! It behaves correctly with numeric/decimal, though.

I'm totally clueless. Any hints?

TIA
sandro
*:-)




import gtk
import psycopg2 as ps2

DB = "host=localhost dbname=test user=test port=5432 password=xxx"
conn = ps2.connect(DB)
cursor = conn.cursor()
cursor.executeq("SELECT DISTINCT a_float FROM numbers ")
conn.commit()

rows = cursor.fetchall()
for row in rows:
print row[0]


-- 
Sandro Dentella  *:-)
e-mail: [EMAIL PROTECTED] 
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


lists: += vs. .append() & oddness with scope of variables

2006-03-05 Thread Sandro Dentella
I'd like to understand why += operator raises an error while .append() does
not. My wild guess is the parses treats them differently but I cannot
understand why this depends on scope of the variables (global or class
variables):


a = [0]

class foo(object): 

def __init__(self):
print "a: ", a
# += does not work if 'a' is global
#a += [1]
a.append(2)
print "a= ", a

class bar(object): 

b = [0]

def __init__(self):
print "b: ", self.b
# += *does* work if 'a' is class var
self.b += [1]
self.b.append(2)
print "b= ", self.b


if __name__ == '__main__':
x = foo()
y = bar()

a:  [0]
a=  [0, 2]
b:  [0]
b=  [0, 1, 2]

uncommenting 'a += [1]' would raise:

a:
Traceback (most recent call last):
  File "c1.py", line 26, in ?
x = foo()
  File "c1.py", line 7, in __init__
print "a: ", a
UnboundLocalError: local variable 'a' referenced before assignment

TIA
sandro
*:-)


-- 
Sandro Dentella  *:-)
e-mail: [EMAIL PROTECTED] 
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


beginner question on dinamin buiding of arg list

2006-03-05 Thread Sandro Dentella

I need to build-up an arg list to pass to a function. 

Suppose I have a dictionary:

  opts = { 'user' : 'jack', 'addr' : 'Green Str.'}

and I want to build a cmd line like this:

  select( user='jack', addr='Green Str.' )

I'm clueless...

TIA
sandro
*:-)


-- 
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


__init__.py, __path__ and packaging

2006-05-03 Thread Sandro Dentella

Hi everybody,

I'm trying to fix the packaging of a very simple package, but some problem
show me that I have not well understood the whole mechanism

The structure of my package (some debug functions) is as follows:

python/
`-- dbg/
   |-- __init__.py
   `-- lib
   |-- __init__.py
   |-- debug.py
   `-- gtk_dbg.py


my sys.path includes 'python' and I wanted that the content of debug.py was
simply included by: 'import dbg', so I wrote dbg/__init__.py as follows:

import os
Dir = os.path.dirname(__file__)
__path__ = [os.path.join(Dir, 'lib')]
from debug import *

It seems to work:

python$ python -c 'import dbg; print dir(dbg)'
['DBG', 'Dir', '__builtins__', '__doc__', '__file__', '__name__', \
'__path__', 'caller', 'debug', 'dshow', 'os', 're', 'show_caller', \
'sql_debug', 'sys']

BUT, if I set some variables they are not correctly seen:

import dbg
dbg.DBG = 1


function test included in debug.py raises NameError:

def test():
print DBG

NameError: global name 'DBG' is not defined`

What's happening? DBG seems to be set, as shown by dir(dbg)... any hints?
I'd also accept a hint for a different approch, if it's the case, but I'd
really would also understant this issue

Thanks in advance
sandro
*:-)

--
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: __init__.py, __path__ and packaging

2006-05-04 Thread Sandro Dentella
In comp.lang.python, hai scritto:
> Sandro Dentella wrote:
>> The structure of my package:
>> 
>> python/
>> `-- dbg/
>>|-- __init__.py
>>`-- lib
>>|-- __init__.py
>>|-- debug.py
>>`-- gtk_dbg.py
>> 
>> my sys.path includes 'python' and I wanted that the content of debug.py was
>> simply included by: 'import dbg', so I wrote dbg/__init__.py as follows:
>> 
>> import os
>> Dir = os.path.dirname(__file__)
>> __path__ = [os.path.join(Dir, 'lib')]
>> from debug import *
>
> What you probably want in python/dbg/__init__.py to get values is:
>
>  from dbg.lib.debug import *

This does not work:

   Traceback (most recent call last):
 File "", line 1, in ?
 File "dbg/__init__.py", line 8, in ?
   from dbg.lib.debug import *
   ImportError: No module named lib.debug



>
>> BUT, if I set some variables they are not correctly seen:
>> import dbg
>> dbg.DBG = 1
>> function test included in debug.py raises NameError:
>> def test():
>> print DBG
>> NameError: global name 'DBG' is not defined`
>> 
>> What's happening? DBG seems to be set, as shown by dir(dbg)... any hints?
> You misunderstand modules and python variables.  Each module has a
> dictionary associating the names of its globals and their current
> values.  After:
>  import dbg.lib.debug, dbg.lib.gtk_dbg
> you have four modules:
>  dbg # Corresponds to python/dbg/__init__.py
>  dbg.lib # Corresponds to python/dbg/lib/__init__.py
>  dbg.lib.debug   # Corresponds to python/dbg/lib/debug.py
>  dbg.lib.gtk_dbg # Corresponds to python/dbg/lib/gtk_dbg.py
> Each has its own globals.
> after:
>  dbg.DBG = 1
> the dbg module's global dictionary contains an entry mapping 'DBG' to 1
> after:
>  dbg.DBG = 1+2
> the dbg module's global dictionary contains an entry mapping 'DBG' to 3
>
> In no case will an assignment to a global in dbg cause an assignment to
> anything in dbg.lib.debug.  The "from dbg.lib.debug import *" statement
> can be seen as a module import followed by a fancy multiple assignment,
> where module dbg.lib.debug is first imported, then its globals are
> assigned to globals of the same names in module dbg.

This confirms to me that I'm seriously confused... so I started with a very
simple setup:
$ cat dbg.py
DBG = 1
def test():
global DBG
print DBG

def set():
global DBG
DBG = 3


$ cat m.py
from  dbg import *

test()
#dbg.DBG = 2   ## does not work, no way to assign in module dbg
set()  # this acts in dbg module and sets 'DBG = 3'
test() # test the value of DBG
print DBG


$ python m.py
1
3  # changed by 'set' that was 'imported'
1  # value of local DBG

isn't this contraddicting you words:

> can be seen as a module import followed by a fancy multiple assignment,
> where module dbg.lib.debug is first imported, then its globals are
> assigned to globals of the same names in module dbg.

So: which is the way I can change a value of a package 'imported', only with
a function that sets it? is there a way to assign the value directly?
is there any way to make some introspection of what is really there (in
dbg)?

Thanks angain for any possible hint.

sandro
*:-)



-- 
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: __init__.py, __path__ and packaging

2006-05-05 Thread Sandro Dentella
>   Now, why you couldn't do "dbg.DBG = ..."? Very simple... "from
> module import *" doesn't give you a dbg /module/, it only gives you
> references to each piece inside the module.

  really the reason why I wanted that should probably be solved in other
  ways. I just wanted to split my dbg module in different files but load the
  dbg module in one single operation:

  dbg/
  |-- __init__.py
  |-- lib
 |-- __init__.py
 |-- debug.py
 |-- gtk_dbg.py

  and inside dbg/__init__.py I used "from dbg.debug import *" so that a single 
  'import dbg' could present me the module 'debug' (of course in this simple
  case seems easier to put debug.py directly under dbg, but my main case is
  a much more complex module, with a tree structure that reflects the
  relation between modules that I want to hide to the end user).

  But to summarize, if I use 'from my_module import *' there is no way to reach 
  directly 'my_module' and set a variable there?

Thanks again
sandro
*:-)

> I'm trying to fix the packaging of a very simple package, but some problem
> show me that I have not well understood 
> 
> the structure of my package (some debug functions) is as follows:
> 
> python/
> `-- dbg/
>|-- __init__.py
>`-- lib
>|-- __init__.py
>|-- debug.py
>`-- gtk_dbg.py
> 
> 
> my sys.path includes 'python' and I wanted that the content of debug.py was
> simply included by: 'import dbg', so I wrote dbg/__init__.py as follows:
> 
> import os
> Dir = os.path.dirname(__file__)
> __path__ = [os.path.join(Dir, 'lib')]
> from debug import *
> 
> 
-- 
Sandro Dentella  *:-)
e-mail: [EMAIL PROTECTED] 
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
Hello Marco,
thanks for your reply (and sorry for my late one)

On Jan 6, 9:26 am, Marco Nawijn  wrote:
> On Jan 5, 10:57 am, Sandro Tosi  wrote:
> I am happy to hear that there might be a book on Matplotlib. I am
> using Matplotlib for a while now and find it a very usefull and
> powerfull library for generating graphs. I will try to answer some of
> your questions. I am by no means an expert in the field, so I only
> express my personal experience.

And that's fine, because the audience of the book is people that have
never seen matplotlib and wanted to learn it.

> >> What are you using matplotlib for? I currently use Matplotlib to generate 
> >> a series of graphs that visualise data channels (strain measurements) 
> >> during a structural test. These graphs need to be refreshed about every 4 
> >> seconds. Each of the graphs contains 1 to 6 curves.

Just out of curiosity: how do you refresh those plots? in a loop
closing/opening the figure or clear the figure and replot on it? are
those graphs embedded in an application or are just "shown on screen"?

> >> What are the things you like the most of matplotlib, that you want
>
> to give emphasis to? And why? In general I like the most the fact that
> I can generate high quality publication ready graphs with a consistent
> look with minimal effort.

Indeed, that's one of the reason for its use in so many scientific
environments.

> Further, although the matlab-style commands
> are very usefull I think the class interface is more powerfull. The
> class interface also has a steeper learning curve. So, for me it would
> be very interesting if much emphasis will be on the class interface.

Yes, we will show the "class" interface during the examples, while
showing the difference just for the sake of completeness.

> >> What are the (basic) things that, when you were beginning to use
>
> matplotlib, you wanted to see grouped up but couldn't find? I
> seriously hope the book is not for "dummies",

as already said, this bug is intended to people that knows nothing
about mpl, so an introductory part will begin the book.

> but provides at least a
> significant amount of information on more advanced features of
> Matplotlib.

and we will try to show as much features as possible, even the
advanced one.

> I think the currently available tutorials are sufficient
> to getting started. From my point of view I am very interested in:
>     - Dynamically updating a series of graphs
>     - Configuring layout of graphs (colors, labels, legends, etc.)
>     - Managing dimensions of the figure when you export the figure to
> e.g PNG. For me this is interesting in the sense that if I insert a
> figure in a report/paper, I would like that the fonts used in the
> graph remain proportional to the surrounding text.

Those will be surely in the book :)

> If you need more information please let me know.

Well, whatever comes to mind, please let me know :)

> I wish you good luck!

Cheers,
Sandro
--
http://mail.python.org/mailman/listinfo/python-list


Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
Hi James,
thanks for getting back to me.

On Jan 6, 9:33 am, James Stroud  wrote:
> Sandro Tosi wrote:
> > - what are the things you like the most of matplotlib, that you want
> > to give emphasis to? And why?
>
> The ability to embed a figure (composed of subplots) into a custom
> window is my favorite aspect.

Do you mean embed the figure in an application or simply a figure with
several subplots in it?

> Also: massive configurability of plots,
> event driven plot canvas, antigrain geometry antialiasing are also all
> very important. Additionally the toolbar of standard interactive
> functions and the ability to export plots in a variety of formats are
> also invaluable features.
>
> > - what are the (basic) things that, when you were beginning to use
> > matplotlib, you wanted to see grouped up but couldn't find?
>
> The documentation for basic plot configuration, especially for embedded
> plots, and also tapping into the event model is very weak currently.
> These need the most improvement.

What do you mean by "event model"?

> > - what would you like to see in a book about matplotlib?
>
> A big, huge, gigantic, chapter---no make that 3 chapters--on programming
>   interactivity with the plot canvas.

Big chapters a harder to read. And what exactly do you mean by
"interactivity"?

> > Your suggestions are really appreciated :) And wish me good luck!
>
> Good luck! I can't wait to read your book!

Thanks!

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


Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
Hello Thomas,
thanks for your reply.

On Jan 7, 5:11 pm, Thomas Guettler  wrote:
> Sandro Tosi schrieb:
> > - what are you using matplotlib for?
>
> I use the API to create PNGs from data stored in postgres. Webframework: 
> Django.

Nice, I plan to make some examples of web embedding of mpl, and one of
the frameworks is Django.

> > - what are the (basic) things that, when you were beginning to use
> > matplotlib, you wanted to see grouped up but couldn't find?
>
> The API is not good documented. It was very hard for me to understand
> what was going on the source.
>
> > - what would you like to see in a book about matplotlib?
>
> How to use the API.

Of course we will follow a gradual path, introducing simple apis and
then going deeper in the advanced features. So, if you mean API as
"pyplot.figure()" and so, they'll be covered :)

Thanks,
Sandro
--
http://mail.python.org/mailman/listinfo/python-list


Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
Hi Dotan,

On Jan 11, 10:02 am, "Dotan Cohen"  wrote:
> 2009/1/5 Sandro Tosi :
> > Your suggestions are really appreciated :) And wish me good luck!
>
> I wish you good luck!

Thanks you :)

> I would suggest at least a chapter on _acquiring_ the data that is to
> be plotted using Python to scrape different sources _not_designed_ to
> be scraped. Online webpages come to mind. An example on retrieving,
> for instance, the prices of varying currencies, parsing the HTML
> pages, extracting the data, and then plotting it would be a great
> example for a real worlds usage that show matplotlib as a tool in a
> toolchain, not a means to an end.

Well, a whole chapter to this is a little too much, but such examples
will be presented in the book: we're not going to teach how to program
in Python, but how to use matplotlib, so the data retriving is a
little out-of-scope (or at least border-line), so the code will be in
the examples provided along with the book, but not deeply explained in
the book text.

Thanks,
Sandro
--
http://mail.python.org/mailman/listinfo/python-list


Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
On Sun, Jan 11, 2009 at 18:50, Dotan Cohen  wrote:
> 2009/1/11 Sandro Tosi :
>>> I would suggest at least a chapter on _acquiring_ the data that is to
>>> be plotted using Python to scrape different sources _not_designed_ to
>>> be scraped. Online webpages come to mind. An example on retrieving,
>>> for instance, the prices of varying currencies, parsing the HTML
>>> pages, extracting the data, and then plotting it would be a great
>>> example for a real worlds usage that show matplotlib as a tool in a
>>> toolchain, not a means to an end.
>>
>> Well, a whole chapter to this is a little too much, but such examples
>> will be presented in the book: we're not going to teach how to program
>> in Python, but how to use matplotlib, so the data retriving is a
>> little out-of-scope (or at least border-line), so the code will be in
>> the examples provided along with the book, but not deeply explained in
>> the book text.
>
> The problem with that approach is that you limit your audience to people who:
> 1) Are interested in matplotlab
> -AND-
> 2) Are already familiar with Python

That is exactly the target the editor wants to reach...

> For every AND clause you remove you broaden the book's audience. You
> do not need to rewrite the book on Python programming or programming
> in general, but getting a C or even PHP programmer up to speed on the
> basics of Python as related to matplotlib will make the book much more
> accessible. At a minimum, it will add another valuable chapter to the
> book that can be safely ignored by Python gurus. And you are making
> the book that much more accessible.

I will try to ask this, but they were really clear that knowing python
is a prerequisite of the book readers.

-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
--
http://mail.python.org/mailman/listinfo/python-list


[ANN] sqlkit 0.8.5

2009-01-16 Thread Sandro Dentella
I'm pleased to announce rel 0.8.5 of sqlkit, that adds many improvements.

In this release localization has been added. I'd be very pleased if someone
would like to contribute localization file for any language (but italian).

Changes in this release:

sqlkit 0.8.5 - 16.1.09  

* localization: added localization for numbers and dates
added localization for messages
-- now waiting for translations  ;-)  --
* table: - added a smart way to automatically set dimentions of the
   table based on info retrieved from the database
   (thanks to Pietro Battiston)
 - complete rewrite of the column setup function
 - added a basic multiline cellRenderer
 - grately improved the navigation with Tab that now
   correctly triggers validation/completion
* fields: many improvements in clean_value/validation
* mask: - added handling of comments
- fixed integer/float miniwiget (0 was rendered as  '')
- text now uses gtk.WRAP_WORD
- fixed current_idx was a class attribute not an instance attr
* layout: added check and hints on errors for Panes widgets
* django_syntax: fix in typo
* filters: fixed handlung of boolena & NULL check in related tables
* signals: - record_selected -> record-selected to follow gtk standard
   - added records-displayed
* widgets/layout: added label_map support
* sqlwidget: rationalized menu entries


The package
---
SQLkit PyGtk package provides Mask and Table widgets to edit database
data. It's meant as a base for database desktop applications.

The application
---
It also provides 'sqledit' a PyGTK application based on sqlkit that can be
used from command line to browse and edit data.

The package has 2 very rich demo suites for sql widgets (the main one in
sqlkit/demo/sql/demo.py) and for layout creation
  
Main features of sqlkit:


  * editor of databases in 2 modes: table & mask
  * based on sqlalchemy: can cope with many different databases
  * very powerfull filtering capabilities:
- each field can be used to filter records
- filter may span relationship
- date filtering possible also on relative basis (good for saved 
  queries)
  * completion on all text field and foreign keys
  * very easy way to draw a layout for mask views
  * completely effortless editing of relationships
  * very easy way to set defaults
  * possibility to display totals of numeric fields
  * any possible sql constraint can be attached to a Mask or a 
Table. It can be expressed a s a normal sqlalchemy query or with 
django-like syntax
  * sqledit: python script to edit db
  

Sqlkit is based on:
---
  * python (>= 2.4) 
  * PyGtk   
  * Sqlalchemy (>= 0.5)
  * glade
  * dateutils


Dowload & more:
---

  * http://docs.argolinux.org/sqlkit/sqlkit/download.html
  * hg clone http://hg.argolinux.org/py/sqlkit
  * google group: http://groups.google.it/group/sqlkit/
  * License: GNU GPL


-- 
Sandro Dentella  *:-)
http://sqlkit.argolinux.orgSQLkit home page - PyGTK/python/sqlalchemy
--
http://mail.python.org/mailman/listinfo/python-list


What would you like to see in a book about Matplotlib?

2009-01-06 Thread Sandro Tosi
Hello and Happy 2009!

I received the interesting proposal to author a book on Matplotlib,
the powerful 2D plotting library for Python.

While preparing the arguments list, I'd like to hear even your
opinion, because different points-of-view will lead to a better
product.

Some basic question I'd like to ask are:

- what are you using matplotlib for?
- what are the things you like the most of matplotlib, that you want
to give emphasis to? And why?
- what are the (basic) things that, when you were beginning to use
matplotlib, you wanted to see grouped up but couldn't find?
- what would you like to see in a book about matplotlib?
- what are some those advanced feature that made you yell "WOW!!" ?
- what are the things you'd like to explore of matplotlib and never
had time to do?

Your suggestions are really appreciated :) And wish me good luck!
--
http://mail.python.org/mailman/listinfo/python-list


python/python output buffers

2008-08-15 Thread sandro dentella
Hi,

  I'm having a little problem while using python mode. I'm used to hit
C-c C-c and have a Python Output buffer opened with the output. Now,
on Ubuntu 7.10 and  8.04, C-c C-c sends to the Python buffer that is
not raised in a window. I need to hit C-c C-z to see it.

  First of all I'm puzzled and would like to understand what makes the
difference. I guess is some defaults that changed in the system
configuration.

  What makes the difference between the two behaviors?

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


Re: emacs python modes [was Re: python/python output buffers]

2008-08-15 Thread sandro dentella


>
> This has been the subject of a recent thread here. Emacs now ships with
> a different python mode named python.el. You'll have to manually
> (re)install the original python-mode.el.
>
> HTH

Thanks. I did search for it and got lost in too many different post on
python mode... Now I found it.

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


gtk tooltips and toolbutton

2006-03-29 Thread Sandro Dentella
Hi all,

Why doesn't the tooltip show up in this toolbutton?
Thanks in advance 

  import gtk

  w = gtk.Window()
  T = gtk.Toolbar()
  T.set_show_arrow(False)

  tb = gtk.ToolButton('gtk-refresh')

  tt = gtk.Tooltips()
  tt.set_tip(tb, "tooltip...")

  w.add(T)
  T.add(tb)
  w.show_all()
  gtk.main()



-- 
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list


gtk.spinbutton and set_value

2006-03-29 Thread Sandro Dentella
Hi all,

  why my spinbutton doesn't show '120'?
  why, if I write in a number, it is reset to 0 wen Enter is pressed?

  TYA
  sandro


   import gtk

   w = gtk.Window()
   spin = gtk.SpinButton()
   w.add(spin)
   w.show_all()
   spin.set_value(120)
   gtk.main()


-- 
Sandro Dentella  *:-)
http://www.tksql.orgTkSQL Home page - My GPL work
-- 
http://mail.python.org/mailman/listinfo/python-list