简体   繁体   English

如何使用python代码创建一个通用的windows平台应用程序?

[英]How to use python code to create a universal windows platform application?

Converting python to C# is an option.将 python 转换为 C# 是一种选择。 Are there any ready-made converters to do this?有没有现成的转换器可以做到这一点? Or are there any other ways to realize a uwp app from a python code?或者有没有其他方法可以从 python 代码中实现 uwp 应用程序? You help is very much appreciated.非常感谢您的帮助。

There is a command line tool available on GItHub for this - https://github.com/uxmal/pytocs GItHub 上有一个可用的命令行工具 - https://github.com/uxmal/pytocs

By the way you should ask these type of question first to google :P顺便说一句,你应该先向谷歌提出这些类型的问题:P

There is IronPython, which is .NET implementation of Python 2.7 ( http://ironpython.net/ ). IronPython 是 Python 2.7 ( http://ironpython.net/ ) 的 .NET 实现。 I would venture if you start your Main() function as C# code, but transfer control to embedded IronPython interpreter, and continue with Python, it might work.如果您将 Main() 函数作为 C# 代码启动,但将控制权转移到嵌入式 IronPython 解释器,然后继续使用 Python,我会冒险,它可能会起作用。 Not all Python library would be available, I believe, due to sandboxing requirements of the UWP.我相信,由于 UWP 的沙盒要求,并非所有 Python 库都可用。

Is Python able to build universla windows apps? Python 是否能够构建通用 Windows 应用程序?

The short answer: just for IOT devices.简短的回答:仅适用于物联网设备。 And the suggested programming language are C++, C#, Microsoft Visual Basic, and JavaScript within UWP.推荐的编程语言是 C++、C#、Microsoft Visual Basic 和 UWP 中的 JavaScript。 You could only build Python-based background applications on Windows 10 IoT Core devices with pyuwpsdk.vsix .您只能使用pyuwpsdk.vsix在 Windows 10 IoT Core 设备上构建基于 Python 的后台应用程序。

I think your best bet would be converting, and then learning a little.我认为你最好的选择是转换,然后学习一点。 Based on the difficulty and how many different or new things you need to learn to alter the app, you should maybe just consider learning the language basics and then go from their creating it in C#, You'll gain some skills in another language.根据难度以及你需要学习多少不同或新的东西来改变应用程序,你也许应该考虑学习语言基础知识,然后从他们在 C# 中创建它开始,你将获得另一种语言的一些技能。 Who knows maybe like it more.谁知道也许更喜欢它。

You could try one of many other converters, to another language that works or even convert to a language to convert.您可以尝试许多其他转换器中的一个,转换为另一种有效的语言,甚至转换为要转换的语言。 There is a C++ converter of some kind that may be a bit better, and then I guess perhaps you could convert from their with other tools, seriously may work better.有某种 C++ 转换器可能会更好一些,然后我想也许您可以使用其他工具从它们转换,严重可能会更好。 More things are out their for C++ than C# and considering the commonalities, I bet a decent converter exists.对于 C++ 来说,比 C# 有更多的东西,考虑到共性,我敢打赌存在一个不错的转换器。 Maybe convert to C or C++ or even Javascript because they have good conversion tools.也许可以转换为 C 或 C++ 甚至 Javascript,因为它们有很好的转换工具。 With Java Script it would be kind easy to convert and learn a tiny bit to fix if you have a converter to C#.如果您有 C# 转换器,那么使用 Java Script 转换和学习一点点修复会很容易。

Otherwise converter between the two Python and C# isn't a main priority for many people, if anyone at all.否则两个 Python 和 C# 之间的转换器对于许多人来说并不是主要优先事项,如果有人的话。 Since they are so similar yet the Syantax is so different, it must be hard to create, and usually people stick with one or the other, or learn both because they do a lot of Object Oriented Code.既然它们如此相似,而语法又如此不同,那么它肯定很难创建,通常人们会坚持其中之一,或者因为他们做了很多面向对象的代码而学习两者。 I mean just Syntax needs to be learned.我的意思是只需要学习语法。 Also the modules mentioned or packages probably wont ever convet to C#.此外,提到的模块或包可能永远不会转换为 C#。 I'm pretty sure they would just need to build the packages from the ground up for C#, witch is possible.我很确定他们只需要为 C# 从头开始​​构建包,女巫是可能的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在通用Windows平台(UWP)应用程序中使用Microsoft.AspNet.Mvc - Use Microsoft.AspNet.Mvc in Universal Windows Platform (UWP) Application 通用Windows平台(UWP)C#应用程序-如何在应用程序中运行独立的python - Universal Windows Platform (UWP) C# app - How to run stand alone python inside your application 如何将现有的 SQLite 数据库放入应用程序的本地数据存储中,以便在通用 Windows 平台应用程序中使用? - How do you place an exisiting SQLite database into an application's local data store for use in a Universal Windows Platform application? 通用Windows平台(UWP)条形码扫描仪应用程序 - Universal Windows Platform (UWP) barcode scanner application 通用Windows平台应用程序中的MySql数据库连接 - MySql Database connection in Universal Windows Platform application 如何在 TimePicker 通用 Windows 平台中绑定时间? - How to bind time in TimePicker Universal windows Platform? 如何在通用Windows平台中访问相机框架 - How to access camera frames in Universal Windows Platform 如何在Delphi中检测通用Windows平台(UWP) - How to detect Universal Windows Platform (UWP) in Delphi 使用 Windows.Devices.Bluetooth 命名空间是否需要通用 Windows 平台? - Is Universal Windows Platform required to use the Windows.Devices.Bluetooth namespace? 在通用Windows平台(UWP)应用程序中读取USB描述符 - Reading USB Descriptors in a Universal Windows Platform (UWP) application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM