detect mouse pointer type

2014-11-04 Thread Peter Irbizon
Hello, please how can I detect mouse pointer type? I would like to print every mouse pointer change (arrow, hand, ...) while moving my mouse over screen. How can I do this? (for now I need it for windows, but cross-platform solution is highly appreciated) Many thanks. --

PYQT4 referer in javascript still blank

2014-11-01 Thread Peter Irbizon
Hello, I am trying to set referrer for my script this way in PYQT4: class NetworkManager(QNetworkAccessManager): def createRequest(self, op, req, outgoing_data): req.setRawHeader('Referer', 'http://www.my-university.com/') req.setRawHeader('Accept-Language', 'en')

after applicatio​n close MS Visual C++ runtime library error occurs

2012-01-11 Thread Peter Irbizon
Hello, I am using psycopg2 in windows app, example: import psycopg2 import psycopg2.extras self.con = psycopg2.connect(dbname= host= user= password= port=); self.cur = self.con.cursor(cursor_factory=psycopg2.extras.DictCursor) SELECT = select something self.cur.execute(SELECT) for row in

incorporate png/ico to exe and use it in application

2011-08-23 Thread Peter Irbizon
hello, I am zsing py2exe to compile exe files. I would like to incorporate png and icon file into exe and then use it during program run (to show it in about dialog and system tray). How can I do it? For example now I use self.staticon.set_from_file(os.path.join(module_path(), icon.ico)) but I

aboutdialog space between program name/version and logo

2011-08-23 Thread Peter Irbizon
Hello, please how can i set space between program name/version and logo in this code? thanks about = gtk.AboutDialog() about.set_program_name(name) about.set_version(0.0.1) about.set_logo(gtk.gdk.pixbuf_new_from_file(file.png)) -- http://mail.python.org/mailman/listinfo/python-list

gtk STOCK_SAVE text in another language

2011-08-10 Thread Peter Irbizon
hello, I have slovak win but I would like to have english captions on pygtk STOCK_SAVE buttons. How can I set this? thanks -- http://mail.python.org/mailman/listinfo/python-list

problem with GTK language

2011-08-10 Thread Peter Irbizon
Hello, I have strange problem with gtk language in pygtk. When I run .py file it shows all gtk labels in my default windows language (slovak). But when I compile it with py2exe and run exe file all labels are in english. Why this happens? How can I define on program startup which language to use?

HSeparator() in gtk.layour

2011-08-04 Thread Peter Irbizon
hello, how can I add hseparator to gtk.layout? I tried hseparator = gtk.HSeparator() self.layout.put(hseparator, 50,195) but it does not work :/ -- http://mail.python.org/mailman/listinfo/python-list

Re: gettext switch language on the fly

2011-07-29 Thread Peter Irbizon
hello Chris, I am using pygtk. 2011/7/29 Chris Rebert c...@rebertia.com On Thu, Jul 28, 2011 at 6:20 PM, Peter Irbizon peterirbi...@gmail.com wrote: hello, I am using gettext fo localization snip Now I would like to switch all texts in my app when I click on item in menu

Re: multilanguage application - step by step

2011-07-29 Thread Peter Irbizon
Hello Thomas, The usual way of using gettext is to use the system locale to determine the right language. Of course, you can have different translations and install() them (I expect), but you'll have to re-load all the strings displayed in your application when you switch language, which

how to make checkitem menu and allow to be checked only one item?

2011-07-29 Thread Peter Irbizon
Hello geeks, I have this code in my app: self.menu_items = ( ( /_Languages, None,None, 0, Branch ), ( /Languages/_english, None,self.print_lang, 0, CheckItem ), ( /Languages/_german, None,self.print_lang, 0, CheckItem ), )

Re: multilanguage application - step by step

2011-07-29 Thread Peter Irbizon
Well, it depends on how you're constructing your interface. If you're creating all the widgets in Python code, you could move all your foo.text = Bar; statements to one method that updates the text for all widgets, and call that both from the constructor and from the language-switching event

change gtk STOCK_SAVE label text on the fly

2011-07-29 Thread Peter Irbizon
Hello, how could I change STOCK_SAVE label text? I would like to have Save it! instead of Save And other question related to this is how can I change translation of STOCK_SAVE on the fly? I think I need to set locale for pygtk...but don't know how --

Re: change gtk STOCK_SAVE label text on the fly

2011-07-29 Thread Peter Irbizon
(Don't feel you need to answer this: Do you really think you need on-the-fly language switching? It's cool, but how many users are going to want to use that?) yes, you're right. anyway it's cool feature and I hoped it's easy to do it in python / but it isn't... Why do you want to change it? I

multilanguage application - step by step

2011-07-28 Thread Peter Irbizon
Hello guys, I would like to translate all strings in my application for several languages (eng, es, de, etc) and user should be able to switch app from one language to another. I am still newbie with python so is there any step-by-step tutorial how to to this? thanks for help --

Re: multilanguage application - step by step

2011-07-28 Thread Peter Irbizon
it in googlegroups (don't know why) thanks 2011/7/28 Chris Rebert c...@rebertia.com On Thu, Jul 28, 2011 at 2:11 AM, Peter Irbizon peterirbi...@gmail.com wrote: Hello guys, I would like to translate all strings in my application for several languages (eng, es, de, etc) and user should be able

gettext switch language on the fly

2011-07-28 Thread Peter Irbizon
hello, I am using gettext fo localization local_path=os.path.join(module_path(), lang_folder) gettext.bindtextdomain(lang_name, local_path) gettext.textdomain(lang_name) # Get the language to use lang = gettext.translation(lang_name, local_path,

The following modules appear to be missing - py2exe

2011-07-19 Thread Peter Irbizon
Hello, please I have problem with The following modules appear to be missing message during compiling my app exe file with py2exe. What should I do with this? Many thanks in advance. The following modules appear to be missing ['Carbon', 'Carbon.Files', '_scproxy', 'fixedpoint', 'gdk', 'mx',

Re: module problem on windows 64bit

2011-06-28 Thread Peter Irbizon
kinterbasdb's extension module _kinterbasdb.pyd depends on the shared library fbclient.dll. The Firebird client library is of the Firebird SQL server. As I already explained you have to install the 32bit (!) version of Firebird and enable the copy client dll to system32 option during the

module problem on windows 64bit

2011-06-27 Thread Peter Irbizon
Hello, on 32-bit windows everything works ok but on 64-bit win I am getting this error: Traceback (most recent call last): File app.py, line 1040, in do_this_now File kinterbasdb\__init__.pyc, line 119, in module File kinterbasdb\_kinterbasdb.pyc, line 12, in module File

can I distribute Microsoft.VC90.CRT files?

2011-06-27 Thread Peter Irbizon
hello, I find out that my program needs Microsoft.VC90.CRT.manifest,msvcm90.dll,msvcp90.dll,msvcr90.dll files when I want to run it on win 64bit systems. I find these files in some other software. Can I simply take it from another software then include it to my program folder and distribute it

Re: module problem on windows 64bit

2011-06-27 Thread Peter Irbizon
Are you running 32bit or 64bit Python on your 64bit Windows box? You have to install the same flavour of Python, kinterbasdb and Firebird SQL (all 32bit or all 64bit). You also have to check the copy client dlls to system directory check box during the installation of Firebird SQL. I guess

Re: can I distribute Microsoft.VC90.CRT files?

2011-06-27 Thread Peter Irbizon
Read the EULA that comes with Microsoft Visual C++ Redistributable Package. thanks. hm, but it looks like every user should download redistributable package and then istall it, right? I would like to prevent this because every action which requires user's interaction is not good (high chance he

Re: python + php encrypt/decrypt

2011-06-07 Thread Peter Irbizon
Hello Ian, thanks, I found another php script but it is not working as well :/ What am I doing wrong? And I have another question too: when I use text for encoding Text for 1 and Text for 11 the first letters of encoded strings are the same in both strings? here is my py: # -*- coding: utf-8 -*-

ugly exe icon in win7/vista

2011-06-06 Thread Peter Irbizon
Hello, I am trying to make nice icons for my program. I compiled it with py2exe but problem is that exe icon in Win 7/vista is not very nice (it looks like win7 takes 32x32 instead of 248x248icon) I used png2ico to pack icon file: png2ico icon.ico png248x248.png png32x32.png png16x16.png Any

Re: python + php encrypt/decrypt

2011-06-05 Thread Peter Irbizon
am trying do decrypt data in python then store it as base64 and read and decrypt it in php. 2011/6/4 hid...@gmail.com Use xml to pass the encrypt text. On , Peter Irbizon peterirbi...@gmail.com wrote: Hello, I would like to encrypt text in python and decrypt it in my PHP script. I

python + php encrypt/decrypt

2011-06-04 Thread Peter Irbizon
Hello, I would like to encrypt text in python and decrypt it in my PHP script. I tried to use pycrypto and some aes php scripts but the results are not the same. Please, is there any example (the best way source codes) how to do this in python and PHP? --