Welcome
Welcome to dinksoftware

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

Python win32 Native GUI app

Holiverh's izHawt Python....

Python win32 Native GUI app

Postby Aurel » Thu Nov 25, 2010 5:16 pm

Im in first place basic programer and i use many basic compilers like
Free Basic ,Pure basic and mostly IW Basic .
And i was wonder how looks code in python for simple GUI window
natively produced by win32 Api?
I understand that python is interpreted language but hey they are many other interpreters
and are not so damn slow like python.
Dont get me wrong i dont hate python( of course py have your own charm)
but i cannot understand why is so slow on my XP windows.
Heck i think that is slower then mine ABasic interpreter .
User avatar
Aurel
Active member
 
Posts: 48
Joined: Thu Nov 25, 2010 4:30 pm

 

Re: Python win32 Native GUI app

Postby Dink » Thu Nov 25, 2010 5:24 pm

I don't know very much about Python and Holiverh can probably answer your question a lot better than I ever could. Look into TKinter for creating GUIs for Python as on way;
http://wiki.python.org/moin/TkInter
http://www.pythonware.com/library/tkinter/introduction/
User avatar
Dink
 
Posts: 531
Joined: Sat Jul 11, 2009 9:59 am
Location: Australia

Re: Python win32 Native GUI app

Postby Aurel » Thu Nov 25, 2010 5:33 pm

I will wait for this guy Holywer...
personaly ithink that this tkinter is to much odd for me.
User avatar
Aurel
Active member
 
Posts: 48
Joined: Thu Nov 25, 2010 4:30 pm

Re: Python win32 Native GUI app

Postby Dink » Thu Nov 25, 2010 5:38 pm

I haven't played around with it much, but I believe it uses a similar cell grid style for placement of elements etc. A quick Google search found http://www.ittc.ku.edu/~niehaus/classes ... index.html which looks like a useful resource.

Aurel wrote:Holywer


Rofl... :)

Add a forum avatar also maybe?
User avatar
Dink
 
Posts: 531
Joined: Sat Jul 11, 2009 9:59 am
Location: Australia

Re: Python win32 Native GUI app

Postby Aurel » Thu Nov 25, 2010 6:14 pm

Heh...
yes man have weird name
oups....me
Holiver is'nt?
User avatar
Aurel
Active member
 
Posts: 48
Joined: Thu Nov 25, 2010 4:30 pm

Re: Python win32 Native GUI app

Postby Aurel » Fri Nov 26, 2010 2:06 am

I fond two GUI s for windows:
Venster in alpha stage
py32win.
After few looks i can say that Python is not language for windows.
User avatar
Aurel
Active member
 
Posts: 48
Joined: Thu Nov 25, 2010 4:30 pm

Re: Python win32 Native GUI app

Postby Holiverh » Sat Nov 27, 2010 3:44 am

Python is not a language for any specific platform, it'll happily run on Windows, Mac, Linux, BSD, Solaris and probaly a few more. If you want access to native win32 pywin32 which I hear is quite stable and feature-full; haven't used it though.

If you care about portability you may want to try avoiding platform-specific stuff. If you don't want to use Tkinter take a look at wxPython. It provides abstraction of platform-specific GUI toolkits including Window's, Mac's and GTK+.

Tkinter is stable, and is included with all modern Python distributions, however, it lacks a complete (in comparison with others) widget set. It's also quite old and unoffcially depreceated. Documentation isn't too bad, but sometimes you may need to do some digging. Using it though is quite simple...
Code: Select all
# A verbose example... If using py3, "import tkinter as tk" instead.
import Tkinter as tk

class MainWindow(tk.Toplevel):

    def __init__(self, parent):
        tk.Toplevel.__ini__(self, parent)

        tk.Label(self, text="Hello, world!").pack()
        # Add your own widgets, event and protocol handlers...
        return

if __name__ == "__main__":
    tk_root = tk.Tk()
    tk_root.withdraw()
    MainWindow(tk_root)
    tk_root.minaloop()


I understand that python is interpreted language but hey they are many other interpreters
and are not so damn slow like python.
Dont get me wrong i dont hate python( of course py have your own charm)
but i cannot understand why is so slow on my XP windows.
Heck i think that is slower then mine ABasic interpreter .

What exactly were you trying to do with Python? I'm an advocate of Python but I accept it may be a bit sluggish when crunching numbers' but you'd get this with all interpreted languages to some degree.
User avatar
Holiverh
 
Posts: 243
Joined: Sun Jul 12, 2009 10:37 am
Location: East Anglia, UK

Re: Python win32 Native GUI app

Postby Aurel » Sat Nov 27, 2010 7:59 am

Hi...
What exactly were you trying to do with Python?

I wanna try build few test with python with native windows GUI api.
That i see how works and how is fast.
All my previus atempt going me to conclusion that python very slow language.
Compared with many other basic interpreters.
I know that python is primary build in linux environment and maby this is reason .
However i try once pygame and few examples with trigonometric functions and work ok.
by the way im not used to much for object oriented programming simply becose i dont like
to much this way of programming .
Considering Linux i only use from time to time SliTaz 2.0 linux - fast&small.
But i dont do any programming on linux ,why... i simply dont wanna bothering myself
with OS which dont have nativly GUI subsystem.
Again however i will try something on python ...but only on windows.
User avatar
Aurel
Active member
 
Posts: 48
Joined: Thu Nov 25, 2010 4:30 pm

Re: Python win32 Native GUI app

Postby Dink » Sat Nov 27, 2010 8:01 am

I think Python is a better language and more powerful than most dialects of BASIC in reality. I'm not a huge fan of Linux either as I simply don't know how to use it much and get confused when there is no longer a GUI way to do everything like there is in Windows which I am used to.
User avatar
Dink
 
Posts: 531
Joined: Sat Jul 11, 2009 9:59 am
Location: Australia

Re: Python win32 Native GUI app

Postby Aurel » Sat Nov 27, 2010 8:09 am

I think Python is a better language and more powerful than most dialects of BASIC in reality

Dink...
I cannot say that python is not powerfull , unfortunatly your guessing is far away from reality.
Did you ever try:
Power Basic
Pure Basic
Free Basic
IW Basic
all of this are basic compiler which compile directly to native win32 standalone aplication.
and all of this support full Object oriented way of programmming if you mean under
powerfull python.
I dont see what python can offer better and much powerfull then this languages.
Infact he is just a interpreter which support OO way of programming nothing more .
Look what all can for example thinBasic which is basic interpreter.
And speed of execution is much bigger then py programs for sure.
User avatar
Aurel
Active member
 
Posts: 48
Joined: Thu Nov 25, 2010 4:30 pm

Next

Return to Python

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred