Re: [Python] come passare un dizionario come argomento ad uno script python

2009-03-16 Thread Gian Mario Tagliaretti
2009/3/16 federica fanzago :

ciao Federica.

> d=sys.argv[1]
> print d.keys()

d=eval(sys.argv[1])

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] come passare un dizionario come argomento ad uno script python

2009-03-16 Thread Gian Mario Tagliaretti
2009/3/16 Daniele Varrazzo :

ciao Daniele,

> mi fai un favore? provi a lanciare
>
> test1.py "__import__('shutil').rmtree('~')"

mm preferirei di no, tu che dici?

> ciao ai tuoi file!

Bisogna sempre prendere le cose senza esagerare, i contesti dove
l'applicazione gira possono essere tendenti all'infinito.

Analizzando la domanda in oggetto direi che il software in oggetto non
girerà nè in un server di produzione nè sarà dedicato ad un ampia
platea di utilizzatori.

Passare un dizionario (da analizzare/utilizzare) ad una linea di
comando è comunque una progettazione del software che non sta in piedi
in un contesto produttivo, quindi mi auguro che qui si stia trattando
di uno script per giocare.

Nel caso remoto in cui non fosse così, consiglio vivamente all'op di
ripensare alla progettazione.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] come passare un dizionario come argomento ad uno script python

2009-03-16 Thread Gian Mario Tagliaretti
2009/3/16 Daniele Varrazzo :

ciao Daniele,

[iper snip]

Scusa lo snip mega galattico ma condivido tutto quello che hai scritto
quindi non spreco byte per quotarti. ("spreco" in senso buono eh)

Faccio ammenda per la leggerezza, in effetti avrei dovuto scrivere
"puoi far così" ma non metterlo in produzione ed il perchè.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [Announce] PyGooCanvas 0.14.0

2009-03-17 Thread Gian Mario Tagliaretti
I am pleased to announce version 0.14.0 of the Python bindings for Goocanvas.

It is available at:

http://download.gnome.org/sources/pygoocanvas/0.14/

The bindings are updated with the new Goocanvas API

PyGooCanvas 0.14.0  (Mar 17 2009)
==

 o Update the docs with new goocanvas API and some random fixes (Gian Mario)
 o Add an export SVG function in the demo (Gian Mario)

Blurb:
==

Goocanvas [1] is a canvas widget for GTK+, It is similar in many ways
to  FooCanvas, hence the name, but it uses cairo for rendering, it has
an optional  model/view split, and uses interfaces for items & views
(so you can easily turn any application object into a canvas item or
view).

PyGooCanvas is a wrapper which exposes the goocanvas API to the
python world.  It is fairly complete; most of the API are covered.

The documentation is done, anyway bug reports on docs are really
important to improve the documentation.

Like the GTK+ library, PyGTK and GooCanvas itself PyGooCanvas is
licensed under  the GNU LGPL, so is suitable for use in both
free software and proprietary applications.

PyGooCanvas requires:
=

 o Goocanvas >= 0.14
 o PyGObject >= 2.10.1 (2.11.3 to build the docs)
 o PyGTK >= 2.10.4 (2.12.0 to use gtk.Tooltip)
 o PyCairo >= 1.4.0

Bug reports should go to
http://bugzilla.gnome.org/browse.cgi?product=pygoocanvas

[1] http://live.gnome.org/GooCanvas

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] Pygtksourceview 2.6.0

2009-03-21 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.6.0 of the Gtksourceview Python bindings.

Once the mirrors have sync correctly it will be available at:

http://ftp.gnome.org/pub/GNOME/sources/pygtksourceview/2.6/

The bindings are updated with the new Gtksourceview API

News in 2.6.0
=

  o new stable release

Blurb:
==

gtksourceview is a library that provides a widget for source code display
and editing, derived from Gtk's TextView, and used by gedit and nemiver,
among others.

gtksourceview has recently been released 2.6.0

PyGtksourceview requires:
=

 o Gtksourceview >= 2.3.0
 o PyGObject >= 2.15.2
 o PyGTK >= 2.8.0

Bug reports should go to:
http://bugzilla.gnome.org/browse.cgi?product=pygtksourceview

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] nome dei computer in rete

2009-04-03 Thread Gian Mario Tagliaretti
2009/4/3 Giorgio Zoppi :

> http://docs.python.org/library/socket.html e una gethostbyname del
> modulo socket.

Dai anche un'occhiata a questa recipe del python cookbook:
http://code.activestate.com/recipes/52302/

Peccato che l'autore della recipe sia già sposato :D

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] licenze GUI

2009-04-17 Thread Gian Mario Tagliaretti
2009/4/17 danielita :

> PyQT (LGPL),

se non ricordo male PyQt è GPL e non LGPL

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] licenze GUI

2009-04-20 Thread Gian Mario Tagliaretti
2009/4/20 danielita :

> -PyGtk
>  Linux e Windows, può essere utilizzata anche sul Mac installando però un
> Xserver.

*NIX like, Windows e Mac OSX, per quest'ultimo c'e' un porting nativo
che non riechiede l'installazione di X ma dalle ultime info che ho
sentito non è ancora stabile al 100% (anche se usabile).

stai facendo un pò di confusione tra Linux (sarebbe GNU/Linux) Unix e
*nix like, li hai citati un pò ovunque ed in maniera diversa, per fare
uno schema corretto dovresti uniformare il linguaggio che utilizzi.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Python e ms access

2009-04-22 Thread Gian Mario Tagliaretti
2009/4/22 Enrico 'Henryx' Bianchi :

>> Il risultato non cambia, non riesco a creare una tabella in un db ms
>> access!

> Di tutta la storia, non ho capito una cosa: perche` usi Access?

uhm... io sarei più interessato sul perchè non dovrebbe usarlo.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGobject 2.17.0 - unstable

2009-04-30 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.17.0 of the Python bindings for GObject.

The new release is available from ftp.gnome.org as and its mirrors
as soon as its synced correctly:

 http://download.gnome.org/sources/pygobject/2.17/

What's new since PyGObject 2.16.1?
- Write a good part of the docs for gio (Gian)
- Wrap g_mount_guess_content_type g_mount_guess_content_type_finish
  g_mount_guess_content_type_sync (Gian, #580802)
- Swap first two arguments of gio.File.query_info_async (Paul, #580490)
- Fix a crash in pyg_type_add_interfaces (Paul, #566571)
- Remove an empty structure, use sizeof(PyObject)
  instead (Paul, #560591)
- Wrap four g_get_user_*_dir() functions (Paul, #575999)
- Remove 'ltihooks.py' as using deprecated Python module (Paul)
- Code maintenance: add .gitignore files (Paul)
- CellRendererPixbuf stock-size property has wrong type (Paul, #568499)
- Add a doap file after git migration (Johan Dahlin)
- missing dep on libffi in pygobject-2.0.pc (Götz Waschk, #550231)
- g_volume_monitor_tp_new new function, return the singleton object.
  (Paul, #555613)
- Remove a DeprecationWarning under python 2.6 (James Westby, #573753)
- several scripts from codegen directory are not distributed
  (Krzesimir Nowak)
- g_file_copy_async change argument order to keep it consistent with the
  other methods (Gian)
- memory leak in gio.File.copy_async (Paul Pogonyshev, #578870)
- g_file_monitor should accept None for cancellable and set the default
  flag to G_FILE_MONITOR_NONE (Gian)
- pyg_notify_free needs to ensure it has GIL before calling Py_XDECREF
  (Jonathan Matthew)
- Wrap g_file_set_display_name_async (Gian)
- Add a semi-private method to return the option context C object from
  an option context wrapper (Tristan Hill)
- Converting a negative long Python value to a GUINT64 GValue doesn't
  error out as it should (Gustavo J. A. M. Carneiro, #577999)
- Wrap g_file_set_attributes_async and
  g_file_set_attributes_finish (Gian)
- g_file_query_filesystem_info_async fix a typo (Gian)
- Wrap g_file_query_filesystem_info_async (Gian)
- Add missing g_file_query_filesystem_info_async and
  g_file_query_filesystem_info_finish (Gian)
- Wrap g_file_eject_mountable (Gian)
- g_file_copy callback cannot be optional (Gian)
- Swap various kwargs names to reflect the code (Gian)
- Update the address of the FSF (Tobias Mueller, #577134)
- Add g_volume_should_automount (Gian)
- Wrap g_drive_enumerate_identifiers and g_volume_enumerate_identifiers
  (Gian)
- Add a couple of convinence functions to convert from/to a python list
  and an array of strings (Gian)
- Allow setting pytype wrapper class (Mark Lee, John Ehresman, #559001)
- Wrap g_file_enumerator_close_async (Gian Mario Tagliaretti)

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyGTK, PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GObject library itself PyGObject is licensed under the
GNU LGPL, so is suitable for use in both free software and proprietary
applications.  It is already in use in many applications ranging
from small single purpose scripts up to large full
featured applications.

PyGObject requires glib >= 2.14.0 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.16.0.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGTK 2.15.0 - unstable

2009-05-02 Thread Gian Mario Tagliaretti
A new unstable development release of the Python bindings
for GTK+ has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

   http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.15/

Blurb:

GTK+ is a toolkit for developing graphical applications that run on
systems such as Linux, Windows and MacOS X. It provides a comprehensive set
of GUI widgets, can display Unicode bidi text.  It links into the Gnome
Accessibility Framework through the ATK library.

PyGTK provides a convenient wrapper for the GTK+ library for use in
Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GTK+ library itself PyGTK is licensed under the GNU LGPL, so is
suitable for use in both free software and proprietary applications.  It
is already in use in many applications ranging from small single purpose
scripts up to large full features applications.

What's new since 2.14.1?
   - Update pygtk to use numpy instead of Numeric
  (Josselin Mouette, Brian Cameron, #397544)
- Update the address of the FSF (Tobias Mueller, #577154)
- Wrap gtk_builder_add_objects_from_string and
  gtk_builder_add_objects_from_file.
- Add GTK+ 2.16 API (Gian)
- wrap gtk.IconView.convert_widget_to_bin_window_coords (Gian)
- add gtk.gdk.Window.redirect_to_drawable (Gian)
- add GtkNumberUpLayout enum (Gian)
- some method argument fixes (Gian)
- add gtk.PrintSettings.[get|set]_number_up_layout (Gian)
- Some demo fixes (Gian, Andi Albrecht)
- Add various deprecation warnings (Gian Mario)

PyGTK requires GTK+ >= 2.8.0 and Python >= 2.3.5 to build.

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGoocanvas 0.14.1

2009-05-10 Thread Gian Mario Tagliaretti
I am pleased to announce version 0.14.1 of the Python bindings for Goocanvas.

It is available at:

http://download.gnome.org/sources/pygoocanvas/0.14/

The bindings are updated with the new Goocanvas API

PyGooCanvas 0.14.1  (May 10 2009)
==

 o Fix a segfault due to an API change in PycCairo (Gian Mario)
 o Autogenerate the ChangeLog from git logs (Gian Mario)
 o Fix the build when using libtool 2.x (Gian Mario)
 o Make the required changes after the switch to git (Gian Mario)

Blurb:
==

Goocanvas [1] is a canvas widget for GTK+, It is similar in many ways
to  FooCanvas, hence the name, but it uses cairo for rendering, it has
an optional  model/view split, and uses interfaces for items & views
(so you can easily turn any application object into a canvas item or
view).

PyGooCanvas is a wrapper which exposes the goocanvas API to the
python world.  It is fairly complete; most of the API are covered.

The documentation is done, anyway bug reports on docs are really
important to improve the documentation.

Like the GTK+ library, PyGTK and GooCanvas itself PyGooCanvas is
licensed under  the GNU LGPL, so is suitable for use in both
free software and proprietary applications.

PyGooCanvas requires:
=

 o Goocanvas >= 0.14
 o PyGObject >= 2.10.1 (2.11.3 to build the docs)
 o PyGTK >= 2.10.4 (2.12.0 to use gtk.Tooltip)
 o PyCairo >= 1.8.0

Bug reports should go to
http://bugzilla.gnome.org/browse.cgi?product=pygoocanvas

[1] http://live.gnome.org/GooCanvas

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGobject 2.18.0 - stable

2009-05-24 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.18.0 of the Python bindings for GObject.

The new release is available from ftp.gnome.org as and its mirrors
as soon as its synced correctly:

http://download.gnome.org/sources/pygobject/2.18/

What's new since PyGObject 2.17.0?
- Improve gio docs with some more classes (Gian)
- Wrap gio.OutputStream.splice_async() (Gian)
- Add Python ver into installed libpyglib name (Emilio Pozuelo Monfort)
- Wrap gio.OutputStream.flush_async() (Gian)
- Use 'Requires.private' for libffi in '.pc' files (Josselin Mouette)
- Add wrapper for gio.FileAttributeMatcher (Gian)
- Mark relevant glib.IOChannel methods as METH_NOARGS (Paul)
- Retire hand-written ChangeLog; autocreate from Git history (Paul)
- Wrap gio.InputStream.skip_async() (Gian)
- Add in codegen -n --namespace option and the code to remove dll
  API in headers, added documentation (Siavash Safi)
- Properly mark glib.get_user_special_dir() as a keywords method (Paul)

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyGTK, PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GObject library itself PyGObject is licensed under the
GNU LGPL, so is suitable for use in both free software and proprietary
applications.  It is already in use in many applications ranging
from small single purpose scripts up to large full
featured applications.

PyGObject requires glib >= 2.14.0 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.16.0.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGTK 2.15.1 - unstable

2009-05-24 Thread Gian Mario Tagliaretti
A new unstable development release of the Python bindings
for GTK+ has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

  http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.15/

Blurb:

GTK+ is a toolkit for developing graphical applications that run on
systems such as Linux, Windows and MacOS X. It provides a comprehensive set
of GUI widgets, can display Unicode bidi text.  It links into the Gnome
Accessibility Framework through the ATK library.

PyGTK provides a convenient wrapper for the GTK+ library for use in
Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GTK+ library itself PyGTK is licensed under the GNU LGPL, so is
suitable for use in both free software and proprietary applications.  It
is already in use in many applications ranging from small single purpose
scripts up to large full features applications.

What's new since 2.15.0?
- (Add HSV support to gtk.gdk.Color objects)
- Add floating-point support to gtk.gdk.Color (Paul)
- Retire hand-written ChangeLog; autocreate from Git history (Paul)
- Fix conditional in docs/Makefile.am (Frederic Peters)
- Document that gtk.gdk.GC coordinates are not related to allocation (Paul)
- Make pygtk_boxed_unref_shared() also handle Py_None (Paul)
- Make gtk.MenuItem.set_submenu accept None (Paul)
- Don't run 'fixxref.py' if documentation is not built (Björn Lindqvist)
- Apply libtool 2.2 compatibility patch (Gian)
- Plug reference leak on main signal watch source (Paul)
- Add extra warning against accidental misuse of tree model columns (Paul)
- Wrap gtk.Border attributes and constructor (Mariano Suárez-Alvarez)
- Make gtk.gdk.Event.time accept 'long' in assignments (Paul)
- Wrap gtk.RcStyle attributes (Paul)

PyGTK requires GTK+ >= 2.8.0 and Python >= 2.3.5 to build.

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Proprio IP

2009-06-11 Thread Gian Mario Tagliaretti
2009/6/11 castor91 :
> non ho capito.. ;( un esempio??

http://alastairs-place.net/netifaces/

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Proprio IP

2009-06-11 Thread Gian Mario Tagliaretti
2009/6/11 Giorgio Zoppi :
> 2009/6/11 Gian Mario Tagliaretti :

>> http://alastairs-place.net/netifaces/

> Si, ma se e' sotto NAT cambia.

vero, lui è sotto NAT?

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Proprio IP

2009-06-11 Thread Gian Mario Tagliaretti
2009/6/11 Gian Mario Tagliaretti :
> 2009/6/11 Giorgio Zoppi :
>> 2009/6/11 Gian Mario Tagliaretti :
>
>>> http://alastairs-place.net/netifaces/
>
>> Si, ma se e' sotto NAT cambia.
>
> vero, lui è sotto NAT?

minchia che bestia che sono, l'aveva anche scritto :)

-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Debugger visuale

2009-06-14 Thread Gian Mario Tagliaretti
2009/6/14 Giorgio Zoppi :

Giorgio,

> Esiste un debugger visuale stile ddd per python?

puoi usare ddd con pydb, basta che lo lanci

gia...@urano:~$ ddd --pydb sample.py

Copyright © 2001 Universität des Saarlandes, Germany.
Copyright © 2001-2004 Free Software Foundation, Inc.
(/home/gianmt/sample.py:1):  
1 import gtk
(Pydb)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Debugger visuale

2009-06-18 Thread Gian Mario Tagliaretti
2009/6/18 Giorgio Zoppi :

> se conoscete qualcosa sarebbe carino.

ddd + pydb non ti vanno bene?

> Inoltre devo evitare codice GPL.

come mai se posso chiedere?

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGTK 2.15.2 - unstable

2009-06-21 Thread Gian Mario Tagliaretti
A new unstable development release of the Python bindings
for GTK+ has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

 http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.15/

Thanks to Paul Pogonyshev who has done all the hard job preparing this release.

Blurb:

GTK+ is a toolkit for developing graphical applications that run on
systems such as Linux, Windows and MacOS X. It provides a comprehensive set
of GUI widgets, can display Unicode bidi text.  It links into the Gnome
Accessibility Framework through the ATK library.

PyGTK provides a convenient wrapper for the GTK+ library for use in
Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GTK+ library itself PyGTK is licensed under the GNU LGPL, so is
suitable for use in both free software and proprietary applications.  It
is already in use in many applications ranging from small single purpose
scripts up to large full features applications.

What's new since 2.15.1?
- Rename gtk.Statusbar.remove() to gtk.Statusbar.remove_message (Paul)
- Allow pango.Context creation (Paul, #550855)
- Make gtk.gdk.Pixbuf.add_alpha accept integers, retaining backward
  compatibility accepting also chars (Paul, #586094)
- Protect window obj from GC in gtk.window_get_toplevels (Gustavo, #574259)
- Plug huge number of memory leaks in Pango wrappers (Paul)
- Add gtk.gdk.WINDOWING constant (Paul, #555112)
- Wrap gdk_pixbuf_apply_embedded_orientation (Chris Wilson)
- Modernize constructors of seven more types (Paul)
- Don't free a string we don't own (Paul, #585458)
- Some docs tweaking (Gian)

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGobject 2.19.0 - unstable

2009-08-11 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.19.0 of the Python bindings for GObject.

The new release is available from ftp.gnome.org as and its mirrors
as soon as its synced correctly:

http://download.gnome.org/sources/pygobject/2.19/

What's new since PyGObject 2.18.0?
- Add macros to help with Python list to/from GList/GSList conversions.
  (John Finlay)
- GIO docs practically completed (Gian)
- GFileInfo.list_attributes should accept None/NULL (Gian)
- Strip out Windows DLL API macros (John Finlay)
- Document that many functions got moved gobject -> glib (Paul)
- Allow h2def.py to work when there are tabs or multiple spaces after
  the struct keyword. (Murray Cumming)
- Fix build when builddir is not the same as srcdir
  (Theppitak Karoonboonyanan)
- Make gio.Emblem constructor new-style (Paul)
- Cleanup GIO overrides to use Python function/method names (Paul)
- Make codegen report errors using Python function/method names (Paul)
- Fix object type in gio.BufferedInputStream_fill_async (Gian)
- Wrap gio.BufferedInputStream.fill_async (Gian)
- Add gio.BufferedOutputStream which was forgotten in the types (Gian)
- Split overrides for gio.MemoryOutputStream (Gian)
- Wrap gio.memory_input_stream_new_from_data (Gian)
- Introduces the girepository module from the former PyBank
  (Simon van der Linden)
- Add API appeared in 2.20 but not marked as such in gio docs (Gian)
- Wrap gio.FileOutputStream.query_info_async (Gian)
- Wrap gio.FileInputStream.query_async (Gian)
- Install executable codegen parts with executing permissions (Paul)
- Wrap gio.DataInputStream.read_line_async and read_until_async (Paul)
- Fix gio.OutputStream.splice_async (Paul)
- Add GIO 2.20 API and update docs (Gian)

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyGTK, PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GObject library itself PyGObject is licensed under the
GNU LGPL, so is suitable for use in both free software and proprietary
applications.  It is already in use in many applications ranging
from small single purpose scripts up to large full
featured applications.

PyGObject requires glib >= 2.14.0 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.16.0.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyPoppler 0.10.1

2009-08-13 Thread Gian Mario Tagliaretti
I am pleased to announce version 0.10.1 of the Python bindings for Poppler.

It is available at:
http://launchpad.net/poppler-python/trunk/development/+download/pypoppler-0.10.1.tar.gz
md5: 146ecb7e1049dd9b92478d61c148829e

PyPoppler 0.10.1 (Aug 13 2009)
==

o Support for accessing Action fields (Daniel Jacobs)
o Bug #397850 AnnotMapping/Annot implementation incomplete (Gian)
o Update configure.ac to work with libtool 2.x (Gian)
o Update aclocal.m4 (Gian)
o Ignore some more files automatically created by libtool (Gian)

Blurb:
==

Poppler[1] is a PDF rendering library based on the xpdf-3.0 code base.

PyPoppler is a wrapper which exposes the poppler API to the
python world.  It is fairly complete, most of the API are covered.

The documentation is actually missing, help wanted :)

Like the Poppler library itself, PyPoppler is licensed under  the GNU GPL.

PyPoppler requires:
=

 o Poppler >= 0.10.0
 o PyGObject >= 2.10.1
 o PyGTK >= 2.10.0
 o PyCairo >= 1.8.4

Bug reports should go to
https://launchpad.net/poppler-python

[1] http://poppler.freedesktop.org/

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGTK 2.16.0 - stable

2009-08-28 Thread Gian Mario Tagliaretti
A new stable release of the Python bindings for GTK+ has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

  http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.16/

Blurb:

GTK+ is a toolkit for developing graphical applications that run on
systems such as Linux, Windows and MacOS X. It provides a comprehensive set
of GUI widgets, can display Unicode bidi text.  It links into the Gnome
Accessibility Framework through the ATK library.

PyGTK provides a convenient wrapper for the GTK+ library for use in
Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GTK+ library itself PyGTK is licensed under the GNU LGPL, so is
suitable for use in both free software and proprietary applications.  It
is already in use in many applications ranging from small single purpose
scripts up to large full features applications.

What's new since 2.15.2?
- Allow to use automake 1.11 (Paolo Borelli)
- Remove compiler warnings (Gian)
- Add gtk.gdk.CURRENT_TIME constant (Paul)
- Fix gtk.IMContext().set_client_window() (Gian)
- Some docs fix (John Finlay)
- Fixed invocation of FileChooserDialog in print demo (Pietro Battiston)
- Some autotools tweaks (Gian)
- Fix arg parsing format typo for gtk_toggle_button_new (John Finlay)
- Update some docs to the new 2.16 API (Gian)

PyGTK requires GTK+ >= 2.8.0 and Python >= 2.3.5 to build.

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] Problema con simplejson

2009-09-08 Thread Gian Mario Tagliaretti
Sto usando httplib2 per comunicare con un RESTful webservice che mi
restituisce una stringa in formato json

il problema è che se passo la stringa direttamente a simplejson
quest'ultimo si schianta sul decode

ValueError: No JSON object could be decoded

Inizialmente pensavo che il problema fosse la stringa non valida, così
l'ho sparata nella shell, copiata/incollata in un file e così funziona
senza problemi.

Allora ho fatto andare la stringa direttamente in un file e provato
ancora a fare il parse aprendo quest'ultimo, così non funziona :\

Credo che il problema possa essere (ma non ci posso credere) nell'EOL,
il webservice ritorna CRLF, mentre il copia incolla (ovviamente) LF.

Ho anche provato a sostituire al volo CRLF con LF (\r\n -> \n) ma
comunque non funziona.

Qualcuno che ci si è già schiantato su un problema del genere?
Probabilmente è una cavolata ma non ne vengo fuori....

Ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Problema con simplejson

2009-09-09 Thread Gian Mario Tagliaretti
2009/9/9 Daniele Varrazzo :

ciao Daniele,

> Si può avere questo file e uno script di 3 righe che mostri il problema?

devo ammettere che mi aspettavo la domanda :)

purtroppo non posso metterlo in lista perchè contiene dati sensibili
della mia azienda nonchè il mio token di autenticazione, posso però
inviartelo in email se non ti scoccia una mail privata naturalmente.

ciao, grazie
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Problema con simplejson

2009-09-09 Thread Gian Mario Tagliaretti
2009/9/9 Daniele Varrazzo :

> Non mi scoccia ma, una volta che il tuo json è sul file, penso non sia
> difficile "anonimizzare" il file, sostituendo il token e gli altri dati
> sensibili con delle x o qualcosa del genere.

grazie della disponibilità Daniele, il problema era il BOM all'inizio
dello stream (grazie a C8E per la dritta in chat), rimosso e funziona.

'\xef\xbb\xbf{\r\n  "?xml": {\r\n"@version": "1.0",\r\n ..

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGobject 2.20.0 - stable

2009-09-23 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.20.0 of the Python bindings for GObject.

The new release is available from ftp.gnome.org as and its mirrors
as soon as its synced correctly:

   http://download.gnome.org/sources/pygobject/2.20/

What's new since PyGObject 2.19.0?
- Allow to use automake 1.11 (Paolo Borelli)
- Specify programming language in .devhelp file (Frédéric Péters)
- Plug reference leak of GSource in pyg_main_loop_init (Paul)
- Updated uninstalled.pc file (Brian Cameron)

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyGTK, PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GObject library itself PyGObject is licensed under the
GNU LGPL, so is suitable for use in both free software and proprietary
applications.  It is already in use in many applications ranging
from small single purpose scripts up to large full
featured applications.

PyGObject requires glib >= 2.14.0 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.16.0.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyPoppler 0.12.0

2009-09-26 Thread Gian Mario Tagliaretti
I am pleased to announce version 0.12.0 of the Python bindings for Poppler.

It is available at:
http://launchpad.net/poppler-python/trunk/development/+download/pypoppler-0.12.0.tar.gz
md5: 78e9655067b8da2c8ad2565b2620e2f9

PyPoppler 0.12.0 (Sep 26 2009)
==

o Update aclocal.m4
o Wrap new poppler 0.12 API

Blurb:
==

Poppler[1] is a PDF rendering library based on the xpdf-3.0 code base.

PyPoppler is a wrapper which exposes the poppler API to the
python world.  It is fairly complete, most of the API are covered.

The documentation is actually missing, help wanted :)

Like the Poppler library itself, PyPoppler is licensed under  the GNU GPL.

PyPoppler requires:
=

 o Poppler >= 0.12.0
 o PyGObject >= 2.10.1
 o PyGTK >= 2.10.0
 o PyCairo >= 1.8.4

Bug reports should go to
https://launchpad.net/poppler-python

[1] http://poppler.freedesktop.org/

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyPoppler 0.12.1

2009-09-27 Thread Gian Mario Tagliaretti
I am pleased to announce version 0.12.1 of the Python bindings for Poppler.

This is a quick follow up to add a couple of new objects that were
missing from the defs, h2defs didn't pick them up automatically.

It is available at:
http://launchpad.net/poppler-python/trunk/development/+download/pypoppler-0.12.1.tar.gz
md5: 1a89e5ed3042afc81bbd4d02e0cf640a

PyPoppler 0.12.1 (Sep 27 2009)
==

o Add LayersIter boxed type
o Add Layers gobject type

Blurb:
==

Poppler[1] is a PDF rendering library based on the xpdf-3.0 code base.

PyPoppler is a wrapper which exposes the poppler API to the
python world.  It is fairly complete, most of the API are covered.

The documentation is actually missing, help wanted :)

Like the Poppler library itself, PyPoppler is licensed under  the GNU GPL.

PyPoppler requires:
=

 o Poppler >= 0.12.0
 o PyGObject >= 2.10.1
 o PyGTK >= 2.10.0
 o PyCairo >= 1.8.4

Bug reports should go to
https://launchpad.net/poppler-python

[1] http://poppler.freedesktop.org/

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGobject 2.21.0 - unstable

2009-12-18 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.21.0 of the Python bindings for GObject.

The new release is available from ftp.gnome.org as and its mirrors
as soon as its synced correctly:

http://download.gnome.org/sources/pygobject/2.21/

What's new since PyGObject 2.20.0?
- pygmainloop: fix use of PySignal_WakeUpFD API for nested loops
  (Philippe Normad, #481569)
- Add capabilities to import wrappers from pygi (Simon van der Linden)
- Move threads_init() function from 'gobject' to 'glib' (Paul)
- Fix wrong minimum checking in float properties (Paul, #587637)
- Wrap new API added in GIO 2.22 (Gian Mario)
- Fix bad name when rebuilding the unix source module (Gian Mario)
- Add the missing limit constants from glibconfig.h
  (Tomeu Vizoso, #603244)
- Suppress warnings about format conversion
  (Simon van der Linden, #603355)
- Properly define Connectable as interface type and not object type
  (Gian Mario)
- Wrap new API added in GIO-UNIX 2.22 (Gian Mario)
- Wrap g_find_program_in_path (Gian Mario, #598435)
- Add pygi-external.h into Makefile SOURCES (Gian Mario)

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyGTK, PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GObject library itself PyGObject is licensed under the
GNU LGPL, so is suitable for use in both free software and proprietary
applications.  It is already in use in many applications ranging
from small single purpose scripts up to large full
featured applications.

PyGObject requires glib >= 2.22.4 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.22.4.

Please remember that this is an unstable release and shouldn't be used
in production.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGTK 2.17.0 - unstable

2009-12-26 Thread Gian Mario Tagliaretti
A new unstable development release of the Python bindings
for GTK+ has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

 http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.17/

Blurb:

GTK+ is a toolkit for developing graphical applications that run on
systems such as Linux, Windows and MacOS X. It provides a comprehensive set
of GUI widgets, can display Unicode bidi text.  It links into the Gnome
Accessibility Framework through the ATK library.

PyGTK provides a convenient wrapper for the GTK+ library for use in
Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GTK+ library itself PyGTK is licensed under the GNU LGPL, so is
suitable for use in both free software and proprietary applications.  It
is already in use in many applications ranging from small single purpose
scripts up to large full features applications.

What's new since 2.16.0?
- Some docs improvements (Gian Mario)
- Wrap new API added in GTK/GDK 2.18 (Gian Mario)
- Release GIL in several gdk.Pixbuf methods (Paul, #591726)
- Fix override for gtk.TreeSortable.do_get_sorted_column_id (Paul)
- Make it possible to implement gtk.TreeSortable to some extent (Paul)
- Fix wrong gtk.gdk.color_from_hsv definition (Arun Raghavan, #594347)
- Plug memory leaks in a few Pango Cairo functions (Paul, #599730)
- Plug a huge leak in gtk.Widget.get_snapshot() (Benjamin Berg, #596612)
- Undeprecate gtk.Toolbar.(un)set_icon_size() again (Paul)

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] [ANNOUNCE] PyGobject 2.21.1 - unstable

2010-01-02 Thread Gian Mario Tagliaretti
I am pleased to announce version 2.21.1 of the Python bindings for GObject.

The new release is available from ftp.gnome.org as and its mirrors
as soon as its synced correctly:

   http://download.gnome.org/sources/pygobject/2.21/

What's new since PyGObject 2.21.0?
- Wrap gio.Volume.eject_with_operation (Gian Mario)
- Wrap gio.Mount.eject_with_operation (Gian Mario)
- Wrap gio.Mount.unmount_mountable_with_operation (Gian Mario)
- Wrap File.unmount_mountable_with_operation (Gian Mario)
- Wrap gio.File.stop_mountable (Gian Mario)
- Wrap gio.File.start_mountable (Gian Mario)
- Wrap gio.File.replace_readwrite_async (Gian Mario)
- Wrap gio.File.poll_mountable (Gian Mario)
- Wrap gio.File.open_readwrite_async (Gian Mario)
- Wrap gio.File.eject_mountable_with_operation (Gian Mario)
- Wrap gio.File.create_readwrite_async (Gian Mario)
- Wrap gio.Drive.stop (Gian Mario)
- Wrap gio.Drive.start (Gian Mario)
- Wrap gio.SocketListener.accept_socket_async|finish (Gian Mario)
- Wrap gio.SocketListener.accept_finish (Gian Mario)
- Wrap gio.SocketListener.accept_async (Gian Mario)
- Wrap gio.SocketListener.accept_socket (Gian Mario)
- Wrap gio.SocketListener.accept (Gian Mario)
- Make cancellable optional in gio.SocketClient.connect_to_host
  (Gian Mario)
- Wrap gio.SocketListener.add_address (Gian Mario)
- Wrap gio.SocketClient.connect_to_service_async (Gian Mario)
- Wrap gio.SocketClient.connect_to_host_async (Gian Mario)
- Wrap gio.SocketClient.connect_async (Gian Mario)
- Wrap gio.SocketAddressEnumerator.next_async (Gian Mario)
- Add a missing object gio.InetSocketAddress new in GIO 2.22
  (Gian Mario)
- Make cancellable optional for gio.SocketAddressEnumerator.next
  (Gian Mario)
- Wrap gio.Socket.condition_wait (Gian Mario)
- Wrap gio.Socket.condition_check (Gian Mario)
- Wrap gio.Resolver.lookup_service_finish (Gian Mario)
- Wrap gio.Resolver.lookup_service_async (Gian Mario)
- Wrap gio.Resolver.lookup_service (Gian Mario)
- Wrap gio.Resolver.lookup_by_address_async (Gian Mario)
- Wrap gio.Resolver.lookup_by_name_finish (Gian Mario)
- Wrap gio.Drive.eject_with_data (Gian Mario)
- Deprecate old gio.Drive methods (Gian Mario)
- Wrap gio.Resolver.lookup_by_name (Gian Mario)
- Make cancellable optional in gio.Resolver.lookup_by_address
  (Gian Mario)
- Strip g_ prefix for many other functions (Gian Mario)
- Strip g_ prefix from InetAddress functions (Gian Mario)
- Fix function name gio.resolver_get_default (Gian Mario)
- Wrap gio.FileIOStream.query_info_async (Gian Mario)
- Register enums and flags in PyGI if needed (Tomeu Vizoso, #603534)
- Wrap gio.IOStream.close_async (Gian Mario)
- Make cancellable optional in GFile.create_readwrite (Gian Mario)
- Remove a duplicate entry in gio.defs (Gian Mario)
- Wrap gio.FileInfo.set_modification_time (Gian Mario)
- Wrap gio.EmblemedIcon.get_emblems (Gian Mario)
- Update Enums and Flags with new API (Gian Mario)
- Fix handling of uchar in pyg_value_from_pyobject (Bastian Winkler)

Blurb:

GObject is a object system library used by GTK+ and GStreamer.

PyGObject provides a convenient wrapper for the GObject library for use
in Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyGTK, PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GObject library itself PyGObject is licensed under the
GNU LGPL, so is suitable for use in both free software and proprietary
applications.  It is already in use in many applications ranging
from small single purpose scripts up to large full
featured applications.

PyGObject requires glib >= 2.22.4 and Python >= 2.3.5 to build.
GIO bindings require glib >= 2.22.4.

Please remember that this is an unstable release and shouldn't be used
in production.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Python C API Creare delle variabili

2010-01-12 Thread Gian Mario Tagliaretti
2010/1/12 Alessandro Agosto :

> Attualmente volevo provare a rendere disponibile delle variabili del modulo,
> pertanto supponendo che il modulo si chiami "pymod" oltre alle varie
> funzioni vorrei rendere disponibile qualche variabile direttamente da C.
> Dando un occhio alla documentazione ho trovato PyModule_AddObject
> (http://docs.python.org/c-api/module.html#PyModule_AddObject) e credo di
> essere sulla buona strada... il problema è che come primo parametro questa
> accetta un oggetto di tipo modulo e non mi è chiaro come usarla senza dover
> creare un nuovo modulo (con PyModule_New()).

http://git.gnome.org/browse/pygtk/tree/gtk/gtkmodule.c

guarda la funzione init_gtk
http://git.gnome.org/browse/pygtk/tree/gtk/gtkmodule.c#n192

alla riga 211 viene inizializzato il modulo (m)

poi ad un certo punto viene chiamata la funzione
pygtk_add_extra_constants che prende come parametro il modulo (m), e
nella funzione viene usato PyModule_AddObject

http://git.gnome.org/browse/pygtk/tree/gtk/gtkmodule.c#n160

come primo parametro viene passato il modulo, per l'appunto (m)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] SignedImporter [was: Criptazione dei file sorgenti per evitare la manomissione]

2010-11-17 Thread Gian Mario Tagliaretti
2010/11/16 lex mlist 

>
> Penso che sia necessario, oltre ai casi da te citati, nel caso in cui ad
> esempio Python venga utilizzato come scripting di un altro motore (poniamo
> l'esempio di un motore grafico, o di una applicazione tanto complessa da
> rendere necessaria tale scelta). In quel caso, qualora si possa voler
> preferire un linguaggio già pronto (anzichè fare un nuovo interprete che
> magari supporti i file binari per proteggere anche la logica), si rende
> necessario il poter operare in tutta tranquillità in una sandbox, e quindi
> controllare che non vi siano manomissioni a uno qualunque dei moduli
> utilizzati (altrimenti si comprometterebbe la stabilità e il flusso di
> lavoro del programma).
> Per fare un esempio mi vengono in mente solo applicativi di una certa
> stazza, che probabilmente, visto il loro valore, non si appoggerebbero mai
> ad una soluzione che ne esponga la logica.
>
>
Visto che hai fatto l'esempio dei CAD

Autodesk Maya
http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=13577897

Autodesk Plant 3D
http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=12261005

entrambi hanno Python embedded, sul secondo (Python .net) ci sta lavorando
la mia società per integrare un nostro prodotto usando le API Python, magari
investigando sul loro forum ottieni qualche risposta tecnica
sull'integrazione, io purtroppo non ho tempo.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] [OT] tester per container unbit

2011-09-13 Thread Gian Mario Tagliaretti
2011/9/13 Carlo Miron :
> 2011/9/13 Marco Beri :

>> Suggeriscoti Google Labs, estensione Undo. Fantastica!

> Alto, Pelato, e Inutile™

eccomi, hai bisogno?

arf, bau
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] cancellazione account da ml

2011-10-29 Thread Gian Mario Tagliaretti
2011/10/29 Remo the Last 

> Devo procedere alla cancellazione del mio user dall'attuale ml di python.
> Potete fornirmi le indicazioni per cancellarmi?

Il link in fondo a ogni messaggio magari? (sono acido ha perso l'inter :) )

> http://lists.python.it/mailman/listinfo/python

saluti
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Secondo voi questo corso su Python è valido?

2011-11-14 Thread Gian Mario Tagliaretti
2011/11/14 Giovanni Marco Dall'Olio :

> Se cerchi degli esercizi, ne puoi trovare di gratuiti su Internet.
> Per esempio:
> http://stackoverflow.com/questions/29578/python-exercises-to-hone-your-skills

LPTHW è già stato suggerito? http://learnpythonthehardway.org/

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Secondo voi questo corso su Python è valido?

2011-11-14 Thread Gian Mario Tagliaretti
2011/11/14 Francesco Maida :

> Ti ringrazio per il consiglio

Posso darne un'altro io, diffuso? Smettetela per favore di fare
top-posting o arriva uno tra Marco Beri (sempre sia lodato) e/o Nicola
Larosa (idem) e vi taglia la testa :) per non parlare di un Carlo
Miron con la scure e sopratutto la password del server e vi cancella
l'account.

Non si riesce a seguire sta discussione, giuro.

Ringrazio anticipatamente.

ciao

-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Utilizzo completo della cpu

2011-11-17 Thread Gian Mario Tagliaretti
2011/11/17 Matteo Perini :
> Ciao lista,

ciao Matteo,

> Vorrei sapere se è possibile utilizzare tutti i core della cpu per eseguire
> calcoli gravosi.

Per usare tutti i core devi usare il modulo multiprocessing (incluso
nella libreria dalla 2.7), l'API è simile a quella del modulo
threading.

ciao

-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] sviluppare applicazioni android tramite python

2011-12-28 Thread Gian Mario Tagliaretti
2011/12/27 Carlos Catucci :
>> Sinceramente penso che la scelta di java sia stata fatta perché è
>> attualmente il linguaggio più popolare al mondo e lo scopo era rendere
>> Android il più popolare possibile

> Una popolarita' immeritata, IMHO. Fortuna che .NET e' targato m$ altrimenti
> ci trovavamo vb.net allora :)

Carlos ma che due balle con sta storia che Python è meglio a
prescindere e tutto il resto è merda, Python è un buon linguaggio per
alcuni usi, punto a capo e guardiamo avanti.

Valutare la complessità di un software certo è difficile, per progetti
"complessi" Python diventa ingestibile, la IDE qualunque sia ad un
certo punto non riesce più a venirti incontro per le caratteristiche
del liguaggio, per altri linguaggi su cui costantemente si sputa sopra
(vedi .NET) la IDE in vece ti da una grossa mano ed il progetto
diventa più gestibile. Sono state fatte analisi sulla velocità dello
sviluppo vs la complessità di mantenimento e Python sopra una certa
complessità non è più così "comodo" (termine orribile) come per
progetti più piccoli.

Questo non vuol dire che non sia un bel linguaggio ma quando si esce
dall'ottica hobbistica e si entra in quella aziendale, le scelte non
possono essere solo per quello che è più bello o quello che mi piace
di più, ci sono aziende che per il software che producono trovano
Python ideale, e questo è buone e giusto, altre aziende che fanno
software diversi, il che non vuol dire migliori, non lo possono usare.

Parlo per esperienza diretta e non per sentito dire, in azienda da noi
sono state fatte delle scelte che a volte sono risultate sbagliate
altre volte azzeccate, si cerca di imparare dai propri errori, abbiamo
un software scritto in Python che è nato come prototipo, poi visto che
era ben fatto e che i clienti lo apprezzavano è stato portato avanti
come software in produzione, ora dopo qualche decina di migliaia di
righe di codice funziona benissimo per carità, metterci le mani però
non è più così "divertente", tanto che si sta pensando di riscriverlo
in .NET

Se l'azienda vuol prendere le decisioni giuste ogni strumento ha i
suoi vantaggi, punto, non c'è il bello e il brutto, c'è il funziona o
non funziona per quell'applicazione.

Buon natale :)
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Emulare il comando ping...

2012-03-14 Thread Gian Mario Tagliaretti
2012/3/14 Val :
> Scusatemi, mi sono scordato di dire che io avevo la necessità primaria di 
> pingare indirizzi IP multipli all'interno di una grossa rete aziendale, non 
> su internet!

Se devi controllare che le macchine siano attive guarda questa recipe
del "dott. prof. sup. uff. lup. man." Nicola Larosa
http://code.activestate.com/recipes/52302-pyheartbeat-detecting-inactive-computers/

> Chiedo venia

...per il top-posting? Scusato

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] python tools 4 visual studio

2012-04-13 Thread Gian Mario Tagliaretti
2012/4/13 Carlo Miron :

Carlo,

> Faccio **davvero** *tanta* fatica a pensare a qualcosa che si possa
> fare in vb.net ma in python no

Parsing di file XML di svariate centinaia di megabyte
Spreadsheet-like form
UI complesse (e non bloated)

arf bau
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] python tools 4 visual studio

2012-04-13 Thread Gian Mario Tagliaretti
2012/4/13 Carlo Miron :
> Gian,

Malefico :D

>> Parsing di file XML di svariate centinaia di megabyte
>> Spreadsheet-like form
>> UI complesse (e non bloated)
>
> Intendi sostenere che _non si possono fare_ in python?

"forse" la prima si può fare, le altre due (purtroppo) no.

Spiego il "forse" che in effetti è incorretto, la verità è che si può
fare e noi lo usiamo anche, in termini di prestazioni però il parser
XML Microsoft è (nei test che abbiamo fatto) decisamente superiore a
qualsiasi parser che tu possa usare da Python, incluso Expat.

Abbiamo un software (http://www.cla-it.com/elenaDetails-platform.html)
decisamente grande scritto in Python che genera le classi tubazioni ed
il catalogo componenti per i maggiori modellatori tridimensionali
presenti sul mercato, uno di questi (SmartPlant 3D di Intergraph)
sfortunatamente legge i dati da dei fogli excel, l'unico modo
"decente" che abbiamo trovato è quello di generare gli excel passando
da XML, per non incorrere nei 150983 problemi che si avrebbero nel
generare direttamente l'excel con gli strumenti MS, dalle licenze
essendo un server, passando per i crash del motore di excel, per
arrivare alla faccia di Ballmer che comunque ha il suo peso.

Se dovessimo però ricominciare domani mattina useremmo il parser MS
senza il minimo dubbio.

> *Nota bene*: non ho scritto
> Faccio **davvero** *tanta* fatica a pensare a qualcosa che Gian Mario
> Tagliaretti non sappia fare meglio e piu` velocemente in vb.net
> piuttosto che in python.

touchè :)

> (E comunque, boh. Le ultime due te le posso anche passare,
> fortunatamente mai capitato di doverle fare. Ma la prima?)

e hai perfettamente ragione, per questo ho argomentato.

>> arf bau
>
> Bau,
> ©
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] python tools 4 visual studio

2012-04-13 Thread Gian Mario Tagliaretti
2012/4/13 Marco Beri :

> A parte che ho idea che Carlo lo sapesse benissimo, non è che non sai che
> prende sempre in giro tutti quelli pelati?

giustamente, ma tu hai mai visto un asino senza capelli??

hhhiii hoooo
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] python tools 4 visual studio

2012-04-13 Thread Gian Mario Tagliaretti
2012/4/13 Carlos Catucci :

Carlos,

> A parte che ho idea che GianMario riesca a farle meglio in python (in
> generale) le cose, piuttosto che in vb.net, non e' che con la tua frase gli
> hai fatto un complimento sai? :)

grazie della fiducia :D

in effetti come si sa io adoro Python e quando possibile non vedo
l'ora di usarlo o di farlo usare, però non sono nemmeno (credo)
sprovveduto e sopratutto sono nella posizione in cui una decisione
sbagliata fa perdere soldi all'azienda, quindi ci devo pensare
(assieme agli altri naturalmente) 3 volte prima di decidere.

Sono dell'idea che ogni strumento (informatico) è utile se usato nel
modo giusto, una forbice è stata fatta per tagliare la carta o simili,
certo la posso usare anche per tagliarmi via un coglione, ma così a
naso direi che non è la scelta giusta.

Allo stesso modo mi vengono i brividi quando certi strumenti vengono
usati a sproposito al contrario ad esempio quando vedo usato Oracle
per 10k record, è come usare un caterpillar per "stungias al nas da 'i
avià di marten" (o togliersi le caccole dal naso per i non
Borgolavezzaresi)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] python tools 4 visual studio

2012-04-13 Thread Gian Mario Tagliaretti
2012/4/13 Manlio Perillo :

ciao Manlio,

>> Spiego il "forse" che in effetti è incorretto, la verità è che si può
>> fare e noi lo usiamo anche, in termini di prestazioni però il parser
>> XML Microsoft è (nei test che abbiamo fatto) decisamente superiore a
>> qualsiasi parser che tu possa usare da Python, incluso Expat.
>>
>
> Ci sono problemi ad utilizzare il parser XML Microsoft in Python?

al momento la parte server dell'applicazione è totalmente scollegata
dal sistema operativo, può girare anche su GNU/Linux o altro sistema
operativo che supporti al minimo Python2.5, se iniziassimo a legarci a
Windows la tentazione di riscriverne alcune parti usando altra
tecnologia (ehm..) sarebbe forte.

In realtà una parte me l'hanno già martellata su Windows perchè hanno
usato asp.net per il sito web (http://elena.cla-it.com/) che fa girare
il server, ma ho ancora qualche flebile speranza di farlo girare su
apache/mono asp.net (mai provato), purtroppo siamo a corto di know-how
su Django (o simili)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] localizzazione datetime object

2012-04-17 Thread Gian Mario Tagliaretti
2012/4/17 Pietro :
> Ciao a tutti!

ciao Pietro,

> domanda banale e veloce... ho cercato su google ma non ho trovato,
> forse sbaglio le parole chiave...
>
> in sintesi vorrei mi desse il nome dei giorni in inglese, cosa devo fare?

non è bellissimo impostare il locale a questa maniera ma...

import locale
locale.setlocale(locale.LC_ALL, 'usa')

(occhio che su Windows non funziona ad esempio "en_US" ma bensì...
"usa", "united-states", etc.. etc...)

su MSDN trovi l'elenco delle regioni

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] pygtk e keyboard shortcuts

2012-05-05 Thread Gian Mario Tagliaretti
2012/5/4 Matteo Perini :
> Ciao a tutti,

ciao Matteo,

> Sto creando una semplice Gui ma mi sono imbattuto in un problema che non
> riesco a risolvere.
> Vorrei attivare (rendere sensibile) un bottone che è insensibile di default
> quando premo una combinazione di tasti.
> Ad esempio:
> q  -> attivazione del button1
> a  -> attivazione del button2

a questo indirizzo trovi tutto quello che c'è da sapere su actions,
accelerators e actiongroups:

http://goo.gl/8VqZR

in particolare questo esempio:

http://goo.gl/0qp5m

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] passare variabili tra funzioni (pygtk)

2012-05-11 Thread Gian Mario Tagliaretti
2012/5/11 Matteo Perini :
> Ciao a tutti,

ciao Matteo,

posta un esempio completo anche se non funzionante, è più facile
aiutarti, adesso sparo e vediamo se prendo il piccione...

> La textbox:
> self.entry1 = gtk.Entry()
> self.num_grab=self.entry1.get_text()
>
> Il button:
> self.button1 = gtk.Button("Grab Image")
> self.button1.connect("clicked", self.get_image)
>
> Nella class Window ho anche la funzione che voglio richiamare col button:
> def get_image(self,widget):
>        self.num_grab= Window.win_take_pictures
>        print self.num_grab

#!/usr/bin/env python

import pygtk
pygtk.require('2.0')
import gtk

class EntryExample:
def press_callback(self, widget, entry):
entry_text = entry.get_text()
print "Entry contents: %s\n" % entry_text

def __init__(self):
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window.set_size_request(200, 100)
window.set_title("Entry Example")
window.connect("delete_event", lambda w,e: gtk.main_quit())

vbox = gtk.VBox(False, 0)
window.add(vbox)
vbox.show()

entry = gtk.Entry()
entry.connect("activate", self.press_callback, entry)
entry.set_text("stampami")
vbox.pack_start(entry, True, True, 0)
entry.show()

button = gtk.Button(stock=gtk.STOCK_EXECUTE)
button.connect("clicked", self.press_callback, entry)
vbox.pack_start(button, True, True, 0)
button.set_flags(gtk.CAN_DEFAULT)
button.grab_default()
button.show()
    window.show()

def main():
gtk.main()
return 0

if __name__ == "__main__":
EntryExample()
main()

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] passare variabili tra funzioni (pygtk)

2012-05-11 Thread Gian Mario Tagliaretti
On Fri, May 11, 2012 at 10:07 PM, Matteo Perini  wrote:

> Grazie mille oggi al lavoro ho risolto vedendo proprio questo esempio

l'esempio te l'avevo ripulito un po' da quello del tutorial pygtk per
renderlo più semplice e leggibile, mi fa piacere che comunque hai
risolto.

> (scusatemi ma mi sono dimenticato di aggiornarvi).

ma mica ti devi scusare, anzi per il quote selvaggio un po' si :)

> In effetti la soluzione è di passare l'oggetto "entry" alla nuova funzione.
> Dovete scusare la domanda banale ma sto imparando e alcune cose non mi sono
> ancora familiari.

ciao buona serata
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] prime armi

2012-05-24 Thread Gian Mario Tagliaretti
2012/5/24 chiara angelone :

ciao Chiara,

> import prova mi sa sempre lo stesso errore
> ImportError: No module named prova

Il file prova.py DEVE essere nella cartella da dove lanci l'interprete
(non è proprio vero, qualche dettaglio più sotto), ad esempio su
Windows se lanci la "console" con cmd, questa si posiziona in Windows7
sulla cartella del tuo user, esempio c:\Users\chiara.

Se da questa cartella lanci l'interprete python, il file deve essere o
in questa cartella o in una cartella specificata nella variabile
PYTHONPATH.

Quindi riassumendo, assicurati che prova.py sia nella cartella da cui
lanci l'interprete c:\Users\chiara nell'esempio precedente.

> come manuale sto usando "Imparare Python" di Mark Lutz

Marco Beri è più bello (e non solo perchè siamo entrambi pelati...)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] come chiudere in modo corretto le Window pygtk

2012-05-24 Thread Gian Mario Tagliaretti
2012/5/24 Matteo Perini :
> Ciao lista,

ciao Matteo,

> Il problema però persiste sulla mia interfaccia.
> L'unica cosa in cui si differenzia dalle prove che ho fatto è che importo
> l'interfaccia da un file glade che ho creato a parte.
> Allego entrambi i file (non pretendo li guardiate. ma se proprio volete

Ci sono diverse cose che non vanno negli esempi che hai allegato,
sinceramente ho guardato di fretta ma le prime cose da sistemare sono:

- usa gtk.Buider invece dell'obsoleto (da molto) libglade

- perchè hai definito dei tuoi segnali che poi non usi? In linea
generale definire dei nuovi segnali non è una buona idea, tutti i
controlli hanno già i loro segnali, usa quelli.

- non vedo il delete-event collegato ad un evento (il problema che hai
segnalato)

- hai scritto la GUI a metà con glade e a metà scrivendo il codice a
mano, il mantenimento diventa infernale

- "global num" urla vendetta

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] come chiudere in modo corretto le Window pygtk

2012-05-26 Thread Gian Mario Tagliaretti
2012/5/25 Matteo Perini :

ciao Matteo,

>> - hai scritto la GUI a metà con glade e a metà scrivendo il codice a
>> mano, il mantenimento diventa infernale
>
> Concordo ma secondo te mi conviene creare le varie finestre con glade
> (tutte) o usare solo gtk (però la gui potrebbe complicarsi a breve).

Io farei tutte le finestre con Glade nascoste di default (w.hide()) e
non definirti i segnali nel codice ma solo le callback, metti il nome
della callback che userai nei controlli in Glade.

> Purtroppo però non ho ancora risolto...
> Ho inserito i delete event come mi hai consigliato
> ad esempio così:
> self.main_calibration.connect('delete-event',
>  close_calib,self.main_calibration)
>
> def close_calib(window,event,finestra):
>            finestra.destroy()

finestra.hide()

>            return True
>
> ma quando provo a riaprire la finestra con:
> def on_btn_main_calib_clicked(self,widget):
>        self.main_calibration(self)
>
> mi da il seguente errore:
> Traceback (most recent call last):
>  File "GuiAndrea2.py", line 53, in on_btn_main_calib_clicked
>
> self.main_calibration(self)
> TypeError: 'gtk.Window' object is not callable
>
> sembra quasi che non riesca a ri-caricare la finestra.
> Qualche idea??

finestra.show()

Ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] visualizzare immagine su schermo separato

2012-06-08 Thread Gian Mario Tagliaretti
2012/6/8 Matteo Perini :

> Come da oggetto avrei bisogno di visualizzare alcune immagini (fullscreen e
> senza bordi) in sequenza su un secondo monitor.
> Attualmente riesco nel mio intento solo su linux richiamando un altro
> software in un ciclo:
>
> subprocess.Popen(['xloadimage','-display',':0.1','-fullscreen','nomefile.png'])

mi pare un po' esagerato, dai un'occhiata a gtk.gdk.Screen() e se Tor
Lindqvist l'ha portato anche in win32 (suppongo di si), ti funziona
anche su windows con lo stesso codice.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] visualizzare immagine su schermo separato

2012-06-08 Thread Gian Mario Tagliaretti
2012/6/8 Matteo Perini :

> pyglet.window.Window(screen=sc[0],display=displ,width=1024,height=768)

immagino che l'oggetto screen abbia dei metodi get_width() e
get_height() o i relativi attributi, non martellarmi la risoluzione
nel codice per carità :)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] richiesta di info su python

2012-06-27 Thread Gian Mario Tagliaretti
2012/6/27 Vittorio Spina :

caro Spina (nomen omen? [scherzo dai])

> secondo me stai calmino!

il buon pelat... e Marco ha ragione, quoti alla membro di segugio
e hai un disclaimer da arresto per scrivere in una ML, a volte gli OT
capitano e ne vengono fuori anche discorsi simpatici/interessanti,

Su questa lista non sono così frequenti, sta bravo dai.

at salut
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Web App Django e Hosting

2012-06-28 Thread Gian Mario Tagliaretti
2012/6/28 Lorenzo Macchiavelli :
> Ciao a tutti,

ciao Lorenzo,

> Dato che diversi di voi lo utilizzano, in alternativa a gestire un server;
> esistono dei servizi
> di hosting che offrono django tra le scelte? se si, voi cosa mi
> consigliereste??

belin se c'è :) http://unbit.it/

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] problema ordinamento di un dizionario di liste in base ad un elemento della lista

2012-07-19 Thread Gian Mario Tagliaretti
2012/7/19 Davide Rambaldi :

Rambaldi,

> Volevo giusto chiedere una cosa sule regexp non-greedy ma forse meglio 
> lasciare perdere ...

ricomincia da capo, chiedi in un nuovo topic e non alimentare flame e
vedrai che va tutto bene.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] creare gui per python ed integrare internet explorer

2012-07-20 Thread Gian Mario Tagliaretti
2012/7/19 Balan Victor :
> Ciao a tutti,

ciao Victor,

> Cercando un po in giro ho visto qualcosina fatto con GTK ma nulla di più.
> Qualche idea??

questo l'hai già letto?
http://www.majorsilence.com/pygtk_embedded_web_browsers

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] GTK - Dimensioni Monitor

2012-09-17 Thread Gian Mario Tagliaretti
On Mon, Sep 17, 2012 at 3:12 PM, marco...@libero.it 
wrote:
> Ciao a tutti!

ciao Marco

> Con il fine di rilevare in automatico le dimensione del monitor, uso
questo
> semplice codice:
>
> import gtk
> w = gtk.gdk.get_default_root_window()
> p = gtk.gdk.atom_intern('_NET_WORKAREA')
> height, width = w.property_get(p)[2][2:4]

urca, è come sparare a un piccione con un bazooka :)

> in ambiente Linux (ovviamente) funziona.
> In ambiente Windows, mi ritorna un errore l'ultima riga.
> Provate anche voi per cortesia?

usa:
http://www.pygtk.org/docs/pygtk/class-gdkscreen.html

in particolare:
http://www.pygtk.org/docs/pygtk/class-gdkscreen.html#method-gdkscreen--get-width
http://www.pygtk.org/docs/pygtk/class-gdkscreen.html#method-gdkscreen--get-height

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] dongle con penna usb

2012-12-31 Thread Gian Mario Tagliaretti
2012/12/31 Vittorio Spina 
>
> Ciao a tutti,

ciao Vittorio,

> mi chiedevo se qualcuno avesse avuto esperienza con le chiavette usb 
> utilizzate come dongle per licenziare un'applicazione.

Noi usavamo le chiavi Eutron (Safenet adesso mi pare), poi da un
giorno all'altro hanno cambiato tutto... un disastro per noi, ci hanno
offerto il nuovo prodotto e li abbiamo mandato affanculo, ma con
gentilezza :)

Adesso usiamo le CRYPTO-BOX (Marx)

> Qualcuno sa darmi qualche dritta?

Non è complicato da implementare, le librerie per pilotare la chiave
sono fornite con il kit di sviluppo.

> Moduli, metodi, o altro?

entrambe non hanno API python out of the box, abbiamo usato ctypes per
il primo set di chiavi (Eutron) e un mio collega ha scritto il driver
per le seconde, non mi ricordo come/cosa ha usato ma se ti interessa
glielo posso chiedere.

> grazie

figurati (e segui i consigli di Nicola)

> Vittorio

ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] dongle con penna usb

2012-12-31 Thread Gian Mario Tagliaretti
2012/12/31 Marco Beri 
> 2012/12/31 Gian Mario Tagliaretti 

>> dissento categoricamente, alcuni modelli di chiave sono decisamente
>> sicuri (tipo la crypto-box) e in alcune circostanze sono
>> indispensabili, come nel nostro caso, non voglio tediare la lista con
>> i perchè, ci vorrebbe una conferenza sull'argomento :)

> Ok, permettimi allora di dire che nel 99% dei casi sono totalmente inutili.

Direi che il 99% è generoso ma ci siamo quasi, sono d'accordo con te, al 99% :p

> Chi vuole veramente copiare, copia lo stesso (sto parlando di programmi ad 
> ampia diffusione) mentre in caso contrario (programmi di nicchia) di solito 
> nessuno si mette a fare mercato nero del software piratato.

Noi facciamo parte di una nicchia, software per l'Oil & Gas e simili,
abbiamo solo 2 competitor che sono giganti internazionali Aveva (UK) e
Intergraph (USA prima adesso Exagon Svezia), per stare sul mercato e
competere i prodotti devono essere di qualità e devono fare cose che
gli altri 2 non fanno (o fanno peggio) per questo motivo (ed altri)
non possiamo rilasciare il codice sorgente delle applicazioni, non
potremmo stare sul mercato o forse ci staremmo ma con un azienda di 4
o 5 dipendenti che fanno servizi, non di 20 con 10 sviluppatori.

Per quanto riguarda il mercato nero abbiamo esperienza anche in tal
senso, le nostre applicazioni sono ricercate su alcuni forum oil &
gas, specialmente da alcune aree del mondo che non sto a specificare,
basta andare su forum tipo egpet.net per verificare, i nostri dealer
sono spesso contattati per avere delle copie "di prova", alcune volte
ci contattano anche direttamente.

La direzione che abbiamo preso è comunque quella di spostare le
applicazioni sul web (ad esempio http://elena.cla-it.com/), anche
tramite Citrix per le applicazioni desktop, ad esempio ENI e Saipem le
usano sui nostri server https://rapps.cla-it.com

Ci sarebbe molto altro da dire ma non vi annoio con i miei problemi e
vi auguro buon anno :)

> Ciao.
> Marco.

ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Glitch

2013-01-04 Thread Gian Mario Tagliaretti
2013/1/4 Marco Beri :
> Chi indovina cosa stampa l'ultima riga di questo snippet senza eseguirlo? Si
> accettano tentativi :-)

Tentando di modificare la tupla sarei per un TypeError

> Ciao.
> Marco.

ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Gtk-gtk-Pygtk confusione

2013-04-02 Thread Gian Mario Tagliaretti
2013/4/2 Matteo Perini :
> Ciao a tutti,

ciao Matteo

> mi ritrovo con un po' di confusione riguardo alle gtk.
> Se ho capito bene,
>
> import Gtk   (utilizza le gtk3) (sono le gtk+???)

E' corretto, per le GTK+ 3 è utilizzata l'introspection invece degli
static bindings usati fino a poco tempo fa, puoi leggere qui un
introduzione: http://learngtk.org/what-is-introspection.html

> import gtk   (utilizza le gtk2)

Esatto, questi sono i vecchi bindings statici, sono manutenuti ma non
sviluppati attivamente.

> import pygtk (non ne ho capito l'ultilità)

Serviva in passato (con i bindings statici) perchè in giro c'era
ancora codice delle GTK+ 1 più altre cosette

> Sto cominciando a sviluppare una piccola gui su debian-gnome3 cosa mi
> conviene utilizzare... ho cominciato con "import gtk".

Io utilizzerei il nuovo package

> Al momento non ho grossi problemi ma temo di aver imboccato la strada
> sbagliata... mi conveniva cominciare direttamente con le "Gtk"??

Secondo me ti conviene usare le GTK+ 3

> Scusate della confusione, ogni delucidazione è ben accetta.
> Ciao

ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Gtk Image

2013-04-10 Thread Gian Mario Tagliaretti
On Wed, Apr 10, 2013 at 7:03 PM, emmanuel segura  wrote:
> Ciao a tutti

ciao Emmanuel,

> Sto provando a caricare un'immagine usando gtk, ma non riesco perche ricevo
> un'errore di questo genere

L'errore ti dice esattamente dov'è il problema:

>   fixe.put(fixe,100,90)

questa linea, stai mettendo fixe dentro fixe e lui ti dice che "parent
non è diverso da widget":

> mywindow.py:26: GtkWarning: gtk_widget_set_parent: assertion `widget !=
> parent' failed

ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] Rispondere al Digest (era: qualcos'altro incomprensibile...)

2013-04-11 Thread Gian Mario Tagliaretti
2013/4/11 emmanuel segura :
> Ciao

ciao

> Grazie Per risposta, comunque ho modifcato lo script nell seguente modo, ma
> non mi carica l'immagine, anche se quando lo lancio da terminale non mi da
> nessuna segnalazione

A questa domanda mi pare ti abbiano già risposto, io invece ti prego di

1. non rispondere ad un digest

2. non fare top-quoting

3. quotare il messaggio in modo che io non debba cercare come un matto
il pezzo di messaggio interessatoper cercare di aiutarti

grazie, ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] gtk e drawing area

2013-05-02 Thread Gian Mario Tagliaretti
2013/5/2 Matteo Perini :
>
> Ciao a tutti,

ciao Matteo,

> Se avete consigli sono tutto orecchie.

prova a dare un'occhiata al codice di cheese [1][2]

[1] http://projects.gnome.org/cheese/
[2] https://git.gnome.org/browse/cheese/tree/

ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] [python] Re: un consiglio e aiuto

2013-05-26 Thread Gian Mario Tagliaretti
2013/5/26 Gilberto :

> :D resta il fatto che affermano che il 96% utilizza windows come sistema 
> operativo. bah va
> beh.

il 96% del mercato desktop sicuramente no, ma il 90% di sicuro

ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] [python] Re: un consiglio e aiuto

2013-05-26 Thread Gian Mario Tagliaretti
2013/5/26 Carlos Catucci :

Carlos,

>> :D resta il fatto che affermano che il 96% utilizza windows come sistema
>> operativo. bah va

>> il 96% del mercato desktop sicuramente no, ma il 90% di sicuro

> La frase riportata parlava di sistema operativo, non faceva precisazioni.
> Comuqnue il 90% mi sembra una esagerazione. In italia forse, ma in molti
> paesi usano Linux in maniera molto capillare. E negli USA Apple ha una fetta
> consistente.

a me non piacciono per niente tutte le guerre religiose, ivi incluse
quelle sulla tecnologia, devo tenere a freno le dita tutte le volte
che leggo i classici rant java, .net, access (jet engine), mysql,
etc...

Posso accettare solo la contesa free/libre vs closed che ha un suo
perchè e di cui ovviamente ho idee ed opinioni ben precise a riguardo,
tutto il resto sono cazzate, c'è gente che ha fatto i milioni/miliardi
con quelle tecnologie e ogni volta che legge un rant se la ride a
crepapelle.

Discorso diverso è cosa mi piace di più se devo fare una cosa, anche
io preferisco python (ovviamente), postgresql, etc.. è solo la presa
di posizione a prescindere che non mi piace.

ciao
--
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] ricerca di lavoro

2013-09-03 Thread Gian Mario Tagliaretti
2013/9/3 Carlos Catucci :

Carlos,

pessimo post generalista e decisamente' demagogico.

> A prescindere che trovo una follia tornare in un paese da cui si fugge se
> solo si puo', ma capisco che tu possa avere i tuoi motivi

Passo il 33% della mia vita in volo o in qualsiasi parte del mondo, un
50% in Olanda dove vive la mia famiglia ed il resto in Italia dove è
la sede della ditta per cui lavoro.

> ma credi davvero
> che ci siano aziende in grado di supportare una persona con tale esperienza?

Ce ne sono a bizzeffe, in Italia non è tutta merda, benchè devo
ammettere che ce ne sia molta.

> Qui prendono stagisti (non pagati) tanto pure se producono poco non costano
> nulla.

Nell'ultimo anno abbiamo preso 3 neo-laureati con contratto di
tirocinio formativo pagandoli il massimo di quello che quel tipo di
contratto (di 6 mesi) prevede, 2 sono rimasti a lavorare con noi con
un contratto di formazione 3+1 al 20% in più della media degli
stipendi previsti dal contratto, la terza ha deciso di seguire un
altra strada ma le avevamo fatto la stessa proposta.

Parlando con diverse aziende del settore ti posso assicurare che non
siamo una mosca bianca, ma noi Italiani siamo abituati a sparare a
zero su tutto quello che è Italiano, generalizzando.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Scelta di un IDE

2013-09-14 Thread Gian Mario Tagliaretti
2013/9/13 enrico franchi :

> Visto che stiamo facendo questo gioco... contami un +1 su vim e PyCharm.

Stessi voti anche qua +1 a PyCharm e VIM (anche se lo uso raramente,
ma nelle emergenze è sempre presente)

p.s.
da qualche anno quelli di PyCharm mi rinnovano la licenza  per Gnome,
se qualcuno avesse fatto almeno qualche commit nel tree di Gnome mi
mandi una mail che gli mando la licenza.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Glade3 e statusbar

2013-09-29 Thread Gian Mario Tagliaretti
2013/9/29 Marcello :
> Ciao a tutti

ciao Marcello,

ho un po' di commenti a parte il codice, innanzi tutto ti consiglio di
non usare le "vecchie" PyGTK ma di usare pygobject introspection che
utilizza le nuove GTK3, PyGTK non è più mantenuto ed è sconsigliato
per scrivere nuovo codice. [1][2]

Ad ogni modo, a prescindere se usi GTK2 o GTK3 gtk.glade.XML è
super-deprecato, usa gtk.Builder al suo posto. [3]

Questo consiglio puoi anche non ascoltarlo, usa uno stile consistente
per i nomi di classi/metodi/variabili, e.g. nomi classi Capital,
metodi e variabili lowercase, etc...

> quando lo eseguo si apre correttamente la finestra e sullo statusbar mi
> compare 'Messagio di prova...' .

la statusbar tiene uno stack di messaggi per ogni context, ovvero a
chiamate successive di push() il messaggio viene sostituito con quello
che hai appena inviato, se devi rimuovere il messaggio puoi usare
pop() che ti elimina l'ultimo dallo stack, attenzione che se quello
mostrato è di un altro context potrebbe non fare quello che pensi. [4]

> Ho la necessità, quando viene richiamato Compila,  di cambiare il messaggio.
> Dove sbaglio?

Dal codice che hai postato il metodo "Compila" non viene mai eseguito.

[1] https://wiki.gnome.org/PyGObject
[2] https://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html
[3] https://developer.gnome.org/gtk3/3.10/GtkBuilder.html
[4] https://developer.gnome.org/gtk3/3.10/GtkStatusbar.html#gtk-statusbar-pop

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Glade3 e statusbar

2013-09-29 Thread Gian Mario Tagliaretti
2013/9/29 Marcello :

>> Dal codice che hai postato il metodo "Compila" non viene mai eseguito.
>
> si, e vero, ma ho postato solo parte del codice mettendo solo la parte
> interessata.

era interessante vedere anche quando il metodo viene eseguito,
altrimenti non si capisce perchè non ti funziona.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Glade3 e statusbar

2013-09-29 Thread Gian Mario Tagliaretti
2013/9/29 Marcello :

> def Compila(self,obj):
> self.statusbar.push(self.context_id, 'Cambia Messaggio Statusbar')

prova così (untested)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Glade3 e statusbar

2013-09-29 Thread Gian Mario Tagliaretti
On Sun, Sep 29, 2013 at 4:14 PM, Marcello  wrote:

> no non va.

from gi.repository import Gtk

class StatusSample(Gtk.Application):
def __init__(self):
Gtk.Application.__init__(self, application_id="org.app.StatusSample")
self.main_window = Gtk.Window(Gtk.WindowType.TOPLEVEL)
self.main_window.set_default_size(200, 150)

vb = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.main_window.add(vb)

button = Gtk.Button("Push Message")
button.connect("clicked", self.on_button_push_clicked)
vb.pack_start(button, True, True, 0)

button = Gtk.Button("Pop message")
button.connect("clicked", self.on_button_pop_clicked)
vb.pack_start(button, True, True, 0)

self.status = Gtk.Statusbar()
vb.pack_start(self.status, True, True, 0)
self.context = self.status.get_context_id("my_status")
self.count = 0

def do_activate(self):
self.add_window(self.main_window)
self.main_window.set_position(Gtk.WindowPosition.CENTER)
self.main_window.show_all()

def do_startup(self):
Gtk.Application.do_startup(self)
self.status.push(self.context, "Primo Messaggio")

def on_button_push_clicked(self, button, data=None):
self.status.push(self.context, "Messaggio numero %d" % self.count)
self.count += 1

def on_button_pop_clicked(self, button, data=None):
self.status.pop(self.context)

if __name__ == "__main__":
    statussample = StatusSample()
statussample.run(None)


ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Glade3 e statusbar

2013-09-30 Thread Gian Mario Tagliaretti
On Mon, Sep 30, 2013 at 4:43 PM, Marcello  wrote:
> Ok ho capito il messaggio... Aggiornare a pygobject.

eheh era subliminale ma non troppo, ma cmq lo stesso esempio funziona
anche con pygtk, bastano poche modifiche.

> ho scaricato ed installato 'pygobject-2.28.3.win32-py2.7.exe'

quello è il vecchio pygobject per GObject 2.xx, per la versione 3
scarica questo:
https://code.google.com/p/osspack32/downloads/detail?name=pygi-aio-3.4.2rev11.7z&can=2&q=/

che ha dentro tutto, incluso glade3, devhelp, e tutto il cucuzzaro

Puoi far riferimento a questa pagina [1] per capire le differenze con
PyGTK, ci ho messo anche le istruzioni per fare il package con
cx_freeze su windows con un esempio di setup.py (se sei interessato al
packaging)

[1] https://wiki.gnome.org/PyGObject

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] I: list di connessioni

2013-10-03 Thread Gian Mario Tagliaretti
invece di reply
e di fare inoltre
di smetterla di fare top-quoting
delle mie coronarie
ti scongiuro, per il bene

2013/10/3 Remo The Last :
>
> giustamente hai ragione.
> E' forse per questo che non riesco a passare conn[contatore] con parametro
> al thread?
> Ci provo subito e al volo
> grazie delle risp.
> py.Re
>
>
> 
> Da: Marco Beri 
> A: Remo The Last ; Discussioni generali sul
> linguaggio Python 
> Inviato: Giovedì 3 Ottobre 2013 17:59
> Oggetto: Re: [Python] list di connessioni
>
> 2013/10/3 Remo The Last 
>
> 2° listato che mi si impalla
> conn = []
> contatore = 0
> while contatore <= 10:
> conn[contatore] = telnetlib.Telnet(address,23,7)
> contatore += 1
>
>
> Se vuoi fare conn[contatore] come se fosse un dictionary, devi
> inizializzarlo come dictionary:
>
> conn = {}
>
> Altrimenti devi fare:
>
> conn.append(telnetlib.Telnet(address,23,7))
>
> Ciao.
> Marco.
>
>
> --
> http://beri.it/ - Un blog
> http://beri.it/i-miei-libri/ - Qualche libro
>
>
>
>
>
>
> ___________
> Python mailing list
> Python@lists.python.it
> http://lists.python.it/mailman/listinfo/python
>



-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Glade3 e statusbar

2013-10-06 Thread Gian Mario Tagliaretti
2013/10/6 Marcello :

ciao Marcello,

non vedendo tutto il codice posso solo azzardare

> def on_statusbar_show(self, button,obj,data=None):
> self.statusbar = self.ApplicazioneGlade.get_object('statusbar')

self.statusbar = self.ApplicazioneGlade.get_object('statusbar')
crei l'oggetto self.statusbar dentro la funzione, sia self.statusbar
che self.context_id dovresti crearli dentro l'__init__ della classe,
se il controllo dei parecchi file di testo è bloccante (e.g. qualcosa
che fai con subprocess.Popen o familiari) il mainloop potrebbe non far
in tempo a scrivere il messaggio nella statusbar

>
> self.context_id = self.statusbar.get_context_id('statusbar')
> self.statusbar.push(self.context_id, self.MessaggioStatusbar)
>
> def on_VerTab_clicked(self, button):
> self.MessaggioStatusbar = 'Hai premuto Verifica Tabella'
> self.on_statusbar_show(self,button)
> . controllo parecchi file di testo

qualcosa del genere

class MyClass (blabla)
def __init__ (blabla, blabla)
self.widgets = Gtk.Builder(blabla)
self.statusbar = self.widgets.get_object('statusbar')
self.context_id = self.statusbar.get_context_id('statusbar')

def funzione_che_controlla_tanti_file(self, blabla)
...

def on_VerTab_clicked(self, widget, data=None):
self.statusbar.push(self.context_id, 'bla bla bla bla')

> il messaggio sullo statusbar mi appare non immediatamente quando viene
> eseguito ' def on_VerTab_clicked(self, button):'
> ma bensì quando finisce di controllare tutti i file di testo.

cmq i problemi rimarranno se blocchi il mainloop lanciando dei processi esterni

> Questo mi vieta di far vedere sullo statusbar quale file sta elaborando

e questo mi fa pensare che ho ragione, come li lanci questi controlli?

> Un grazie a Gian Mario per tutte le dritte che mi ha dato fino adesso

figurati, siam qui apposta.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Uso di __getattr__ e old style class e new style class

2013-10-09 Thread Gian Mario Tagliaretti
On Wed, Oct 9, 2013 at 6:33 PM, Manlio Perillo  wrote:
> On 09/10/2013 17:43, Marco Beri wrote:

> E se io sono una certezza

si

> tu che scrivi libri che sei, un dogma? :)

 si

:)
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Glade3 e statusbar

2013-10-13 Thread Gian Mario Tagliaretti
On Sun, Oct 13, 2013 at 5:53 PM, Marcello  wrote:

> Si effettivamente il problema è proprio il blocco della mainloop.

Lanciando dei processi bloccanti è sempre quello il problema

> Ho provato ad utilizzare Tread, ma ottengo lo stesso risultato

Utilizzare i thread con gtk è una delle cose più difficili (e inutili)
che si possano fare, nonostante decine di post che troverai googlando.

Per risolvere puoi fare 2 cose, usare twisted per lanciare un processo
asincrono o utilizzare IOChannel, qui di seguito un esempio per la
seconda soluzione che ho scritto recentemente, questo aggiorna una
textview ma è facilmente modificabile per le tue esigenze, purtoppo
non hai messo la parte incriminata, se preferisci invece usare twisted
è facilmente traducibile (t.i.r.spawnProcess)

from gi.repository import Gtk, GLib

class MySpawned(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self)

vb = Gtk.VBox(False, 5)
self.tw = Gtk.TextView()
bt = Gtk.Button('Run')
bt.connect('clicked', self.process)

vb.pack_start(self.tw, True, True, 0)
vb.pack_start(bt, False, False, 0)

self.add(vb)
self.set_size_request(200, 300)
self.connect('delete-event', Gtk.main_quit)
self.show_all()

def run(self):
Gtk.main()

def process(self, widget, data=None):
params = ['python', '-h']

def write_to_textview(io, condition):
if condition is GLib.IO_IN:
   line = io.readline()
   self.tw.props.buffer.insert_at_cursor(line)
   return True
elif condition is GLib.IO_HUP|GLib.IO_IN:
GLib.source_remove(self.source_id)
return False

self.source_id = None

pid, stdin, stdout, stderr = GLib.spawn_async(params,

flags=GLib.SpawnFlags.SEARCH_PATH,
standard_output=True)

io = GLib.IOChannel(stdout)

self.source_id = io.add_watch(GLib.IO_IN|GLib.IO_HUP,
 write_to_textview,
 priority=GLib.PRIORITY_HIGH)

if __name__ == '__main__':
s = MySpawned()
s.run()

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Un vero multithread

2013-10-22 Thread Gian Mario Tagliaretti
2013/10/22 Giovanni Vittorio Spina 

ciao Giovanni,


> Ho implementato un modulo che mette uno stream ffmpeg su una surface di
> pygame e funziona fluidissimo. Sto poi facendo un programma che legge uno
> stream da un sensore laser. Se aggiungo stream video e stream laser,
> nonostante sia tutto su thread separati (modulo thread) i calcoli son
> troppi e lo stream video perde pacchetti con un peggioramento evidente
> della qualità video oppure, limitando al massimo il framerate, è lo stream
> del laser a cedere colpi evidenti. Il motivo credo che sia il fatto che a
> livello di calcolo, il modulo thread non implementa un vero multithread, ma
> riunisce comunque tutti sotto un solo processo che gestisce con un sistema
> semaforico particolarmente intelligente.
>
>
Hai pensato di usare il modulo multiprocessing? [1]


> Per ovviare il problema avevo pensato di fare un'applicazione che legge i
> dati dal laser e un'altra con interfaccia grafica e con lo stream video.
>
> Come condivido i dati? Non vorrei usare un sistema client server, mi
> piacerebbe qualcosa di più elegante che mi permetta la condivisione di un
> dizionario con 7-8000 valori ad una frequenza di almeno 10 letture al
> secondo... Avete idee?
>

naturalmente supporta la comunicazione tra i processi [2]

Una discussione interessante sull'argomento che avevo letto [3]

[1] http://docs.python.org/2/library/multiprocessing.html#
[2]
http://docs.python.org/2/library/multiprocessing.html#exchanging-objects-between-processes
[3]
http://stackoverflow.com/questions/5784389/using-100-of-all-cores-with-python-multiprocessing

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Un vero multithread

2013-10-22 Thread Gian Mario Tagliaretti
2013/10/22 Gollum1 

> Con linux potresti aver bisogno di usare un kernel real time.

in che senso scusa?

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] [OT] Che distro usate per il vostro desktop (e quale versione)?

2013-11-29 Thread Gian Mario Tagliaretti
2013/11/29 Karim :
> Cosa usate voi?

Io uso Fedora (o più genericamente Red Hat) praticamente da sempre,
tranne un periodo buio tra Red Hat 7.3 (la miglior distro della
storia) e le prime Fedora, in quel periodo ho usato Debian.e/o Gentoo
(quando ancora c'era Daniel Robbins in sella)

Questo mi fa pensare a quanti anni ho sofferto con gli RPM... se
Fedora avesse Synaptic, che bella vita.

Come al maestro Beri adesso mi avete messo addosso la scimmia Arch, maledetti...

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] [FLAME] (era: Re: Python, redis e bottleneck)

2013-12-19 Thread Gian Mario Tagliaretti
2013/12/19 Nicola Larosa 

> [FLAME FLAME FLAME]

Vediamo se riesco ad attizzarlo..

> La cosa principale che si chiede a un database, come noto.

Maria DB visto che nasce dalle ceneri della fenice com'è? L'avete mai esplorato?

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] TIOBE vs PYPL

2013-12-23 Thread Gian Mario Tagliaretti
2013/12/23 Carlos Catucci :

> Solo una curiosita' (ot lo ammetto) e poi magari chiudiamo la cosa: dove e
> che promessa?

Azzarderei l'elezione della peggior presidente della camera nella
storia della Repubblica ed il suo collega al senato.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] TIOBE vs PYPL

2013-12-23 Thread Gian Mario Tagliaretti
2013/12/23 enrico franchi :

>> Solo una curiosita' (ot lo ammetto) e poi magari chiudiamo la cosa: dove e
>> che promessa?

> Inceneritore. Mi trovate su G+ e per mail, nel caso.

Acc ho sbagliato, la mia era evidentemente la seconda...

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] GUI mi spiegate una cosa al volo?

2014-08-14 Thread Gian Mario Tagliaretti
2014-08-14 9:00 GMT+02:00 Marco Fochesato :

> Io uso le gtk, pygtk!
>
PyGTK è obsoleto da quasi 3 anni, PyGI (pygobject con introspection) è il
pacchetto da usare oggi.


> Buone vacanze a tutti.
>

Altrettanto, se evitassi il top-quoting lo sarebbero anche di più

-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] GUI mi spiegate una cosa al volo?

2014-08-14 Thread Gian Mario Tagliaretti
2014-08-14 9:24 GMT+02:00 Marco Fochesato :

ciao Marco,

> > PyGTK è obsoleto da quasi 3 anni, PyGI (pygobject con introspection) è
> il pacchetto da usare oggi.
> >
>
> E fra quanti anni diventerà obsoleto anche questo?
>
Questo purtroppo non te lo so dire, mentre su PyGTK ci ho lavorato per
quasi 10 anni  ed ho fatto il maintainer per 2 o 3, sul nuovo pygobject
(PyGI) non ci ho lavorato molto, il nuovo mantainer è Simon Feltman.

PyGTK è "durato" 12 anni, dal 1999 al 2011

http://www.johnstowers.co.nz/blog/static/images/imported/activity.png
http://www.johnstowers.co.nz/blog/static/images/imported/activity-auth.png

mi pare un tempo sufficientemente lungo per dichiarare un pacchetto stabile
e su cui puntare, il passaggio ad introspection secondo me farà in modo che
PyGI durerà ancora più a lungo.

> Altrettanto, se evitassi il top-quoting lo sarebbero anche di più

> Sorry,
> così va bene?
>
benissimo.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] GUI mi spiegate una cosa al volo?

2014-08-14 Thread Gian Mario Tagliaretti
2014-08-14 16:07 GMT+02:00 Marco Fochesato :

ciao Marco,

> io non sono un programmatore professionista, ma inizieró a documentarmi su 
> PyGI ed il mio prossimo programmino lo svilupperó con questo modulo.

Abbiamo messo molte delle informazioni sul wiki:

https://wiki.gnome.org/action/show/Projects/PyGObject

Questa versione, tramite l'introspezione, ha permesso anche
l'autogenerazione delle documentazione (reference) di molti moduli
della galassia GTK/Gnome:

http://lazka.github.io/pgi-docs/

in particolare questa è quella del modulo GTK3:

http://lazka.github.io/pgi-docs/#Gtk-3.0

C'è anche un tutorial per l'uso di GTK3 tramite Python:

http://python-gtk-3-tutorial.readthedocs.org/en/latest/

> Nel frattempo mi saró fatto una idea delle differenze e valuteró se fare il 
> porting per le mie applicazioni già esistenti.

C'è anche una pagina sul porting delle applicazioni da PyGTK a PyGI:

https://wiki.gnome.org/Projects/PyGObject/IntrospectionPorting

> Con pygtk mi son sempre trovato bene. Sia su Linux che su Windows.

Su Windows qui ci sono i binari (per adesso GTK 3.10), più moltissimi
dei package della galassia GTK/GNOME inclusi nel tarball:

http://sourceforge.net/projects/pygobjectwin32/files/?source=navbar

Qui ho messo un esempio di setup.py per fare i pacchetti con cx_freeze:

https://wiki.gnome.org/Projects/PyGObject?action=AttachFile&do=view&target=setup.py

La domanda più ricorrente è sull'uso dei thread con GTK, qui ho
scritto un esempio che evita (come la peste) l'uso dei thread ma
utilizza i processi async:

http://stackoverflow.com/questions/20760535/button-stop-cancel-progressbar-from-subprocess-pygtk/20790769#20790769

Spero ti siano utili.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Libreria GUI

2014-09-29 Thread Gian Mario Tagliaretti
2014-09-29 20:57 GMT+02:00 Piacenza Federico :

> grazie del consiglio, PyQT5 era una delle scelte

se l'altra è GTK+3 via pygobject è buona la seconda :)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Libreria GUI

2014-09-29 Thread Gian Mario Tagliaretti
2014-09-29 20:58 GMT+02:00 Carlos Catucci :

>> mi sapreste consigliare una libreria per le GUI in python 2.7 e 3.x; in
>> particolare me ne serve una che permetta di implementare il drad-drop.

> kivy.org

cosa ti ha fatto di male questo povero ragazzo?

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Il troppo stroppia (era: Re: Quando è opportuno usare @staticmethod?)

2014-12-05 Thread Gian Mario Tagliaretti
Il giorno 5 dicembre 2014 15:53, Carlos Catucci
 ha scritto:

> 2014-12-05 15:46 GMT+01:00 enrico franchi :

>> In particolare, il goto di C e' piuttosto safe. Non e' certo il goto dei 
>> vecchi basic. E non ci sono molti costrutti che ci fanno a cazzotti (come in 
>> C++; ma tanto li ho le eccezioni e vado pure meglio)

> Perdonami ma io i problemi che evidenzi a NON usarlo mai visti.

D'accordissimo con Enrico, *non* usandolo la gestione degli errori si
complica, è molto usato (e comodo), inutile dire il contrario

[gianmt@localhost gtk+]$ grep -rw goto * | wc -l
514

[gianmt@localhost glib]$ grep -rw goto * | wc -l
1308

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


[Python] The most diabolic python antipattern

2015-02-01 Thread Gian Mario Tagliaretti
ciao a tutti,

ogni morte di 4 vescovi scrivo qualcosa anche io...ho letto questo
interessante articolo che condivido, anche secondo voi questo è
l'antipattern più diabolico per il pythonista?

https://realpython.com/blog/python/the-most-diabolical-python-antipattern/#%2EVMesuALwiuc%2Elinkedin

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] uscire dalla mailing list

2015-02-06 Thread Gian Mario Tagliaretti
2015-02-03 12:54 GMT+01:00 Giuseppe Caruso :

> Buonasera, come posso fare il withdraw da questa mailing list?

Ma son l'unico a cui interesserebbe sapere la causa per cui si vuole
auto-eliminare dalla lista?

> Cordiali saluti.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] uscire dalla mailing list

2015-02-07 Thread Gian Mario Tagliaretti
On 6 February 2015 at 14:05, Nicola Larosa  wrote:
>> Gian Mario Tagliaretti:

>>> Ma son l'unico a cui interesserebbe sapere la causa
>>> per cui si vuole auto-eliminare dalla lista?

> Simone Federici wrote:
>> non 6 l'unico :-)

> Allora siete in due, e anche parecchio indiscreti.

Questa è una puttanata colossale e lo sai benissimo, nessuno è
intenzionato a farsi i cazzi suoi, la domanda era palesamente una
altra.

> Saranno ben cazzi suoi, no?

Potrebbero anche essere cazzi di tutti, ad esempio se il motivo delle
uscite fosse che su 100 thread 1 parla di Python (numeri volutamente
esagerati ma non lontani dal vero).

Quindi per sommarizzare anche gli altri thread che si sono allontanati
da questo, rafforzando la tesi del 100 a 1, non è che questa lista si
sta trasformando in del trash con un pochetto di python prima dei
pasti?

Saluti e baci
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] uscire dalla mailing list

2015-02-07 Thread Gian Mario Tagliaretti
2015-02-07 9:41 GMT+01:00 Carlos Catucci :

> Voglio sperare che il tuo tono alto sia tale per essere volutamente
> provocatorio e smuovere le acque.

A dire il vero il tono si è alzato solo come conseguenza, azione ->
reazione come insegnano a scuola..

> Vero che spesso si cazzeggia, si deriva, ma a me sembra un ambiente tra
> amici, e non una di quei posti come StackOverflow.

Tra stack overflow e quello che succede qua dentro c'è in mezzo
l'oceano pacifico.

> Qui ci si conosce bene o male. Le persone che ho visto andare via (in
> effetti una statistica potrebbe aiutare) mi sembra siano persone che non si
> sono integrate ma sopratutto persone che sono venute per chiedere un aiuto
> specifico (alla StackOverflow appunto) e poi via.

Io non sto dicendo che il thread cazzeggiatorio non ci stia, anzi
tutto il contrario.

> Se un thread degenera o non ti interssa, basta un filtro nella posta e non
> lo vedi neppure. Pero' poi trovi spunti interessanti. A volte ravanando nei
> vecchi post ho trovato soluzioni senza tornare a chiedere cose gia'
> dibattute.
>
> [snippone di diversa roba]

Ti stai buttando in voli pindarici, volevo solo sapere se la gente si
sta cancellando dalla ML per la qualità dei contenuti/interventi,
that's really all.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] uscire dalla mailing list

2015-02-07 Thread Gian Mario Tagliaretti
2015-02-07 11:49 GMT+01:00 Simone Federici :

> la sua mail ce l'hai, chiediglielo e risolvi la faccenda in modo personale.
> :-)

ma belin, non son mica io che ha scatenato un casino, avevo solo fatto
una semplice domanda.

Chiudiamola qua per favore, grazie
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] uscire dalla mailing list

2015-02-07 Thread Gian Mario Tagliaretti
On 7 February 2015 at 16:50, Nicola Larosa  wrote:

> Tipo questa? <http://www.youtube.com/watch?v=Rb3ZRzsEm_M>

clap clap clap (cit.)
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Ne ho sentite tante, ma questa... (era: Re: Nim Language)

2015-02-18 Thread Gian Mario Tagliaretti
2015-02-18 11:17 GMT+01:00 Carlos Catucci :

Caro Carlos,

> SIccome mi considero tra amici gli insulti non li considero. Invece mi piace
> ascoltare pareri e punti di vista diversi, per poter crescere. Qui dentro ci
> sono diversi "mostri sacri" (almeno per me) e a leggere imparo. Anche se
> spesso, come dice un'altra persona di cui non faro' il nome, non riesco a
> capire tutto quello che dite, ma ne approfitto per documentarmi.
> Giusto per dire, io sno stato un sostenitore di Java nelle prime versioni
> (diciamo 1.3, 1.4 fino a 1.5) ma poi e' sploso tutto. Troppe versioni,
> troppe differenze, e un sacco di scelte implementative che non mi piacevano.
> Sara' che io venivo da C++, mi sarebbe piaciuto un qualcosa WORM e
> all'inizio Java semnbrava esserlo. Poi a mio parere e' diventato caotico.

tu non ti devi mica giustificare, Il Sig. Nicola Larosa con i suoi
modi pacati, sempre comprensibili, ma soprattutto estremamente
educati, sta contestando il paragone che hai fatto tra java e go,
ovviamente difendendo ques'ultimo.

Posso anche capire e condividere la critica, ma essendo lui uno di
quelli sull'olimpo non te lo dirà mai in maniera comprensibile, mai
togliere la nube davanti agli occhi degli umani, potrebbero non
reggere la vista dei numi (cit.)

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


Re: [Python] Ne ho sentite tante, ma questa... (era: Re: Nim Language)

2015-02-18 Thread Gian Mario Tagliaretti
2015-02-18 11:52 GMT+01:00 Nicola Larosa :

> Sfotti, eh? :-) Fai bene, ognuno ha il suo stile.

Nope, non stavo sfottendo, era solo un po' di sana ironia.

>> sta contestando il paragone che hai fatto tra java e go, ovviamente
>> difendendo ques'ultimo.
>
> Beh, non è tanto ovvio, apparentemente. Però sì, mi sembra ci sia un
> abisso fra i due. Non sono minimamente preoccupato.

Sono assolutamente d'accordo con la tua valutazione dei due linguaggi,
la parte triste è che non fai nulla per rendere esplicito il tuo
pensiero, e di conseguenza si creano incomprensioni, come questo
thread chiaramente ha evidenziato.

Da una persona estremamente preparata come sei tu è un peccato vedere
nella maggiornanza dei post solo del cazzeggiamento, quando invece
potresti bagnare il naso a tutti e farci imparare molto.

> Essere da questa parti da lustri non mi dà alcuno status, se non quello
> di fare il cazzone quanto mi pare e piace.

se il termine sono i lustri siamo almeno in due a poter fare i cazzoni :-)

> Questo è probabilmente il peggiore insulto che abbia mai ricevuto.
> Rispedito al mittente con i complimenti per la cattiveria.

Non era un insulto, tutt'altro, ma il mezzo di comunicazione non aiuta.

ciao
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python


<    1   2   3   >