About problems that I have with learning wxPython in Macintosh

2010-07-15 Thread ata.jaf
Hi,
I'm newbie to wxPython and need it to develop my little app.
But from start I have problems with tutorials. Because all of them are
compatible with Windows but not so much with Mac.
For example in this code:


import wx

class MainWindow(wx.Frame) :
 def __init__(self, parent, title) :
   wx.Frame.__init__(self, parent, title=title, size=(200, 100))
   self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
   self.CreateStatusBar()

   filemenu = wx.Menu()

   filemenu.Append(wx.ID_ABOUT, '&About', ' Information about this
program.')
   filemenu.AppendSeparator()
   filemenu.Append(wx.ID_EXIT, 'E&xit', ' Terminate the program')

   menuBar = wx.MenuBar()
   menuBar.Append(filemenu, '&File')
   self.SetMenuBar(menuBar)
   self.Show(True)

app = wx.App(False)
frame = MainWindow(None, 'Sample editor')
app.MainLoop()



The menus doesn't appear in the product.
Can anyone help me to find a tutorial that is for using wxPython on a
Mac?
Thanks
Ata
-- 
http://mail.python.org/mailman/listinfo/python-list


suitable py2app.

2010-07-27 Thread ata.jaf
Hi,
I'm looking for a suitable tutorial for "py2app". I googled it but
couldn't find anything.
Can you help me please?
Thanks
Ata
-- 
http://mail.python.org/mailman/listinfo/python-list


Looking for an appropriate encoding standard that supports all languages

2010-08-17 Thread ata.jaf
I am developing a little program in Mac with wxPython.
But I have problems with the characters that are not in ASCII. Like
some special characters in French or Turkish.
So I am looking for a way to solve this. Like an encoding standard
that supports all languages. Or some other way.

Thanks
Ata Jafari
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Looking for an appropriate encoding standard that supports all languages

2010-08-19 Thread ata.jaf
On Aug 17, 11:55 pm, Thomas Jollans  wrote:
> On Tuesday 17 August 2010, it occurred to ata.jaf to exclaim:
>
> > I am developing a little program in Mac with wxPython.
> > But I have problems with the characters that are not in ASCII. Like
> > some special characters in French or Turkish.
> > So I am looking for a way to solve this. Like an encoding standard
> > that supports all languages. Or some other way.
>
> Anything that supports all of Unicode will do. Like UTF-8. If your text is
> mostly Latin, then just go for UTF-8, if you use other alphabets extensively,
> you might want to consider UTF-16, which might the use a little less space.

OK, I used UTF-8.
I write a line of strings in the source code and I want my program to
show that as an output on GUI. And this line of strings includes a
character like "ü". But I see that in GUI this character is replaced
with another strange characters. I mean it doesn't work.
And when I try to use UTF-16, I get an syntax error that declares
"UTF-16 stream does not start with BOM".
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Looking for an appropriate encoding standard that supports all languages

2010-08-20 Thread ata.jaf
On Aug 19, 11:48 am, Steven D'Aprano  wrote:
> On Thu, 19 Aug 2010 01:29:51 -0700, ata.jaf wrote:
> > On Aug 17, 11:55 pm, Thomas Jollans  wrote:
> >> On Tuesday 17 August 2010, it occurred to ata.jaf to exclaim:
>
> >> > I am developing a little program in Mac with wxPython. But I have
> >> > problems with the characters that are not in ASCII. Like some special
> >> > characters in French or Turkish. So I am looking for a way to solve
> >> > this. Like an encoding standard that supports all languages. Or some
> >> > other way.
>
> >> Anything that supports all of Unicode will do. Like UTF-8. If your text
> >> is mostly Latin, then just go for UTF-8, if you use other alphabets
> >> extensively, you might want to consider UTF-16, which might the use a
> >> little less space.
>
> > OK, I used UTF-8.
> > I write a line of strings in the source code
>
> Do you have a source code encoding line at the start of your script?
>
> http://www.python.org/dev/peps/pep-0263/
>
> > and I want my program to
> > show that as an output on GUI. And this line of strings includes a
> > character like "ü". But I see that in GUI this character is replaced
> > with another strange characters. I mean it doesn't work. And when I try
> > to use UTF-16, I get an syntax error that declares "UTF-16 stream does
> > not start with BOM".
>
> What GUI are you using?
>
> Please COPY AND PASTE (do not retype) the EXACT error message you get,
> including the entire traceback.
>
> --
> Steven

Yes I have a source code encoding line.
Here it is:


# -*- coding: utf_16 -*-


I am using WxPython.

And the error that I get about using utf-16 is:\



Traceback (most recent call last):
  File "", line 1, in 
  File "z.py", line 2
SyntaxError: UTF-16 stream does not start with BOM
-- 
http://mail.python.org/mailman/listinfo/python-list