analitics

Pages

Sunday, June 21, 2009

PyGTK 2.15.2 - unstable

As you know, PyGTK is a set of Python wrappers.
Now PyGTK easily create programs with a graphical user interface using the Python programming language.
The new PyGTK version 2.15.2 and is on PyGTK 2.15.2 source.
From http://pygtk.org
"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."

Tuesday, March 24, 2009

Python - random passwords

This program generates passwords on the size of 10 characters.
By using a function called "random_password" that creates a password of size 10 characters.
This function called "write_file" creates a file with automatic redial function "random_password. It contains a table of 10 X 10 random passwords.

from random import *
import string
chars = string.ascii_letters + string.digits
def random_password():
a = "".join(choice(chars) for x in range(randint(10, 10)))
b = a + ' | '
return b
def write_file():
f = open('random_pass.txt', 'wr+')
for c in range(10):
rand=''
for r in range(10):
rand = rand + random_password()
randpass=rand + random_password() + '\n'
f.write(str(randpass))
f.close()
write_file()