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....

Re: Python win32 Native GUI app

Postby Holiverh » Sat Nov 27, 2010 8:22 am

Python is quite swift; I've never come across people having severe speed issues for everyday use. Actually interpreter performance is not connected to the underlying platform so whether it runs on Linux or Windows, performance should be roughly the same.

But i dont do any programming on linux ,why... i simply dont wanna bothering myself
with OS which dont have nativly GUI subsystem.

I look at it the other way, I consider being limited to one unportable, native toolkit a downside. It's Linux's way to be modular and have interchangable parts; it's on of it's strongest points. Besides, you can be pretty sure that most people will have Qt or Gtk+ installed, if not both.
User avatar
Holiverh
 
Posts: 243
Joined: Sun Jul 12, 2009 10:37 am
Location: East Anglia, UK

 

Re: Python win32 Native GUI app

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

Yes, but when something like 90% of the worlds computer user's use Windows and a large majority of the rest use Mac, only a couple of percent or so use Linux and you can see why most software development is geared towards Windows. Although as you mention, portable toolkits for multiple systems is good, its not always practical.
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:27 am

I know that some programer use even on windows GUI toolkits like wx,GTK or Qt.
I find this gui not windows like.
However i prefer native win look.
I found this for Python whivh looks familiar to me.
Code: Select all
from pywin.mfc import dialog
import win32ui
import win32con
import time

def MakeDlgTemplate():
style = (win32con.DS_MODALFRAME |
win32con.WS_POPUP |
win32con.WS_VISIBLE |
win32con.WS_CAPTION |
win32con.WS_SYSMENU |
win32con.DS_SETFONT)
cs = (win32con.WS_CHILD |
win32con.WS_VISIBLE)

w = 215
h = 36

dlg = [["Progress bar",
(0, 0, w, h),
style,
None,
(8, "MS Sans Serif")],
]
return dlg

class TestDialog(dialog.Dialog):
def OnInitDialog(self):
rc = dialog.Dialog.OnInitDialog(self)
self.pbar = win32ui.CreateProgressCtrl()
self.pbar.CreateWindow (win32con.WS_CHILD |
win32con.WS_VISIBLE,
(10, 10, 310, 24),
self, 1001)
return rc

def demo():
d = TestDialog (MakeDlgTemplate())
d.CreateWindow ()
for i in xrange(100):
d.pbar.SetPos(i)
time.sleep(0.1)

d.OnCancel()

if __name__=='__main__':
demo()
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 8:53 am

Aurel wrote:
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.


  • If the domain of the desktop ran application wants to compete with the web, portablity is important. It is something the web can offer effortlessly. Python is naturally quite portable. You seem to be quite Windows-centric and thus may dispute the fact this is a very powerful feature of Python.
  • Python only has a few implementations; CPython, Jython, IronPython, S60 Python and PyOy, plus a few low-key ones. BASIC has seemlingly millions of implementations who each do it slightly differently. There is no standard definition of BASIC meaning the language will struggle to evolve and improve.
  • When you say "compile directly to native win32 standalone aplication", do you mean directly into machine code? If so, there is no way you could, or should have expected Python to compete on the performance front.
  • Python is built around an OO model; everything is an object. This is not a downside, it is different. If you think Python is just an interpreter with OOP capabilites slapped on top, you are misinformed. Python is a versatile, expressive language which will let you write fully functioning code quickly. The development of Python is governed by the belief that there should only be one obvious way to do something.
  • Python has impressive third-party support. There are so many libraries out there, and it is so easy to extend Python, very few languages can compete.

In general Python can run rings around BASIC in most circumstances.

I know that some programer use even on windows GUI toolkits like wx,GTK or Qt. I find this gui not windows like. However i prefer native win look.

AFAIK Gtk+ maps directly into native Windows widgets, and Qt is built to emulate native widgets (?). wx sits directly on top of the native widget set as an abstraction layer. Tk (from 8.5 onwards I believe) will use native widgets on Windows and Mac.
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 » Sun Nov 28, 2010 1:08 am

maby im just wasting my time here becose
it looks that programming section is oriented to python.
OK,OK Dink this is py subforum.... :D
Last edited by Guest on Mon Nov 29, 2010 5:05 pm, edited 1 time in total.
User avatar
Aurel
Active member
 
Posts: 48
Joined: Thu Nov 25, 2010 4:30 pm

Re: Python win32 Native GUI app

Postby Dink » Sun Nov 28, 2010 10:03 am

Aurel wrote:maby im just wasting my time here becose it looks that programming section is oriented to python.


No, its orientated for all languages. You are currently in the Python sub forum, but feel free to post any programming question in the General Programming forum located at viewforum.php?f=6

If enough people are interested in a particular language, a sub forum (such as this one for Python) will be created.

I myself do not use Python and prefer Basic dialects, MatLab/Maple, PHP and Myql. :ugeek:
User avatar
Dink
 
Posts: 531
Joined: Sat Jul 11, 2009 9:59 am
Location: Australia

Previous

Return to Python

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred