[Python-Dev] Python as a Metro-style App

Dino Viehland dinov at microsoft.com
Mon Jan 9 18:59:45 CET 2012

We spent some time investigating Python/Win8 projections but we don't really have anything else to say right now, but it is certainly possible.

I haven't been following this thread so maybe this was already discussed, but on the whole "new OS target" thing - if people want to write immersive apps in Python then there will need to be a new build of Python.  One thing that might make that easier is the fact that the C runtime is still available to metro apps, even if the C runtime calls a banned API.  So to the extent that Python is just a C program the "port" should be pretty easy and mostly involve disabling functionality that isn't available at all to metro apps.  

I have packaged up Python 2.7 in an appx and run the application verifier on it (this was a while ago, so things may have changed between now and then), the attached banned.txt includes the list of APIs which Python is using that aren't allowed for the curious.

Also, people who write apps will need to distribute Python w/ their app, there's currently no sharing between apps.

-----Original Message-----
From: Jeff Hardy [mailto:jdhardy at gmail.com] 
Sent: Sunday, January 08, 2012 10:13 PM
To: Antoine Pitrou
Cc: python-dev at python.org; Dino Viehland
Subject: Re: [Python-Dev] Python as a Metro-style App

On Sat, Jan 7, 2012 at 2:57 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Depending on the extent of removed/disabled functionality, it might 
> not be very interesting to have a Metro port at all.

Win 8 is practically a new OS target - the nt module may need to be replaced with a metro module to handle it well.

Accessing the WinRT APIs directly from Python will also require a set of Python projections for the API, which should be straightforward to generate from the WinRT metadata files. I know Dino Viehland did some work on that; not sure if he can elaborate or not though.

Otherwise, IronPython would be the only option for writing Metro apps in Python - not that I'd be *horribly* upset at that :). IronPython is slowly growing Metro support, and it seems like most things will work, but the .NET framework shields it from a lot of the WinRT guts.

- Jeff

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: banned.txt
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120109/86301986/attachment.txt>

More information about the Python-Dev mailing list