os.popen encoding!

2009-02-18 Thread SMALLp
Hy. I'm playing with os.popen function. a = os.popen(somecmd).read() If one of the lines contains characters like è, æor any other it loks line this velja\xe8a 2009 with that \xe8. It prints fine if i go: for i in a: print i: How to solve this and where exectly is problem with print or

Re: os.popen encoding!

2009-02-18 Thread SMALLp
Thanks for help! My problem was actualy: a = [velja\xe8a 2009] print a#will print [velja\xe8a 2009] Print a[0]#will print veljaèa 2009 Hrvoje Niksic hnik...@xemacs.org wrote in message news:87ocwzzvym@mulj.homelinux.net... Gabriel Genellina gagsl-...@yahoo.com.ar writes: I'm

Python, threading

2008-12-11 Thread SMALLp
Hy. I have a problem! I'm making multi thread application (client, server) using wxPython for GUI, and threading.Thread for threding. Clients connect and when they are connected (evry thread handles one connection) threads change main window. I neded tip how to make communication between

Transparent bitmap(image) in windows!

2008-04-05 Thread SMALLp
Hello everyone! First I want to apologize for asking question about wxPython on this group. I'm doing project that uses wx.ScrolledPanel few wx.Bitmap on it. It all looks wonderful on Ubuntu and very very bad on windows because images aren't transparent. As a found out it is problem that

Re: Transparent bitmap(image) in windows!

2008-04-05 Thread SMALLp
) self.karta = wx.StaticBitmap(self.mPanel, -1, kartaGif, (10, 10), (kartaGif.GetWidth(), kartaGif.GetHeight())) self.karta.Bind(wx.EVT_LEFT_DOWN, self.getPos) /CODE SMALLp wrote: Hello everyone! First I want to apologize for asking question about wxPython

Re: Run Python app at startup

2008-03-04 Thread SMALLp
Gabriel Genellina wrote: En Sun, 02 Mar 2008 19:37:35 -0200, SMALLp [EMAIL PROTECTED] escribi�: Hy. I create simple application. Yust an windows and compile it with py2exe. I add registry value reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MyApp /t REG_SZ

Re: Python app at startup!

2008-03-02 Thread SMALLp
PROTECTED] On Feb 29, 7:21 am, SMALLp [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Does it do the same thing when you run it with the Python interpreter? No. The programm works fine! In interupter and when i compile it. My guess is that you're not including something in the .exe that you

Run Python app at startup

2008-03-02 Thread SMALLp
Hy. I create simple application. Yust an windows and compile it with py2exe. I add registry value reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MyApp /t REG_SZ /d C:\myapp.exe /f' And it wont start. When i use console instead od window in py2exe i get console opend

Re: Python app at startup!

2008-02-29 Thread SMALLp
[EMAIL PROTECTED] wrote: On Feb 28, 5:07 pm, SMALLp [EMAIL PROTECTED] wrote: Hy. I create simple application. Yust an windows and compile it with py2exe. I add registry value reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MyApp /t REG_SZ /d C:\myapp.exe /f

Python app at startup!

2008-02-28 Thread SMALLp
Hy. I create simple application. Yust an windows and compile it with py2exe. I add registry value reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MyApp /t REG_SZ /d C:\myapp.exe /f' And it wont start. When i use console instead od window in py2exe i get console

Ignore exceptions

2008-01-24 Thread SMALLp
. SMALLp -- http://mail.python.org/mailman/listinfo/python-list

Python printing!

2008-01-23 Thread SMALLp
Hy. How to use printer in python. I goggled little i I found only some win32 package which doesn't look processing for cross platform application. (I'm using USB printer and I tried to f=open(dev/...) usb port but i couldn't fond where printer is! Tnx! SMALLp -- http://mail.python.org

Downlod from FTP, pickle

2008-01-17 Thread SMALLp
Hy! I have a little problem. I have to download file from FTP sp i use ftplib. And then i have to pickle.load from that file. I make callback function that saves line by line into temporary file and now i cant read from that file and when i close it i diapers. Thanks! --

py2exe command prompt whenr run

2008-01-03 Thread SMALLp
HY! I'm using py2exe to port my applications on windows so user won't have to install python and other dependencies. Everything works file except when i run any of programs it star's command prompt before program starts. How can i avoid this to happen, and is there any other way of porting my

Bind mouse over event for panel (or Static text) wxPython

2008-01-02 Thread SMALLp
How to? I couldn't find anything except EVT_ENTER_WINDOW that didn't work. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python events, panel with text

2008-01-02 Thread SMALLp
SMALLp wrote: Hy! I have many small panels with text and I want do bind wx.EVT_LEFT_DOWN when clicked on panel, but i need to bind that in parent class. So I have instance of that small panel and when i bind it efects only part of small panel where is no text. code import wx

Python events, panel with text

2008-01-01 Thread SMALLp
Hy! I have many small panels with text and I want do bind wx.EVT_LEFT_DOWN when clicked on panel, but i need to bind that in parent class. So I have instance of that small panel and when i bind it efects only part of small panel where is no text. code import wx class

Compiler or stg. to get exe!

2007-12-28 Thread SMALLp
Hy! I have question. After short goggling, I haven't found anything good. So my question is: I wrote a program in python and i Get .py files and some .pyc in working folder. Now i want program tu run under windows, so i need to get exe files or something. And what do i need to do to make

Python mouse EVT_COMMAND_LEFT_CLICK, EVT_LEFT_DOWN

2007-12-27 Thread SMALLp
Hy! I'm not able to tu bind mouse click event. Code: class MouseClass(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id, size=(500, 300)) self.SetBackgroundColour(WHITE) sizer = wx.BoxSizer(wx.VERTICAL)

mysqldb SELECT COUNT reurns 1

2007-12-27 Thread SMALLp
Hy! I nave another problem I can't solve! code import MySQLdb as mysql connectionString = {host:localhost, user:root, passwd:pofuck, db:fileshare} dataTable = files conn = mysql.connect(host=connectionString[host], user=connectionString[user], passwd=connectionString[passwd],

Re: mysqldb SELECT COUNT reurns 1

2007-12-27 Thread SMALLp
Rob Williscroft wrote: SMALLp wrote in news:[EMAIL PROTECTED] in comp.lang.python: Hy! I nave another problem I can't solve! code import MySQLdb as mysql cursor = conn.cursor() sql = SELECT COUNT(*) FROM + dataTable res = cursor.execute(sql) I think you need to do: res

Re: Beginner question!

2007-12-21 Thread SMALLp
[EMAIL PROTECTED] wrote: On Dec 21, 9:11 am, SMALLp [EMAIL PROTECTED] wrote: Hy! I have error something like this TypeError: unbound method insert() must be called with insertData instance as first argument (got str instance instead) CODE: File1.py sql.insertData.insert(files, data

Beginner question!

2007-12-21 Thread SMALLp
Hy! I have error something like this TypeError: unbound method insert() must be called with insertData instance as first argument (got str instance instead) CODE: File1.py sql.insertData.insert(files, data) sql.py class insertData: def insert(self, dataTable, data):

Re: Beginner question!

2007-12-21 Thread SMALLp
[EMAIL PROTECTED] wrote: Traceback (most recent call last): File /home/pofuk/MzMFIleShare/sharePanel.py, line 130, in share self.scanDirsAndFiles(dirPath) File /home/pofuk/MzMFIleShare/sharePanel.py, line 158, in scanDirsAndFiles sql.insertData.insert(files, data) TypeError:

Re: Beginner question!

2007-12-21 Thread SMALLp
Carsten Haese wrote: On Fri, 2007-12-21 at 18:06 +0100, SMALLp wrote: sql =INSERT INTO +dataTable+ (user_name, file_name, file_size, file_path_local, file_path_FTP, curent_location, FTP_valid_time, uploaded, last_modified, last_verified, file_type, file_category) VLAUES

wxPython FileDialog, select folder

2007-12-20 Thread SMALLp
How can i select folder either with wx.FileDialog or with any other. I managed to fine only how to open files but I need to select folder to get files from all sub folders. Thanks in advance! -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython FileDialog, select folder

2007-12-20 Thread SMALLp
Chris Mellon wrote: On Dec 20, 2007 3:19 PM, SMALLp [EMAIL PROTECTED] wrote: How can i select folder either with wx.FileDialog or with any other. I managed to fine only how to open files but I need to select folder to get files from all sub folders. There's a separate dialog

Re: wxPython FileDialog, select folder

2007-12-20 Thread SMALLp
farsheed wrote: import wx def dirchoose(): 'Gives the user selected path. Use: dirchoose()' global _selectedDir , _userCancel #you should define them before userPath = 'c:/' app = wx.App() dialog = wx.DirDialog(None, Please choose your project

Allingn controls wxPython

2007-12-15 Thread SMALLp
Hy. I need help. I'm using BoxSizer and i put TextCtrl and StaticText next to each other and they gor alligned by top of TextCtrl and it looks terrible. How can i make thm to be alligned by center of each controll. Thnaks! -- http://mail.python.org/mailman/listinfo/python-list

Python import search path!

2007-12-14 Thread SMALLp
Hy! I'm new in Linux, and i feel little less newer in python. I need advice and help. I'm making an application witch purpose is irrelevant. It has a lot of code for now and I've only made interface. So I've tried to split code into separate files and in windows as I remember worked file when

Re: Python import search path!

2007-12-14 Thread SMALLp
[EMAIL PROTECTED] wrote: On Dec 14, 3:44 pm, SMALLp [EMAIL PROTECTED] wrote: Hy! I'm new in Linux, and i feel little less newer in python. I need advice and help. I'm making an application witch purpose is irrelevant. It has a lot of code for now and I've only made interface. So I've tried

Pascal code checker!

2007-12-12 Thread SMALLp
Hy! I desperately need help! I need to make application that would accept Pascal code and check if it returns good results. My idea is (from a beginner point of view) to make application in python that would send code (text) to pascal compiler (Free pascal compiler that can be used from

Witch editor to use!

2007-11-30 Thread SMALLp
Hello! I'm new in wxPython and before i start doing anything I have one qustion. Shoul I use some of editors like boa, spe or shoud i use my favorite text editor! i used IDLE on windows and it seamd nice. Now i have linux installed on my mashine and boa works, spe wont start, IDLE crashes

Re: wxPython problem

2007-11-28 Thread SMALLp
[EMAIL PROTECTED] wrote: On Nov 28, 1:06 pm, SMALLp [EMAIL PROTECTED] wrote: Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed IDLE, and i installed package python-wxgtkX. I start IDLE and when i want co compile my aplication all windows close. Also when i vrite smoethin

wxPython problem

2007-11-28 Thread SMALLp
Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed IDLE, and i installed package python-wxgtkX. I start IDLE and when i want co compile my aplication all windows close. Also when i vrite smoethin lik thile in IDLE: import wx app = wx.App() wx.Frmae(none, -1) same thing,

Re: wxPython problem

2007-11-28 Thread SMALLp
SMALLp wrote: [EMAIL PROTECTED] wrote: On Nov 28, 1:06 pm, SMALLp [EMAIL PROTECTED] wrote: Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed IDLE, and i installed package python-wxgtkX. I start IDLE and when i want co compile my aplication all windows close. Also when i

Python beginner!

2007-11-15 Thread SMALLp
Could someone please paste some program in wxPython that uses inharitance. I would be very thankfull. -- http://mail.python.org/mailman/listinfo/python-list

Help needed!

2007-11-12 Thread SMALLp
I'm new in python and i got lost. Ima building an aplication that add's 2 panels and menu bar to the window. So i made base class that makes window, menuBarClass that inherits mainWindowClass. Problem is with PanelClass that would need to inherit MainWindowClass to add panels. So if someone

Re: Help needed!

2007-11-12 Thread SMALLp
I forgot, I'm using wxPython SMALLp [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm new in python and i got lost. Ima building an aplication that add's 2 panels and menu bar to the window. So i made base class that makes window, menuBarClass that inherits mainWindowClass