使用Python构建跨平台和自定义皮肤应用程序的最佳方法

时间:2020-12-07 12:28:47

Features needed:

所需功能:

  1. A framework, allowing me to build tab-based application with custom design (like in Hotot twitter client), keeping the native os window frame.
  2. 一个框架,允许我使用自定义设计构建基于选项卡的应用程序(如在Hotot twitter客户端中),保留本机操作系统窗口框架。
  3. Compatible with Python.
  4. 与Python兼容。
  5. My application will be running under Win/OsX/Linux/.
  6. 我的应用程序将在Win / OsX / Linux /下运行。
  7. No Flash/Flex/AIR.
  8. 没有Flash / Flex / AIR。

I also would like to ask if PySide does meet my requirements and is it worse or better than wxPython and Tkinter mentioned already?

我还想问PySide是否符合我的要求,是否比wxPython和Tkinter已经提到的更糟或更好?

5 个解决方案

#1


3  

I am the author of Hotot.

我是Hotot的作者。

according to your requirements, the key for you to choose a framework is the UI framework should be able to access webview conveniently.

根据您的要求,您选择框架的关键是UI框架应该能够方便地访问webview。

Hotot has several wrappers for different platforms. On Linux, we have both Qt and GTK version, on Windows, we provide a Qt version, on Mac, we have a Cocoa version, and of course we have a Chrome version. In a word, all they can easily access webkit.

Hotot有几个不同平台的包装器。在Linux上,我们有Qt和GTK版本,在Windows上,我们提供Qt版本,在Mac上,我们有Cocoa版本,当然我们有Chrome版本。总之,他们可以轻松访问webkit。

PS: XULRunner is another good choice for native appearance.

PS:XULRunner是原生外观的另一个不错的选择。

#2


4  

Use Tkinter. It works on every platform that Python supports, is relatively easy to program in, looks pretty good on most platforms, and has the features you want. It's also built-in for most versions of Python, so your users (in many cases) will not have to install any external dependencies.

使用Tkinter。它适用于Python支持的每个平台,相对容易编程,在大多数平台上看起来相当不错,并且具有您想要的功能。它也内置于大多数Python版本中,因此您的用户(在许多情况下)不必安装任何外部依赖项。

I find that Tkinter looks best on Mac OSX and Windows, and slightly outdated on some Gnome desktops. The most important feature, however, is that the API is extremely clean and easy to use and it is very lightweight. PyQt has a similar feature set, but, in my experience, its performance is significantly degraded when compared to Tkinter.

我发现Tkinter在Mac OSX和Windows上看起来最好,在某些Gnome桌面上略显过时。然而,最重要的特性是API非常干净且易于使用,而且非常轻巧。 PyQt具有类似的功能集,但根据我的经验,与Tkinter相比,它的性能显着降低。

PySide is Nokia's Qt binding for Python. I'm not aware of what the differences are between it and PyQt. Ultimately, most GUI toolkits for Python are going to be cross platform and support the functionality you need. I suggest Tkinter because I feel it is the easiest and most pleasurable way to program GUI applications in Python.

PySide是诺基亚针对Python的Qt绑定。我不知道它与PyQt之间的区别。最终,Python的大多数GUI工具包都将是跨平台的,并支持您所需的功能。我建议使用Tkinter,因为我觉得这是用Python编写GUI应用程序的最简单,最愉快的方法。

#3


3  

Additionally to the advices given by other people, I suggest you to use PyQt which is a Python binding to Qt framework. It's widely used, cross-platform and feature-full.

除了其他人给出的建议,我建议你使用PyQt,这是一个Python绑定到Qt框架。它被广泛使用,跨平台和功能丰富。

#4


2  

Take a look at wxPython (based on wxWidgets). If you want to make it web-based, look into using Django.

看看wxPython(基于wxWidgets)。如果你想让它基于网络,请考虑使用Django。

#5


1  

Well, you mentioned PyHotOt, and it says (on its web site) that it uses pywebkitgtk, and PyGTK. PyGTK/PyWebKitGTK exists for windows. Did you check it out? I think OS X would be the weak link on GTK, but maybe it's pretty good too.

好吧,你提到过PyHotOt,它说(在它的网站上)它使用了pywebkitgtk和PyGTK。 PyGTK / PyWebKitGTK适用于Windows。你看了吗?我认为OS X将是GTK的薄弱环节,但也许它也很不错。

#1


3  

I am the author of Hotot.

我是Hotot的作者。

according to your requirements, the key for you to choose a framework is the UI framework should be able to access webview conveniently.

根据您的要求,您选择框架的关键是UI框架应该能够方便地访问webview。

Hotot has several wrappers for different platforms. On Linux, we have both Qt and GTK version, on Windows, we provide a Qt version, on Mac, we have a Cocoa version, and of course we have a Chrome version. In a word, all they can easily access webkit.

Hotot有几个不同平台的包装器。在Linux上,我们有Qt和GTK版本,在Windows上,我们提供Qt版本,在Mac上,我们有Cocoa版本,当然我们有Chrome版本。总之,他们可以轻松访问webkit。

PS: XULRunner is another good choice for native appearance.

PS:XULRunner是原生外观的另一个不错的选择。

#2


4  

Use Tkinter. It works on every platform that Python supports, is relatively easy to program in, looks pretty good on most platforms, and has the features you want. It's also built-in for most versions of Python, so your users (in many cases) will not have to install any external dependencies.

使用Tkinter。它适用于Python支持的每个平台,相对容易编程,在大多数平台上看起来相当不错,并且具有您想要的功能。它也内置于大多数Python版本中,因此您的用户(在许多情况下)不必安装任何外部依赖项。

I find that Tkinter looks best on Mac OSX and Windows, and slightly outdated on some Gnome desktops. The most important feature, however, is that the API is extremely clean and easy to use and it is very lightweight. PyQt has a similar feature set, but, in my experience, its performance is significantly degraded when compared to Tkinter.

我发现Tkinter在Mac OSX和Windows上看起来最好,在某些Gnome桌面上略显过时。然而,最重要的特性是API非常干净且易于使用,而且非常轻巧。 PyQt具有类似的功能集,但根据我的经验,与Tkinter相比,它的性能显着降低。

PySide is Nokia's Qt binding for Python. I'm not aware of what the differences are between it and PyQt. Ultimately, most GUI toolkits for Python are going to be cross platform and support the functionality you need. I suggest Tkinter because I feel it is the easiest and most pleasurable way to program GUI applications in Python.

PySide是诺基亚针对Python的Qt绑定。我不知道它与PyQt之间的区别。最终,Python的大多数GUI工具包都将是跨平台的,并支持您所需的功能。我建议使用Tkinter,因为我觉得这是用Python编写GUI应用程序的最简单,最愉快的方法。

#3


3  

Additionally to the advices given by other people, I suggest you to use PyQt which is a Python binding to Qt framework. It's widely used, cross-platform and feature-full.

除了其他人给出的建议,我建议你使用PyQt,这是一个Python绑定到Qt框架。它被广泛使用,跨平台和功能丰富。

#4


2  

Take a look at wxPython (based on wxWidgets). If you want to make it web-based, look into using Django.

看看wxPython(基于wxWidgets)。如果你想让它基于网络,请考虑使用Django。

#5


1  

Well, you mentioned PyHotOt, and it says (on its web site) that it uses pywebkitgtk, and PyGTK. PyGTK/PyWebKitGTK exists for windows. Did you check it out? I think OS X would be the weak link on GTK, but maybe it's pretty good too.

好吧,你提到过PyHotOt,它说(在它的网站上)它使用了pywebkitgtk和PyGTK。 PyGTK / PyWebKitGTK适用于Windows。你看了吗?我认为OS X将是GTK的薄弱环节,但也许它也很不错。