Open freakboy3742 opened 4 years ago
Please make it happen!!
So please do it
Please add Python support to WinUI 3. Wxpython is not beautiful.. 👍🤞
This issue is older than 1 year, still there's no response from WinUI team. I do not know what they are planning, but it is always a good idea to provide some details on such a popular proposal.
Here from 2022.
As of 28 Jul 2021, the pip package winui was reserved by Microsoft Corporation: https://pypi.org/project/winui/ Hopefully this means that they are working towards a package?
As of 28 Jul 2021, the pip package winui was reserved by Microsoft Corporation: https://pypi.org/project/winui/ Hopefully this means that they are working towards a package?
Yes indeed, but there's no update from WinUI team on this issue. This is not fair for such old and popular issue.
貌似开发一个能用Python调用C++接口的中间函数就可以了?
一定不止这么简单吧
+1
Would allow so many Python devs to create awesome data centric Windows apps with native lool and feel. Win UI could get many developers over night.
貌似开发一个能用Python调用C++接口的中间函数就可以了?
一定不止这么简单吧
Python很多库就是这么干的
WinUI team needs more developers, from what I can see it's already been hard for them to triage and solve the huge amount of issues. Since the current WinUI 3 itself is really half-baked, I think the priority target of the team would be implementing features and handling bug&performance issues, I suspect that a proposal like foreign language support must have a relatively low priority until they make the WinUI 3 full-featured. Having said that, if anyone wants to get a quick reply, I suggest you post a comment in #6726 , it would be much more noticeable for them
They already can't manage just with C# and C++, and the folks responsible for killing C++/CX are now having fun with Rust/WinRT instead of making it a proper developer experience.
We don't need even more distractions with so few developers, just look at the amount of commits per day across all projects.
WinUI team needs more developers, from what I can see it's already been hard for them to triage and solve the huge amount of issues. Since the current WinUI 3 itself is really half-baked, I think the priority target of the team would be implementing features and handling bug&performance issues, I suspect that a proposal like foreign language support must have a relatively low priority until they make the WinUI 3 full-featured. Having said that, if anyone wants to get a quick reply, I suggest you post a comment in #6726 , it would be much more noticeable for them
That is what you get when a team decides to bet the feature of their platform on a less productive stack - C++
Here from 2022.
As of 28 Jul 2021, the pip package winui was reserved by Microsoft Corporation: https://pypi.org/project/winui/ Hopefully this means that they are working towards a package?
WinUI itself is far from being feature complete. Do you think they would ever touch that python package again? CS/WinRT, CS/ Win32 and C++/WinRT have many issues that need to be resolved.
After J#, C#, F# and B# (VB.NET), it will comes out P#? 😜
Just thinking outloud (not an expert): would something like using pybind11 https://github.com/pybind/pybind11 work for this case?
After J#, C#, F# and B# (VB.NET), it will comes out P#? 😜
Ironpython was enough of a fail for them, I guess
After J#, C#, F# and B# (VB.NET), it will comes out P#? 😜
WinUI is WinRT-based, not .NET-based, so no. 🤖
WinUI is WinRT-based, not .NET-based, so no. 🤖
P++ 😙
Fully agree with that We love python
Agreed.
Years and nothing apart from random notifications from this
Agree
2023 Agree
agree
Yes please
please
Friends, I have found this, it can use some fluent widgets in PyQt or Pyside. https://github.com/zhiyiYo/PyQt-Fluent-Widgets
Looks great, thanks for the link!
感觉需要Microsoft先出一个python与dotnet互通的库。目前仅有第三方实现,也许需要先做出这个再考虑WinUI3 API
As much as I love linux and hate microsoft, PLEASE MICROSOFT! As a developer I prioritize user experience and I want all users to feel like they are at home when they are using my applications, and thats why I want to use winui for my application. Sadly though, it is not YET implemented, do I hope they do it soon.
It's been 3 LONG YEARS, and not a single reply from Microsoft on this thread. Well, that's very disappointing.
add it already :(
I found that we can use WinUI 3 controls with Python. Now PyWinRT and I are working some problems to support it.
I found that we can use WinUI 3 controls with Python. Now PyWinRT and I are working some problems to support it.
Amazing! Please mention me when you've got a solution!
It's been 3 LONG YEARS, and not a single reply from Microsoft on this thread. Well, that's very disappointing.
Tbh they are Microsoft, what do we expect?
I found pywinrt cannot treat WinUI well because it is constructed on top of the abstraction of cppwinrt. I decided to create a new winmd parser to generate a pure python projection without C++. It may take some time.
There are several python language projection for Windows Runtime. PyWinRT is one of the python projection for Windows Runtime API. It is constructed on top of the C++/WinRT and it has a technical problem that it cannot treat directly the internal mechanism of Windows Runtime. I decided to create a new pure python projection, but it takes a lot of time to make it ready to use.
I found another project py-win32more. It is a pure python library providing a python language projection for Win32 APIs based on win32metadata. It can treat the internal mechanism of Windows Runtime completely. The creator recently have supported Windows Runtime APIs and Windows App SDK APIs. We will add the support of WinUI 3 soon and I think you can use WinUI 3 easily in Python in the future.
This will be improved in the future especially for constructors.
from win32more.xaml import XamlApplication
from win32more.Microsoft.UI.Xaml import Window
from win32more.Microsoft.UI.Xaml.Controls import ColorPicker
class App(XamlApplication):
def OnLaunched(self, args):
win = Window.CreateInstance(None, None)
clr = ColorPicker.CreateInstance(None, None)
win.Content = clr
win.Activate()
XamlApplication.Start(App)
@sotanakamura You guys are doing amazing work. Can we write the UI in code - in python instead of xaml markup?
@saint4eva Yes. Writing UIs in Python is useful to set a event handler and bind some data. Of cource, you can also write the UIs in XAML.
Constructors are now simpler.
from win32more.Microsoft.UI.Xaml import Window
from win32more.Microsoft.UI.Xaml.Controls import ColorPicker
from win32more.xaml import XamlApplication
class App(XamlApplication):
def OnLaunched(self, args):
win = Window()
clr = ColorPicker()
win.Content = clr
win.Activate()
XamlApplication.Start(App)
Hey iirc there is a python library for this. It's called
pythonnet
, a python library for the .NET framework.
Actually, .NET is not the same as winUI3
I would love to work with C developers to make a python binding for WinUI3
If people are really keen, I started experimenting with a code generator approach for binding Python code-behind to a particular XAML. It's not generic dynamic bindings, but past experience (I've built this concept about 4 times now since Win8) shows generic bindings really aren't the way.
Code and a couple of really basic samples are at https://github.com/zooba/pymsbuild-winui I'm not actively working on it right now, so I'd suggest if you want to significantly develop it then create a fork and work on it there - don't expect every little change to be merged in immediately, but if some serious progress is made then I would consider sharing maintainership and merging it in.
Update
Constructors are now simpler.
from win32more.Microsoft.UI.Xaml import Window from win32more.Microsoft.UI.Xaml.Controls import ColorPicker from win32more.xaml import XamlApplication class App(XamlApplication): def OnLaunched(self, args): win = Window() clr = ColorPicker() win.Content = clr win.Activate() XamlApplication.Start(App)
WOW THAT IS SOOOOOOOOO COOL
I am working on a wINui3 guI TOOLKIT for Python see jhi2/PyUI3
Proposal: Add Python support to WinUI3
Summary
WinUI 3 should include an official Python API, allowing end-users to build native Windows GUI apps in Python.
Rationale
Scope
Important Notes
This has been proposed in direct response to this tweet from @WindowsDocs, and this follow up from @zooba. It may be related to #1421.
Open Questions