diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..0fdf79e
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "UWP/Libraries/Pygame/Source"]
+ path = UWP/Libraries/Pygame/Source
+ url = https://github.com/pygame/pygame
diff --git a/UWP/Libraries/Pygame/Source b/UWP/Libraries/Pygame/Source
new file mode 160000
index 0000000..4306f7a
--- /dev/null
+++ b/UWP/Libraries/Pygame/Source
@@ -0,0 +1 @@
+Subproject commit 4306f7a26ddfd0584b3680171f624d93e57d5ada
diff --git a/win8app/python34/makebuildinfo.vcxproj b/win8app/python34/makebuildinfo.vcxproj
deleted file mode 100644
index 852b28b..0000000
--- a/win8app/python34/makebuildinfo.vcxproj
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
-
- {8E539D26-0C94-4AFE-8138-273743886069}
- Win32Proj
- makebuildinfo
-
-
-
- Application
- true
- v110
- Unicode
-
-
- Application
- false
- v110
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
-
-
-
-
-
- Level3
- Disabled
- FOR_WIN8APP;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
-
-
- Console
- true
-
-
- $(TargetPath) $(ConfigurationName) $(IntDir)
- $(IntDir)getbuildinfo.o
-
-
-
-
- Level3
-
-
- MaxSpeed
- true
- true
- FOR_WIN8APP;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
-
-
- Console
- true
- true
- true
-
-
- $(TargetPath) $(ConfigurationName) $(IntDir)
- $(IntDir)getbuildinfo.o
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/win8app/python34/makebuildinfo.vcxproj.filters b/win8app/python34/makebuildinfo.vcxproj.filters
deleted file mode 100644
index 15be3d6..0000000
--- a/win8app/python34/makebuildinfo.vcxproj.filters
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hpp;hxx;hm;inl;inc;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
- Source Files
-
-
-
\ No newline at end of file
diff --git a/win8app/python34/python34.cpp b/win8app/python34/python34.cpp
deleted file mode 100644
index 77ed2a5..0000000
--- a/win8app/python34/python34.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-#include "python34.h"
-#include "Python.h"
-#include
-#include
-#include
-#include
-#include
-
-
-using namespace Windows::Storage;
-using namespace Windows::Storage::Streams;
-using namespace Windows::Security::Cryptography;
-using namespace Microsoft::WRL;
-using namespace Platform;
-using namespace Concurrency;
-
-namespace python34 {
-class PyBytesBuffer:
- public RuntimeClass,
- ABI::Windows::Storage::Streams::IBuffer,
- IBufferByteAccess>
-{
-public:
- PyObject *data;
- int length;
- virtual ~PyBytesBuffer()
- {
- Py_DECREF(data);
- }
-
- STDMETHODIMP RuntimeClassInitialize(PyObject *data)
- {
- Py_INCREF(data);
- this->data = data;
- length = 0;
- return S_OK;
- }
-
- STDMETHODIMP Buffer(byte **value)
- {
- *value = (byte*)PyBytes_AsString(data);
- return S_OK;
- }
-
- STDMETHODIMP get_Capacity(UINT32 *value)
- {
- *value = PyBytes_Size(data);
- return S_OK;
- }
-
- STDMETHODIMP get_Length(UINT32 *value)
- {
- *value = length;
- return S_OK;
- }
-
- STDMETHODIMP put_Length(UINT32 value)
- {
- length = value;
- return S_OK;
- }
-};
-}
-using namespace python34;
-
-extern "C" {
-
-void win32_urandom(unsigned char* buffer, Py_ssize_t size, int raise)
-{
- IBuffer^ data = CryptographicBuffer::GenerateRandom(size);
- Array^ data2;
- CryptographicBuffer::CopyToByteArray(data, &data2);
- for(int i=0; i < size; i++)
- buffer[i] = data2[i];
-}
-
-/* Temporary wrapper for local app data store. Will be replaced with generic wrapping later.
- Only modes "r" and "w" are supported. */
-typedef struct {
- PyObject_HEAD
- IInputStream^ item;
-} iinputstream;
-
-
-static PyObject*
-iinputstream_read(PyObject *self, PyObject* args)
-{
- int size;
- if (!PyArg_ParseTuple(args, "i", &size))
- return NULL;
-
- PyObject *result = PyBytes_FromStringAndSize(NULL, size);
- if (!result)
- return NULL;
- ComPtr native;
- Microsoft::WRL::Details::MakeAndInitialize(&native, result);
- auto iinspectable = (IInspectable *)reinterpret_cast(native.Get());
- Streams::IBuffer ^buffer = reinterpret_cast(iinspectable);
- create_task(((iinputstream*)self)->item->ReadAsync(buffer, size, InputStreamOptions::None)).wait();
- _PyBytes_Resize(&result, buffer->Length);
- return result;
-}
-
-static PyMethodDef iinputstream_methods[] = {
- {"read", iinputstream_read},
- {NULL}
-};
-
-static PyTypeObject istoragefile_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "istoragefile", /* tp_name */
- sizeof(iinputstream), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- "WinRT file", /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
-};
-
-static PyObject*
-new_istorageitem(IRandomAccessStream^ item)
-{
- istoragefile_Type.tp_new = PyType_GenericNew;
- if (!PyType_Ready(&istoragefile_Type))
- return NULL;
- PyObject *result = istoragefile_Type.tp_alloc(&istoragefile_Type, 0);
- if (!result)
- return NULL;
- ((iinputstream*)result)->item = item;
- return result;
-}
-
-static PyObject*
-local_open(PyObject *self, PyObject* args)
-{
- wchar_t *name, *mode;
- if (!PyArg_ParseTuple(args, "SS", &name, &mode))
- return NULL;
- StorageFolder^ localFolder = ApplicationData::Current->LocalFolder;
- if (mode[0] == L'r') {
- String ^sname = ref new String(name);
- StorageFile^ item = create_task(localFolder->GetFileAsync(sname)).get();
- if (item == nullptr) {
- PyErr_SetString(PyExc_OSError, "File not found");
- return NULL;
- }
- auto result = create_task(item->OpenReadAsync()).get();
- return new_istorageitem(result);
- }
-}
-
-} // extern "C"
diff --git a/win8app/python34/python34.h b/win8app/python34/python34.h
deleted file mode 100644
index 7c6c88c..0000000
--- a/win8app/python34/python34.h
+++ /dev/null
@@ -1 +0,0 @@
-#pragma once
\ No newline at end of file
diff --git a/win8app/python34/python34.vcxproj b/win8app/python34/python34.vcxproj
deleted file mode 100644
index 48921ae..0000000
--- a/win8app/python34/python34.vcxproj
+++ /dev/null
@@ -1,453 +0,0 @@
-
-
-
-
- Debug
- ARM
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- ARM
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {17CBD60F-E890-4473-940B-5ABFB2190192}
- Win32Proj
- python34
- python34
- de-DE
- 16.0
- true
- Windows Store
- 10.0
- 10.0
-
-
-
- DynamicLibrary
- true
- v142
-
-
- DynamicLibrary
- true
- v142
-
-
- DynamicLibrary
- true
- v142
-
-
- DynamicLibrary
- false
- true
- v142
-
-
- DynamicLibrary
- false
- true
- v142
-
-
- DynamicLibrary
- false
- true
- v142
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
- false
-
-
- false
- false
-
-
- false
- false
-
-
- false
- false
-
-
- false
- false
-
-
- false
- false
-
-
-
- NotUsing
- false
- _WINDLL;WIN32;Py_BUILD_CORE;%(PreprocessorDefinitions)
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
- CompileAsC
-
-
- Console
- false
- false
- Rometadata.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)
-
-
-
-
- NotUsing
- false
- _WINDLL;WIN32;Py_BUILD_CORE;NDEBUG;%(PreprocessorDefinitions)
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
- CompileAsC
-
-
- Console
- false
- false
- Rometadata.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)
-
-
-
-
- NotUsing
- false
- _WINDLL;WIN32;Py_BUILD_CORE;%(PreprocessorDefinitions)
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
- CompileAsC
-
-
- Console
- false
- false
- Rometadata.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)
-
-
-
-
- NotUsing
- false
- _WINDLL;WIN32;Py_BUILD_CORE;NDEBUG;%(PreprocessorDefinitions)
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
- CompileAsC
-
-
- Console
- false
- false
- Rometadata.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)
-
-
-
-
- NotUsing
- false
- _WINDLL;WIN32;Py_BUILD_CORE;%(PreprocessorDefinitions)
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
- CompileAsC
- MultiThreadedDebugDLL
-
-
- Console
- false
- false
- Rometadata.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)
- /nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)
-
-
-
-
-
-
- NotUsing
- false
- _WINDLL;WIN32;Py_BUILD_CORE;NDEBUG;%(PreprocessorDefinitions)
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
- CompileAsC
-
-
- Console
- false
- false
- Rometadata.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HGBRANCH="win8app";%(PreprocessorDefinitions)
- HGBRANCH="win8app";%(PreprocessorDefinitions)
- HGBRANCH="win8app";_WINDLL;WIN32;Py_BUILD_CORE;%(PreprocessorDefinitions)
- HGBRANCH="win8app";_WINDLL;WIN32;Py_BUILD_CORE;NDEBUG;%(PreprocessorDefinitions)
- HGBRANCH="win8app";_WINDLL;WIN32;Py_BUILD_CORE;%(PreprocessorDefinitions)
- HGBRANCH="win8app";_WINDLL;WIN32;Py_BUILD_CORE;NDEBUG;%(PreprocessorDefinitions)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CompileAsCpp
- CompileAsCpp
- CompileAsCpp
- CompileAsCpp
- CompileAsCpp
- CompileAsCpp
- true
- true
- true
- true
- true
- true
-
-
- true
- CompileAsCpp
- true
- CompileAsCpp
- CompileAsCpp
- CompileAsCpp
- CompileAsCpp
- CompileAsCpp
- true
- true
- true
- true
-
-
-
- $(SolutionDir)..\Modules\zlib;%(AdditionalIncludeDirectories)
- $(SolutionDir)..\Modules\zlib;%(AdditionalIncludeDirectories)
- $(SolutionDir)..\Modules\zlib;%(AdditionalIncludeDirectories)
- $(SolutionDir)..\Modules\zlib;%(AdditionalIncludeDirectories)
- $(SolutionDir)..\Modules\zlib;%(AdditionalIncludeDirectories)
- $(SolutionDir)..\Modules\zlib;%(AdditionalIncludeDirectories)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Default
- CompileAsCpp
- Default
- CompileAsCpp
- Default
- CompileAsCpp
- true
- true
- true
- true
- true
- true
-
-
-
-
-
-
\ No newline at end of file
diff --git a/win8app/python34/python34.vcxproj.filters b/win8app/python34/python34.vcxproj.filters
deleted file mode 100644
index 839d8f0..0000000
--- a/win8app/python34/python34.vcxproj.filters
+++ /dev/null
@@ -1,547 +0,0 @@
-
-
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
- {a1a1c5c8-6ca3-4cb4-a8ba-534154e54bcd}
-
-
- {67815373-034c-4685-9a0b-4513b69df159}
-
-
- {456c7ec2-4253-4f4d-9a87-d3099d3552b5}
-
-
- {3437e364-f931-486d-b8fe-ac8b09b6761d}
-
-
- {06cc4108-e560-489f-9102-58faf6564554}
-
-
- {2cc41388-7a79-407f-8001-e2a53a5cf437}
-
-
- {590dff9b-a3e6-4e4a-99fb-22f2331d8ec8}
-
-
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- PC
-
-
- PC
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- PC
-
-
- Python
-
-
- PC
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Python
-
-
- Python
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
-
- PC
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/win8app/python34/targetver.h b/win8app/python34/targetver.h
deleted file mode 100644
index a66ecb0..0000000
--- a/win8app/python34/targetver.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once
-
-// Including SDKDDKVer.h defines the highest available Windows platform.
-
-// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
-// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
-
-#include
diff --git a/win8app/python34app/App.xaml b/win8app/python34app/App.xaml
deleted file mode 100644
index 9ce3a13..0000000
--- a/win8app/python34app/App.xaml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/win8app/python34app/App.xaml.cpp b/win8app/python34app/App.xaml.cpp
deleted file mode 100644
index baa22db..0000000
--- a/win8app/python34app/App.xaml.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// App.xaml.cpp
-// Implementation of the App.xaml class.
-//
-
-#include "PyShell.xaml.h"
-#include "Python.h"
-
-using namespace python34app;
-
-using namespace Platform;
-using namespace Windows::ApplicationModel;
-using namespace Windows::ApplicationModel::Activation;
-using namespace Windows::Foundation;
-using namespace Windows::Foundation::Collections;
-using namespace Windows::UI::Xaml;
-using namespace Windows::UI::Xaml::Controls;
-using namespace Windows::UI::Xaml::Controls::Primitives;
-using namespace Windows::UI::Xaml::Data;
-using namespace Windows::UI::Xaml::Input;
-using namespace Windows::UI::Xaml::Interop;
-using namespace Windows::UI::Xaml::Media;
-using namespace Windows::UI::Xaml::Navigation;
-
-// The Split Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234228
-
-///
-/// Initializes the singleton application object. This is the first line of authored code
-/// executed, and as such is the logical equivalent of main() or WinMain().
-///
-App::App()
-{
- InitializeComponent();
- Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
-}
-
-///
-/// Invoked when the application is launched normally by the end user. Other entry points
-/// will be used when the application is launched to open a specific file, to display
-/// search results, and so forth.
-///
-/// Details about the launch request and process.
-void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs)
-{
- if (pArgs->PreviousExecutionState == ApplicationExecutionState::Terminated)
- {
- //TODO: Load state from previously suspended application
- }
-
- // Create a Frame to act navigation context and navigate to the first page
- auto rootFrame = ref new Frame();
- TypeName pageType = { PyShell::typeid->FullName, TypeKind::Metadata };
- rootFrame->Navigate(pageType);
-
- // Place the frame in the current Window and ensure that it is active
- Window::Current->Content = rootFrame;
- Window::Current->Activate();
-}
-
-///
-/// Invoked when application execution is being suspended. Application state is saved
-/// without knowing whether the application will be terminated or resumed with the contents
-/// of memory still intact.
-///
-/// The source of the suspend request.
-/// Details about the suspend request.
-void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
-{
- //TODO: Save application state and stop any background activity
-}
diff --git a/win8app/python34app/App.xaml.h b/win8app/python34app/App.xaml.h
deleted file mode 100644
index 2f78118..0000000
--- a/win8app/python34app/App.xaml.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// App.xaml.h
-// Deklaration der App-Klasse
-//
-
-#pragma once
-
-#include "App.g.h"
-
-namespace python34app
-{
- ///
- /// Stellt das anwendungsspezifische Verhalten bereit, um die Standardanwendungsklasse zu ergänzen.
- ///
- ref class App sealed
- {
- public:
- App();
- virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
-
- private:
- void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
- };
-}
diff --git a/win8app/python34app/Assets/Logo.png b/win8app/python34app/Assets/Logo.png
deleted file mode 100644
index 94af846..0000000
Binary files a/win8app/python34app/Assets/Logo.png and /dev/null differ
diff --git a/win8app/python34app/Assets/SmallLogo.png b/win8app/python34app/Assets/SmallLogo.png
deleted file mode 100644
index c8ba2b3..0000000
Binary files a/win8app/python34app/Assets/SmallLogo.png and /dev/null differ
diff --git a/win8app/python34app/Assets/SplashScreen.png b/win8app/python34app/Assets/SplashScreen.png
deleted file mode 100644
index 4b1e01c..0000000
Binary files a/win8app/python34app/Assets/SplashScreen.png and /dev/null differ
diff --git a/win8app/python34app/Assets/StoreLogo.png b/win8app/python34app/Assets/StoreLogo.png
deleted file mode 100644
index 88a1533..0000000
Binary files a/win8app/python34app/Assets/StoreLogo.png and /dev/null differ
diff --git a/win8app/python34app/Common/StandardStyles.xaml b/win8app/python34app/Common/StandardStyles.xaml
deleted file mode 100644
index 4d3f245..0000000
--- a/win8app/python34app/Common/StandardStyles.xaml
+++ /dev/null
@@ -1,862 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Mouse
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/win8app/python34app/Package.appxmanifest b/win8app/python34app/Package.appxmanifest
deleted file mode 100644
index ef3a3d5..0000000
--- a/win8app/python34app/Package.appxmanifest
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
- Python 3 For Metro
- Martin v. Löwis
- Assets\StoreLogo.png
- python34app
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/win8app/python34app/Privacy.xaml b/win8app/python34app/Privacy.xaml
deleted file mode 100644
index 3109eab..0000000
--- a/win8app/python34app/Privacy.xaml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- This interactive Python interpreter supports connections to the internet using the socket module. Data is transmitted to the internet only if if this
- socket module is used (either directly, or indirectly e.g. through the urllib module). On its own, this app will not attempt to collect personal information.
-
-
-
-
-
diff --git a/win8app/python34app/Privacy.xaml.cpp b/win8app/python34app/Privacy.xaml.cpp
deleted file mode 100644
index 1482852..0000000
--- a/win8app/python34app/Privacy.xaml.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// Privacy.xaml.cpp
-// Implementierung der Klasse Privacy
-//
-
-#include "pch.h"
-#include "Privacy.xaml.h"
-
-using namespace python34app;
-
-using namespace Platform;
-using namespace Windows::Foundation;
-using namespace Windows::Foundation::Collections;
-using namespace Windows::UI::Xaml;
-using namespace Windows::UI::Xaml::Controls;
-using namespace Windows::UI::Xaml::Controls::Primitives;
-using namespace Windows::UI::Xaml::Data;
-using namespace Windows::UI::Xaml::Input;
-using namespace Windows::UI::Xaml::Media;
-using namespace Windows::UI::Xaml::Navigation;
-
-// Die Elementvorlage "Benutzersteuerelement" ist unter http://go.microsoft.com/fwlink/?LinkId=234236 dokumentiert.
-
-Privacy::Privacy()
-{
- InitializeComponent();
-}
-
-void Privacy::do_close(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
- auto popup = (Popup^)Parent;
- popup->IsOpen = false;
-}
-
diff --git a/win8app/python34app/Privacy.xaml.h b/win8app/python34app/Privacy.xaml.h
deleted file mode 100644
index 45d3b5e..0000000
--- a/win8app/python34app/Privacy.xaml.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Privacy.xaml.h
-// Deklaration der Privacy-Klasse
-//
-
-#pragma once
-
-#include "Privacy.g.h"
-
-namespace python34app
-{
- [Windows::Foundation::Metadata::WebHostHidden]
- public ref class Privacy sealed
- {
- public:
- Privacy();
- void do_close(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
- };
-}
diff --git a/win8app/python34app/PyShell.xaml b/win8app/python34app/PyShell.xaml
deleted file mode 100644
index ebd2ca2..0000000
--- a/win8app/python34app/PyShell.xaml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/win8app/python34app/PyShell.xaml.cpp b/win8app/python34app/PyShell.xaml.cpp
deleted file mode 100644
index b3a46b0..0000000
--- a/win8app/python34app/PyShell.xaml.cpp
+++ /dev/null
@@ -1,536 +0,0 @@
-//
-// PyShell.xaml.cpp
-// Implementation of the PyShell.xaml class.
-//
-
-#include "pch.h"
-#include "PyShell.xaml.h"
-#include "Settings.xaml.h"
-#include "Privacy.xaml.h"
-#include "Python.h"
-#include
-
-using namespace python34app;
-
-using namespace Platform;
-using namespace Platform::Collections;
-using namespace Concurrency;
-using namespace Windows::ApplicationModel::DataTransfer;
-using namespace Windows::Foundation;
-using namespace Windows::Foundation::Collections;
-using namespace Windows::UI;
-using namespace Windows::UI::Core;
-using namespace Windows::UI::Popups;
-using namespace Windows::UI::ViewManagement;
-using namespace Windows::UI::Xaml;
-using namespace Windows::UI::Xaml::Controls;
-using namespace Windows::UI::Xaml::Controls::Primitives;
-using namespace Windows::UI::Xaml::Data;
-using namespace Windows::UI::Xaml::Input;
-using namespace Windows::UI::Xaml::Media;
-using namespace Windows::UI::Xaml::Navigation;
-using namespace Windows::UI::Xaml::Documents;
-using namespace Windows::UI::ApplicationSettings;
-using namespace Windows::Storage;
-using namespace Windows::Storage::Pickers;
-using namespace Windows::Storage::Streams;
-
-static PyShell^ singleton;
-
-extern "C" static PyObject *
-add_to_stdout(PyObject *self, PyObject *args)
-{
- Py_UNICODE *data;
- if (!PyArg_ParseTuple(args, "u", &data))
- return NULL;
- singleton->AddOutAsync(data);
- Py_RETURN_NONE;
-}
-
-extern "C" static PyObject *
-add_to_stderr(PyObject *self, PyObject *args)
-{
- Py_UNICODE *data;
- if (!PyArg_ParseTuple(args, "u", &data))
- return NULL;
- singleton->AddErrAsync(data);
- Py_RETURN_NONE;
-}
-
-extern "C" static PyObject *
-readline(PyObject *self, PyObject *args)
-{
- PyErr_SetString(PyExc_IOError, "Getting input from console is not implemented yet");
- return NULL;
-}
-
-extern "C" static PyObject *
-metroui_exit(PyObject *self, PyObject *args)
-{
- singleton->exit();
- Py_RETURN_NONE;
-}
-
-static struct PyMethodDef metroui_methods[] = {
- {"add_to_stdout", add_to_stdout,
- METH_VARARGS, NULL},
- {"add_to_stderr", add_to_stderr,
- METH_VARARGS, NULL},
- {"readline", readline, METH_NOARGS, NULL},
- {"exit", metroui_exit,
- METH_NOARGS, NULL},
- {NULL, NULL}
-};
-
-
-static struct PyModuleDef metroui = {
- PyModuleDef_HEAD_INIT,
- "metroui",
- NULL,
- -1,
- metroui_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-static PyObject*
-PyInit_metroui()
-{
- return PyModule_Create(&metroui);
-}
-
-/* XXX crash at shutdown. Work around by keeping reference to scrollView. */
-Windows::UI::Xaml::Controls::ScrollViewer^ scroll_tmp;
-static wchar_t progpath[1024];
-PyShell::PyShell()
-{
- InitializeComponent();
- history = ref new Vector();
-
- //SettingsPane::GetForCurrentView()->CommandsRequested += ref new TypedEventHandler(this, &PyShell::get_settings_commands);
-
- load_settings(ApplicationData::Current, nullptr);
- /* register for changes to roaming data */
- ApplicationData::Current->DataChanged += ref new TypedEventHandler(this, &PyShell::load_settings);
-
- scroll_tmp = this->scrollView;
- singleton = this;
- running = false;
-
- /* add metroui to builtin modules */
- PyImport_AppendInittab("metroui", PyInit_metroui);
-
- /* compute python path */
- Windows::ApplicationModel::Package^ package = Windows::ApplicationModel::Package::Current;
- Windows::Storage::StorageFolder^ installedLocation = package->InstalledLocation;
- wcscpy_s(progpath, installedLocation->Path->Data());
- /* XXX how to determine executable name? */
- wcscat_s(progpath, L"\\python34app.exe");
- Py_SetProgramName(progpath);
- // Continue when loaded
-}
-
-void PyShell::Loaded(Platform::Object^ sender, RoutedEventArgs^ e)
-{
- RunAsync(&PyShell::StartInterpreter);
-}
-
-void PyShell::RunAsync(void (PyShell::*m)(void))
-{
- if (running) {
- AddText("Error: Trying to run two async actions\n");
- return;
- }
- running = true;
- dispatcher = CoreWindow::GetForCurrentThread()->Dispatcher;
- auto t = create_task([this, m]{(this->*m)();});
- t.then([this]{
- running = false;
- auto _this = this;
- dispatcher->RunAsync(CoreDispatcherPriority::Normal, ref new DispatchedHandler([_this]{
- _this->AddText(_this->prompt());
- _this->enable_input();
- }));
- });
-}
-
-/*
-void PyShell::get_settings_commands(SettingsPane ^p, SettingsPaneCommandsRequestedEventArgs ^args)
-{
- auto cmd = ref new SettingsCommand(L"about", L"About",
- ref new UICommandInvokedHandler([this](IUICommand ^cmd) {
- Windows::System::Launcher::LaunchUriAsync(ref new Uri(L"http://wiki.python.org/moin/MartinvonLoewis/Python%203%20For%20Metro"));
- }));
- args->Request->ApplicationCommands->Append(cmd);
-
- cmd = ref new SettingsCommand(L"privacy", L"Privacy",
- ref new UICommandInvokedHandler([this](IUICommand ^cmd) {
- auto popup = ref new Popup();
- popup->Height = this->ActualHeight;
- popup->Width = 346; // per UI guidelines
- popup->SetValue(Canvas::LeftProperty, this->ActualWidth - 346);
- popup->SetValue(Canvas::TopProperty, safe_cast(0));
- popup->SetValue(FrameworkElement::HeightProperty, this->ActualHeight);
- popup->IsLightDismissEnabled = true;
-
- auto s = ref new Privacy();
- s->Height = this->ActualHeight;
- popup->Child = s;
- popup->IsOpen = true;
- }));
- args->Request->ApplicationCommands->Append(cmd);
-
- cmd = ref new SettingsCommand(L"settings", L"Settings",
- ref new UICommandInvokedHandler([this](IUICommand ^cmd) {
- auto popup = ref new Popup();
- popup->Height = this->ActualHeight;
- popup->Width = 346; // per UI guidelines
- popup->SetValue(Canvas::LeftProperty, this->ActualWidth - 346);
- popup->SetValue(Canvas::TopProperty, safe_cast(0));
- popup->SetValue(FrameworkElement::HeightProperty, this->ActualHeight);
- popup->IsLightDismissEnabled = true;
-
- auto s = ref new Settings(this);
- s->Height = this->ActualHeight;
- popup->Child = s;
- popup->IsOpen = true;
- }));
- args->Request->ApplicationCommands->Append(cmd);
-
- cmd = ref new SettingsCommand(L"docs", L"Python Documentation",
- ref new UICommandInvokedHandler([this](IUICommand ^cmd) {
- Windows::System::Launcher::LaunchUriAsync(ref new Uri(L"http://docs.python.org/dev/index.html"));
- }));
- args->Request->ApplicationCommands->Append(cmd);
-
-
-}
-*/
-void PyShell::StartInterpreter()
-{
- exited = false;
- _prompt = 1;
- current_run = nullptr;
- current_paragraph = nullptr;
- current_input = nullptr;
- last_was_stderr = false;
-
- Py_Initialize();
- PyEval_InitThreads();
-
- /* boot interactive shell */
- metrosetup = PyImport_ImportModule("metrosetup");
- if (metrosetup == NULL) {
- PyErr_Print();
- }
-
- PyEval_ReleaseThread(PyThreadState_Get());
-}
-
-void PyShell::StopInterpreter()
-{
- PyGILState_STATE s = PyGILState_Ensure();
- Py_Finalize();
- this->textBlock1->Blocks->Clear();
-}
-
-void PyShell::OnNavigatedTo(NavigationEventArgs^ e)
-{
- this->UpdateLayout();
- bool x=this->textBlock1->Focus(Windows::UI::Xaml::FocusState::Programmatic);
-}
-
-void PyShell::SizeChanged(Platform::Object^ source, Windows::UI::Xaml::SizeChangedEventArgs^ args)
-{
- float width = args->NewSize.Width;
- if (current_input) {
- current_input->Width = args->NewSize.Width * 0.9;
- }
-}
-
-void PyShell::exit()
-{
- exited = true;
-}
-
-String^ PyShell::prompt()
-{
- switch (_prompt) {
- case 0:
- return "";
- case 1:
- return ">>> ";
- case 2:
- return "... ";
- }
- /* Error */
- return nullptr;
-}
-
-void PyShell::enable_input()
-{
- current_input = ref new TextBox();
- current_input->AcceptsReturn = false;
- current_input->Width = this->ActualWidth * 0.9;
- current_input->FontFamily = ref new Windows::UI::Xaml::Media::FontFamily("Consolas");
- current_input->FontSize = 16;
- current_input->BorderBrush = ref new SolidColorBrush(forecolor);
- current_input->BorderThickness = 1;
- current_input->KeyDown += ref new KeyEventHandler(this, &PyShell::KeyDown);
- InlineUIContainer^ c = ref new InlineUIContainer();
- c->Child = current_input;
- current_paragraph->Inlines->Append(c);
- current_input->Focus(Windows::UI::Xaml::FocusState::Programmatic);
- scrollView->UpdateLayout();
- scrollView->ScrollToVerticalOffset(this->textBlock1->ActualHeight);
-}
-
-void PyShell::disable_input()
-{
- if (current_input == nullptr)
- return;
- current_paragraph->Inlines->RemoveAtEnd();
- current_input = nullptr;
-}
-
-PyObject* PyShell::try_compile()
-{
- PyGILState_STATE s = PyGILState_Ensure();
- PyObject *code = PyObject_CallMethod(metrosetup, "compile", "u", command->Data());
- if (code == NULL) {
- PyErr_Print();
- command = "";
- _prompt = 1;
- }
- else if (code == Py_None) {
- // more input
- _prompt = 2;
- Py_DECREF(code);
- }
- else
- _prompt = 0;
- PyGILState_Release(s);
- return code;
-}
-
-void PyShell::run_code()
-{
- PyGILState_STATE s = PyGILState_Ensure();
- PyObject *result = PyObject_CallMethod(metrosetup, "eval", "O", current_code);
- if (result == NULL) {
- PyErr_Print();
- }
- else {
- Py_DECREF(result);
- }
- Py_CLEAR(current_code);
- _prompt = 1;
- command = "";
- PyGILState_Release(s);
- if (exited) {
- //Window::Current->Close();
- StopInterpreter();
- StartInterpreter();
- }
-}
-
-void python34app::PyShell::KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e)
-{
- if (e->Key == Windows::System::VirtualKey::Enter) {
- String^ line = current_input->Text;
- if (line != nullptr && line != "") {
- history->Append(line);
- histpos = history->Size;
- }
-
- disable_input();
- line = line + "\n";
- AddText(line);
-
- command += line;
- current_code = try_compile();
- AddText(prompt());
- if (_prompt == 0)
- RunAsync(&PyShell::run_code);
- else
- enable_input();
- e->Handled = true;
- }
-
- /*
- if (e->Key == Windows::System::VirtualKey::Tab) {
- textBox1->
- e->Handled = true;
- }
- */
-
- if (e->Key == Windows::System::VirtualKey::Up && histpos > 0) {
- histpos--;
- current_input->Text = history->GetAt(histpos);
- e->Handled = true;
- }
-
- if (e->Key == Windows::System::VirtualKey::Down && histpos < history->Size) {
- histpos++;
- if (histpos < history->Size) {
- current_input->Text = history->GetAt(histpos);
- }
- e->Handled = true;
- }
-}
-
-void PyShell::AddText(String ^s0, bool is_stderr)
-{
- const wchar_t *s = s0->Data();
-
- if (last_was_stderr != is_stderr) {
- current_run = nullptr;
- }
- last_was_stderr = is_stderr;
- if (current_run == nullptr) {
- current_paragraph = ref new Paragraph();
- current_paragraph->FontFamily = ref new Windows::UI::Xaml::Media::FontFamily("Consolas");
- current_paragraph->FontSize = 16;
- if (is_stderr) {
- current_paragraph->Foreground = ref new Windows::UI::Xaml::Media::SolidColorBrush(Windows::UI::Colors::Red);
- }
- current_run = ref new Run();
- current_paragraph->Inlines->Append(current_run);
- this->textBlock1->Blocks->Append(current_paragraph);
- }
- while(*s) {
- if (*s == L'\n') {
- current_run = nullptr;
- AddText(ref new String(s+1), is_stderr);
- return;
- }
- if (current_run->Text == nullptr)
- current_run->Text = ref new String(s, 1);
- else
- current_run->Text += (wchar_t)*s;
- s++;
- }
- scrollView->UpdateLayout();
- scrollView->ScrollToVerticalOffset(this->textBlock1->ActualHeight);
-}
-
-void PyShell::AddTextAsync(String ^s0, bool is_stderr)
-{
- dispatcher->RunAsync(CoreDispatcherPriority::Normal,
- ref new DispatchedHandler([this,s0,is_stderr]{
- AddText(s0, is_stderr);
- }));
-}
-
-void PyShell::AddOutAsync(wchar_t *s)
-{
- AddTextAsync(ref new String(s), false);
-}
-
-void PyShell::AddErrAsync(wchar_t *s)
-{
- AddTextAsync(ref new String(s), true);
-}
-
-void python34app::PyShell::do_restart(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
- StopInterpreter();
- StartInterpreter();
-}
-
-void PyShell::run_simple_string()
-{
- PyGILState_STATE s = PyGILState_Ensure();
- PyRun_SimpleString((char*)simple_string->Data);
- PyGILState_Release(s);
-}
-
-void python34app::PyShell::run_file(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
- FileOpenPicker^ fop = ref new FileOpenPicker();
- fop->SuggestedStartLocation = PickerLocationId::DocumentsLibrary;
- fop->CommitButtonText = "Run Script";
- fop->FileTypeFilter->Append(".py");
- auto t = create_task(fop->PickSingleFileAsync());
- t.then([this](StorageFile^ file){
- if (file == nullptr) {
- AddErrAsync(L"Cancelled");
- }
- else {
- auto _this = this;
- auto open = create_task(file->OpenReadAsync());
- open.then([_this, file](IRandomAccessStream^ f) {
- if (f == nullptr) {
- wchar_t msg[1024];
- swprintf_s(msg, L"Reading %s failed", file->Path->Data());
- _this->AddErrAsync(msg);
- } else {
- auto reader = ref new DataReader(f);
- auto reading = create_task(reader->LoadAsync(f->Size));
- reading.then([_this, reader](UINT bytesread){
- _this->simple_string = ref new Array(bytesread);
- reader->ReadBytes(_this->simple_string);
- _this->simple_string->Data[bytesread] = '\0';
- _this->RunAsync(&PyShell::run_simple_string);
- }) ;
- }
- });
- }
- });
-}
-
-
-/***************************** Settings *********************/
-
-void PyShell::set_forecolor(Color c)
-{
- forecolor = c;
- auto brush = ref new SolidColorBrush(c);
- textBlock1->Foreground = brush;
- if (current_input) {
- /* Cannot set background since caret color will stay in black */
- current_input->BorderBrush = brush;
- }
-}
-
-void PyShell::set_backcolor(Color c)
-{
- backcolor = c;
- auto brush = ref new SolidColorBrush(c);
- scrollView->Background = brush;
-}
-
-static uint32_t color2int(Color c)
-{
- return (((((c.A << 8) + c.R) << 8) + c.G) << 8) + c.B;
-}
-
-static Color int2color(uint32_t c)
-{
- uint8_t a,r,g,b;
- b = c & 0xff; c >>= 8;
- g = c & 0xff; c >>= 8;
- r = c & 0xff; c >>= 8;
- a = c & 0xff; c >>= 8;
- return ColorHelper::FromArgb(a, r, g, b);
-}
-
-void PyShell::load_settings(ApplicationData^ data, Object^)
-{
- auto values = data->RoamingSettings->Values;
- auto fg = values->Lookup(L"forecolor");
- if (fg != nullptr)
- set_forecolor(int2color(safe_cast(fg)));
- auto bg = values->Lookup(L"backcolor");
- if (bg != nullptr)
- set_backcolor(int2color(safe_cast(bg)));
-}
-
-void PyShell::save_settings()
-{
- auto values = ApplicationData::Current->RoamingSettings->Values;
- values->Insert(L"forecolor", color2int(forecolor));
- values->Insert(L"backcolor", color2int(backcolor));
-}
\ No newline at end of file
diff --git a/win8app/python34app/PyShell.xaml.h b/win8app/python34app/PyShell.xaml.h
deleted file mode 100644
index 1c683ac..0000000
--- a/win8app/python34app/PyShell.xaml.h
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// PyShell.xaml.h
-// Declaration of the PyShell.xaml class.
-//
-
-#pragma once
-
-#include "pch.h"
-#include "PyShell.g.h"
-#include "Python.h"
-using namespace Platform;
-using namespace Windows::UI::Xaml::Controls;
-using namespace Windows::UI::Xaml::Documents;
-using namespace Windows::UI::ApplicationSettings;
-
-namespace python34app
-{
- [Windows::Foundation::Metadata::WebHostHidden]
- public ref class PyShell sealed
- {
- String ^command;
- int _prompt; // 1: ps1, 2: ps2
- String ^prompt();
- Run^ current_run;
- Paragraph^ current_paragraph;
- TextBox^ current_input;
- bool last_was_stderr;
-
- double orig_height; // for soft keyboard
-
- Platform::Collections::Vector ^history;
- unsigned int histpos;
-
- Windows::UI::Color forecolor, backcolor;
-
- bool running;
- Windows::UI::Core::CoreDispatcher ^dispatcher;
-
- Array ^simple_string;
- void run_simple_string();
-
- PyObject *current_code;
- void run_code();
-
- PyObject* try_compile();
- PyObject *metrosetup;
- bool exited;
- void RunAsync(void (PyShell::*)(void));
- void StartInterpreter();
- void StopInterpreter();
- void AddText(String^ data, bool is_stderr = false);
- void AddTextAsync(String^ data, bool is_stderr = false);
- public:
- PyShell();
-
- void AddOutAsync(wchar_t *data);
- void AddErrAsync(wchar_t *data);
- void exit();
-
- //void get_settings_commands(SettingsPane ^p, SettingsPaneCommandsRequestedEventArgs^ args);
-
- void set_forecolor(Windows::UI::Color color);
- void set_backcolor(Windows::UI::Color color);
- void load_settings(Windows::Storage::ApplicationData^ appdata, Object^ o);
- void save_settings();
-
- protected:
- virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
- private:
- void KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e);
- void Loaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
- void SizeChanged(Platform::Object^, Windows::UI::Xaml::SizeChangedEventArgs^);
- void do_restart(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
- void run_file(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
- void enable_input();
- void disable_input();
- };
-}
diff --git a/win8app/python34app/Settings.xaml b/win8app/python34app/Settings.xaml
deleted file mode 100644
index 7bea416..0000000
--- a/win8app/python34app/Settings.xaml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- Standard Error output (including exceptions) is always displayed in red.
-
-
-
-
-
-
diff --git a/win8app/python34app/Settings.xaml.cpp b/win8app/python34app/Settings.xaml.cpp
deleted file mode 100644
index 2ef95c5..0000000
--- a/win8app/python34app/Settings.xaml.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// Settings.xaml.cpp
-// Implementierung der Klasse Settings
-//
-
-#include "pch.h"
-#include "Settings.xaml.h"
-
-using namespace python34app;
-
-using namespace Platform;
-using namespace Windows::Foundation;
-using namespace Windows::Foundation::Collections;
-using namespace Windows::UI::Xaml;
-using namespace Windows::UI::Xaml::Controls;
-using namespace Windows::UI::Xaml::Controls::Primitives;
-using namespace Windows::UI::Xaml::Data;
-using namespace Windows::UI::Xaml::Input;
-using namespace Windows::UI::Xaml::Media;
-using namespace Windows::UI::Xaml::Navigation;
-
-// Die Elementvorlage "Benutzersteuerelement" ist unter http://go.microsoft.com/fwlink/?LinkId=234236 dokumentiert.
-
-Settings::Settings(PyShell ^s):
- shell(s)
-{
- InitializeComponent();
-}
-
-
-void python34app::Settings::do_close(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
- auto popup = (Popup^)Parent;
- popup->IsOpen = false;
-}
-
-
-void python34app::Settings::white_on_black(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
- shell->set_forecolor(Windows::UI::Colors::White);
- shell->set_backcolor(Windows::UI::Colors::Black);
- shell->save_settings();
-}
-
-
-void python34app::Settings::black_on_white(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
- shell->set_forecolor(Windows::UI::Colors::Black);
- shell->set_backcolor(Windows::UI::Colors::White);
- shell->save_settings();
-}
diff --git a/win8app/python34app/Settings.xaml.h b/win8app/python34app/Settings.xaml.h
deleted file mode 100644
index ce93542..0000000
--- a/win8app/python34app/Settings.xaml.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Settings.xaml.h
-// Deklaration der Settings-Klasse
-//
-
-#pragma once
-
-#include "Settings.g.h"
-#include "PyShell.xaml.h"
-
-namespace python34app
-{
- [Windows::Foundation::Metadata::WebHostHidden]
- public ref class Settings sealed
- {
- PyShell ^shell;
- public:
- Settings(PyShell ^shell);
- private:
- void do_close(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
- void white_on_black(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
- void black_on_white(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
- };
-}
diff --git a/win8app/python34app/makezip.py b/win8app/python34app/makezip.py
deleted file mode 100644
index 3707577..0000000
--- a/win8app/python34app/makezip.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!python3.4
-import compileall, os, zipfile, imp, sys
-force = False
-#force = True
-
-print(sys.version)
-
-imp_suffix = "."+imp.get_tag()+".pyc"
-
-try:
- os.unlink('python34app.zip')
-except Exception:
- pass
-out = zipfile.ZipFile('python34app.zip', 'w')#, compression=zipfile.ZIP_DEFLATED)
-prefix = '../../Lib/'
-for dir, subdirs, files in os.walk(prefix):
- for d in subdirs[:]:
- if d in ('test', 'tests') or d.startswith('plat-'):
- subdirs.remove(d)
- ddir = dir[len(prefix):]
- for f in files:
- if (f.endswith('.py') and f != '__phello__.foo.py'):
- compileall.compile_file(os.path.join(dir, f), ddir=ddir, force=force)
- out.write(os.path.join(dir, "__pycache__", f[:-3]+imp_suffix), ddir+"/"+f+"c")
- elif f.endswith('.cfg'):
- out.write(os.path.join(dir, f), ddir+"/"+f)
- else:
- continue
-out.close()
-
diff --git a/win8app/python34app/pch.h b/win8app/python34app/pch.h
deleted file mode 100644
index 31c1c1e..0000000
--- a/win8app/python34app/pch.h
+++ /dev/null
@@ -1,8 +0,0 @@
-//
-// pch.h
-// Header for standard system include files.
-//
-
-#pragma once
-
-#include "App.xaml.h"
diff --git a/win8app/python34app/python34app.vcxproj b/win8app/python34app/python34app.vcxproj
deleted file mode 100644
index 77e4328..0000000
--- a/win8app/python34app/python34app.vcxproj
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
- Debug
- ARM
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- ARM
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}
- python34app
- en-us
- 16.0
- true
- Windows Store
- 10.0
- python34app
- 10.0.18362.0
- 10.0.18362.0
-
-
-
- Application
- true
- v142
-
-
- Application
- true
- v142
-
-
- Application
- true
- v142
-
-
- Application
- false
- true
- v142
-
-
- Application
- false
- true
- v142
-
-
- Application
- false
- true
- v142
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- F385169FC3204C0E8F2A977A0AD4C5F100AB8527
- python34app_TemporaryKey.pfx
- True
-
-
-
- /bigobj %(AdditionalOptions)
- NotUsing
- $(ProjectDir)..\..\Include;$(ProjectDir)..\..\PC;$(ProjectDir);$(IntDir);%(AdditionalIncludeDirectories)
-
-
-
-
- /bigobj %(AdditionalOptions)
- NotUsing
- $(ProjectDir)..\..\Include;$(ProjectDir)..\..\PC;$(ProjectDir);$(IntDir);%(AdditionalIncludeDirectories)
-
-
-
-
- /bigobj %(AdditionalOptions)
- NotUsing
- $(ProjectDir)..\..\Include;$(ProjectDir)..\..\PC;$(ProjectDir);$(IntDir);%(AdditionalIncludeDirectories)
-
-
-
-
- /bigobj %(AdditionalOptions)
- NotUsing
- $(ProjectDir)..\..\Include;$(ProjectDir)..\..\PC;$(ProjectDir);$(IntDir);%(AdditionalIncludeDirectories)
-
-
-
-
- /bigobj %(AdditionalOptions)
- NotUsing
- $(ProjectDir)..\..\Include;$(ProjectDir)..\..\PC;$(ProjectDir);$(IntDir);%(AdditionalIncludeDirectories)
-
-
-
-
- /bigobj %(AdditionalOptions)
- NotUsing
- $(ProjectDir)..\..\Include;$(ProjectDir)..\..\PC;$(ProjectDir);$(IntDir);%(AdditionalIncludeDirectories)
-
-
-
-
- App.xaml
-
-
- Privacy.xaml
-
-
- PyShell.xaml
-
-
- Settings.xaml
-
-
-
-
- Designer
-
-
- Designer
-
-
- Designer
-
-
- Designer
-
-
-
-
-
- Designer
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
- App.xaml
-
-
- Privacy.xaml
-
-
- PyShell.xaml
-
-
- Settings.xaml
-
-
-
-
- {8ac701d7-f07a-442a-9cda-ec412f4d9307}
-
-
-
-
- Designer
-
-
-
-
-
-
\ No newline at end of file
diff --git a/win8app/python34app/python34app.vcxproj.filters b/win8app/python34app/python34app.vcxproj.filters
deleted file mode 100644
index b24a7a0..0000000
--- a/win8app/python34app/python34app.vcxproj.filters
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- 17cbd60f-e890-4473-940b-5abfb2190192
-
-
- 8e775f5d-b945-4494-9c51-35944f384eb6
-
-
- Common
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
- Assets
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/win8app/python34app/python34app.zip b/win8app/python34app/python34app.zip
deleted file mode 100644
index 8869f06..0000000
Binary files a/win8app/python34app/python34app.zip and /dev/null differ
diff --git a/win8app/win8app.sln b/win8app/win8app.sln
deleted file mode 100644
index 36e7b1e..0000000
--- a/win8app/win8app.sln
+++ /dev/null
@@ -1,60 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30621.155
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python34app", "python34app\python34app.vcxproj", "{8AC701D7-F07A-442A-9CDA-EC412F4D9307}"
- ProjectSection(ProjectDependencies) = postProject
- {17CBD60F-E890-4473-940B-5ABFB2190192} = {17CBD60F-E890-4473-940B-5ABFB2190192}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python34", "python34\python34.vcxproj", "{17CBD60F-E890-4473-940B-5ABFB2190192}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|ARM = Debug|ARM
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|ARM = Release|ARM
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Debug|ARM.ActiveCfg = Debug|ARM
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Debug|ARM.Build.0 = Debug|ARM
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Debug|Win32.ActiveCfg = Debug|Win32
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Debug|Win32.Build.0 = Debug|Win32
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Debug|x64.ActiveCfg = Debug|x64
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Debug|x64.Build.0 = Debug|x64
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Release|ARM.ActiveCfg = Release|ARM
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Release|ARM.Build.0 = Release|ARM
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Release|Win32.ActiveCfg = Release|Win32
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Release|Win32.Build.0 = Release|Win32
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Release|x64.ActiveCfg = Release|x64
- {8AC701D7-F07A-442A-9CDA-EC412F4D9307}.Release|x64.Build.0 = Release|x64
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|ARM.ActiveCfg = Debug|ARM
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|ARM.Build.0 = Debug|ARM
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|ARM.Deploy.0 = Debug|ARM
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|Win32.ActiveCfg = Debug|Win32
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|Win32.Build.0 = Debug|Win32
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|Win32.Deploy.0 = Debug|Win32
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|x64.ActiveCfg = Debug|x64
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|x64.Build.0 = Debug|x64
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Debug|x64.Deploy.0 = Debug|x64
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|ARM.ActiveCfg = Release|ARM
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|ARM.Build.0 = Release|ARM
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|ARM.Deploy.0 = Release|ARM
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|Win32.ActiveCfg = Release|Win32
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|Win32.Build.0 = Release|Win32
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|Win32.Deploy.0 = Release|Win32
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|x64.ActiveCfg = Release|x64
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|x64.Build.0 = Release|x64
- {17CBD60F-E890-4473-940B-5ABFB2190192}.Release|x64.Deploy.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {5B9CD3CE-15F2-4EF5-AC79-78E517940F07}
- EndGlobalSection
-EndGlobal
diff --git a/wp8app/python33/python33.cpp b/wp8app/python33/python33.cpp
deleted file mode 100644
index 3d3cbfd..0000000
--- a/wp8app/python33/python33.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-#include "Python.h"
-#include "python33.h"
-
-using namespace python33;
-using namespace Platform;
-using namespace Windows::Storage::Streams;
-//using namespace Windows::Security::Cryptography;
-
-
-extern "C" void win32_urandom(unsigned char* buffer, Py_ssize_t size, int raise)
-{
- /* XXX no cryptography on WP8???
-
- IBuffer^ data = CryptographicBuffer::GenerateRandom(size);
- Array^ data2;
- CryptographicBuffer::CopyToByteArray(data, &data2);
- for(int i=0; i < size; i++)
- buffer[i] = data2[i];
- */
- /* XXX leave data uninitialized for now */
-}
-
-static Interpreter^ singleton;
-
-extern "C" static PyObject *
-add_to_stdout(PyObject *self, PyObject *args)
-{
- Py_UNICODE *data;
- if (!PyArg_ParseTuple(args, "u", &data))
- return NULL;
- singleton->Gui->AddOutAsync(ref new String(data));
- Py_RETURN_NONE;
-}
-
-extern "C" static PyObject *
-add_to_stderr(PyObject *self, PyObject *args)
-{
- Py_UNICODE *data;
- if (!PyArg_ParseTuple(args, "u", &data))
- return NULL;
- singleton->Gui->AddErrAsync(ref new String(data));
- Py_RETURN_NONE;
-}
-
-extern "C" static PyObject *
-readline(PyObject *self, PyObject *args)
-{
- PyErr_SetString(PyExc_IOError, "Getting input from console is not implemented yet");
- return NULL;
-}
-
-extern "C" static PyObject *
-metroui_exit(PyObject *self, PyObject *args)
-{
- //singleton->exit();
- Py_RETURN_NONE;
-}
-
-static struct PyMethodDef metroui_methods[] = {
- {"add_to_stdout", add_to_stdout,
- METH_VARARGS, NULL},
- {"add_to_stderr", add_to_stderr,
- METH_VARARGS, NULL},
- {"readline", readline, METH_NOARGS, NULL},
- /*{"exit", metroui_exit,
- METH_NOARGS, NULL},*/
- {NULL, NULL}
-};
-
-static struct PyModuleDef metroui = {
- PyModuleDef_HEAD_INIT,
- "metroui",
- NULL,
- -1,
- metroui_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-extern "C" static PyObject*
-PyInit_metroui()
-{
- return PyModule_Create(&metroui);
-}
-static int metroui_added = false;
-
-static wchar_t progpath[1024];
-Interpreter::Interpreter(GUI^ gui)
-{
- singleton = this;
- this->gui = gui;
- /* add metroui to builtin modules */
- if (!metroui_added) {
- PyImport_AppendInittab("metroui", PyInit_metroui);
- metroui_added = true;
- }
-
- /* compute python path */
- Windows::ApplicationModel::Package^ package = Windows::ApplicationModel::Package::Current;
- Windows::Storage::StorageFolder^ installedLocation = package->InstalledLocation;
- wcscpy_s(progpath, installedLocation->Path->Data());
- /* XXX how to determine executable name? */
- wcscat_s(progpath, L"\\python33app.exe");
- Py_SetProgramName(progpath);
- Py_Initialize();
- PyEval_InitThreads();
-
- /* boot interactive shell */
- metrosetup = PyImport_ImportModule("metrosetup");
- if (metrosetup == NULL) {
- PyErr_Print();
- }
-
- PyEval_ReleaseThread(PyThreadState_Get());
-}
-
-void Interpreter::ShutDown()
-{
- PyGILState_STATE s = PyGILState_Ensure();
- Py_Finalize();
-}
-
-python33::Object^ Interpreter::TryCompile(String ^command)
-{
- python33::Object^ result;
- PyGILState_STATE s = PyGILState_Ensure();
- PyObject *code = PyObject_CallMethod(metrosetup, "compile", "u", command->Data());
- if (code == NULL) {
- PyErr_Print();
- result = nullptr;
- }
- else
- result = ref new python33::Object(code);
- PyGILState_Release(s);
- return result;
-}
-
-void Interpreter::RunCode(python33::Object^ command)
-{
- PyGILState_STATE s = PyGILState_Ensure();
- PyObject *result = PyObject_CallMethod(metrosetup, "eval", "O", command->obj);
- if (result == NULL) {
- PyErr_Print();
- }
- else
- Py_DECREF(result);
- PyGILState_Release(s);
-}
-
-void Interpreter::RunScript(const Platform::Array^ script)
-{
- if (script[script->Length-1] != '\0')
- {
- throw ref new Platform::InvalidArgumentException("code not null-terminated");
- }
- PyGILState_STATE s = PyGILState_Ensure();
- PyRun_SimpleString((const char*)script->Data);
- PyGILState_Release(s);
-}
diff --git a/wp8app/python33/python33.h b/wp8app/python33/python33.h
deleted file mode 100644
index ac7fa0b..0000000
--- a/wp8app/python33/python33.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#pragma once
-
-using namespace Platform;
-
-namespace python33
-{
- public ref class Object sealed{
- private:
- PyObject *obj;
- friend ref class Interpreter;
- Object(PyObject* o):obj(o){}
- ~Object(){ Py_DECREF(obj);}
- public:
- property bool isNone{
- bool get(){return obj == Py_None;}
- }
- };
-
- public interface class GUI {
- void AddOutAsync(String^ text);
- void AddErrAsync(String^ text);
- };
-
- public ref class Interpreter sealed
- {
- GUI^ gui;
- PyObject *metrosetup;
- public:
- Interpreter(GUI^ callback);
- void ShutDown();
- property GUI^ Gui {
- GUI^ get() { return gui; }
- }
- python33::Object^ TryCompile(String^ code);
- void RunCode(python33::Object^ code);
- void RunScript(const Platform::Array^ code);
- };
-}
\ No newline at end of file
diff --git a/wp8app/python33/python33.vcxproj b/wp8app/python33/python33.vcxproj
deleted file mode 100644
index b33d7b8..0000000
--- a/wp8app/python33/python33.vcxproj
+++ /dev/null
@@ -1,325 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- ARM
-
-
- Release
- Win32
-
-
- Release
- ARM
-
-
-
- {ef50a20b-590d-45b5-9a56-f804d43ad6b8}
- python33
- en-US
- 11.0
- true
-
-
-
- DynamicLibrary
- true
- v110_wp80
-
-
- DynamicLibrary
- true
- v110_wp80
-
-
- DynamicLibrary
- false
- true
- v110_wp80
-
-
- DynamicLibrary
- false
- true
- v110_wp80
-
-
-
-
-
-
-
- false
-
-
-
- _WINRT_DLL;WIN32;Py_BUILD_CORE;%(PreprocessorDefinitions)
- NotUsing
-
-
- $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)
- false
- CompileAsC
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
-
-
- Console
- false
- ole32.lib;%(IgnoreSpecificDefaultLibraries)
- true
- true
-
-
-
-
- _WINRT_DLL;WIN32;Py_BUILD_CORE;NDEBUG;%(PreprocessorDefinitions)
- NotUsing
-
-
- $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)
- false
- CompileAsC
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
-
-
- Console
- false
- ole32.lib;%(IgnoreSpecificDefaultLibraries)
- true
-
-
-
-
- _WINRT_DLL;WIN32;Py_BUILD_CORE;%(PreprocessorDefinitions)
- NotUsing
-
-
- $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)
- false
- CompileAsC
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
-
-
- Console
- false
- ole32.lib;%(IgnoreSpecificDefaultLibraries)
- true
-
-
-
-
- _WINRT_DLL;WIN32;Py_BUILD_CORE;NDEBUG;%(PreprocessorDefinitions)
- NotUsing
-
-
- $(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)
- false
- CompileAsC
- $(SolutionDir)..\Include;$(SolutionDir)..\PC;%(AdditionalIncludeDirectories)
- false
-
-
- Console
- false
- ole32.lib;%(IgnoreSpecificDefaultLibraries)
- true
-
-
-
-
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HGBRANCH="win8app";%(PreprocessorDefinitions)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CompileAsCpp
- true
-
-
-
- $(SolutionDir)..\Modules\zlib;%(AdditionalIncludeDirectories)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Default
- true
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp8app/python33/python33.vcxproj.filters b/wp8app/python33/python33.vcxproj.filters
deleted file mode 100644
index ec4c49e..0000000
--- a/wp8app/python33/python33.vcxproj.filters
+++ /dev/null
@@ -1,525 +0,0 @@
-
-
-
-
- 5fd0e509-b6ae-4f29-bd2a-4d2cc10f3aa0
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
- {0f57dda4-aeff-49cc-b8d1-8fcb7953e7a5}
-
-
- {934a779c-be5d-4b0f-9f85-f42011fecb1b}
-
-
- {a9e226ef-cb41-4315-af6f-d8f46bcdb976}
-
-
- {b3ccbcdd-8495-4451-a758-e930320c4c64}
-
-
- {6219f105-65ed-43f9-97a9-3c97acac9303}
-
-
- {b4cb6f67-85ff-4967-8080-8e689616cad6}
-
-
- {c65c77ca-2503-4a38-a2c2-1eb7d08f0c61}
-
-
-
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Objects
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- Parser
-
-
- PC
-
-
- PC
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Python
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\_io
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules\zlib
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- Modules
-
-
- PC
-
-
- Python
-
-
- PC
-
-
- Modules
-
-
- Modules
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp8app/python33app/App.xaml b/wp8app/python33app/App.xaml
deleted file mode 100644
index 62b8f5e..0000000
--- a/wp8app/python33app/App.xaml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp8app/python33app/App.xaml.cs b/wp8app/python33app/App.xaml.cs
deleted file mode 100644
index 9e021bb..0000000
--- a/wp8app/python33app/App.xaml.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.Resources;
-using System.Windows;
-using System.Windows.Markup;
-using System.Windows.Navigation;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-using python33app.Resources;
-
-namespace python33app
-{
- public partial class App : Application
- {
- ///
- /// Provides easy access to the root frame of the Phone Application.
- ///
- /// The root frame of the Phone Application.
- public static PhoneApplicationFrame RootFrame { get; private set; }
-
- ///
- /// Constructor for the Application object.
- ///
- public App()
- {
- // Global handler for uncaught exceptions.
- UnhandledException += Application_UnhandledException;
-
- // Standard XAML initialization
- InitializeComponent();
-
- // Phone-specific initialization
- InitializePhoneApplication();
-
- // Language display initialization
- InitializeLanguage();
-
- // Show graphics profiling information while debugging.
- if (Debugger.IsAttached)
- {
- // Display the current frame rate counters.
- Application.Current.Host.Settings.EnableFrameRateCounter = true;
-
- // Show the areas of the app that are being redrawn in each frame.
- //Application.Current.Host.Settings.EnableRedrawRegions = true;
-
- // Enable non-production analysis visualization mode,
- // which shows areas of a page that are handed off to GPU with a colored overlay.
- //Application.Current.Host.Settings.EnableCacheVisualization = true;
-
- // Prevent the screen from turning off while under the debugger by disabling
- // the application's idle detection.
- // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
- // and consume battery power when the user is not using the phone.
- PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
- }
-
- }
-
- // Code to execute when the application is launching (eg, from Start)
- // This code will not execute when the application is reactivated
- private void Application_Launching(object sender, LaunchingEventArgs e)
- {
- }
-
- // Code to execute when the application is activated (brought to foreground)
- // This code will not execute when the application is first launched
- private void Application_Activated(object sender, ActivatedEventArgs e)
- {
- }
-
- // Code to execute when the application is deactivated (sent to background)
- // This code will not execute when the application is closing
- private void Application_Deactivated(object sender, DeactivatedEventArgs e)
- {
- }
-
- // Code to execute when the application is closing (eg, user hit Back)
- // This code will not execute when the application is deactivated
- private void Application_Closing(object sender, ClosingEventArgs e)
- {
- }
-
- // Code to execute if a navigation fails
- private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
- {
- if (Debugger.IsAttached)
- {
- // A navigation has failed; break into the debugger
- Debugger.Break();
- }
- }
-
- // Code to execute on Unhandled Exceptions
- private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
- {
- if (Debugger.IsAttached)
- {
- // An unhandled exception has occurred; break into the debugger
- Debugger.Break();
- }
- }
-
- #region Phone application initialization
-
- // Avoid double-initialization
- private bool phoneApplicationInitialized = false;
-
- // Do not add any additional code to this method
- private void InitializePhoneApplication()
- {
- if (phoneApplicationInitialized)
- return;
-
- // Create the frame but don't set it as RootVisual yet; this allows the splash
- // screen to remain active until the application is ready to render.
- RootFrame = new PhoneApplicationFrame();
- RootFrame.Navigated += CompleteInitializePhoneApplication;
-
- // Handle navigation failures
- RootFrame.NavigationFailed += RootFrame_NavigationFailed;
-
- // Handle reset requests for clearing the backstack
- RootFrame.Navigated += CheckForResetNavigation;
-
- // Ensure we don't initialize again
- phoneApplicationInitialized = true;
- }
-
- // Do not add any additional code to this method
- private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
- {
- // Set the root visual to allow the application to render
- if (RootVisual != RootFrame)
- RootVisual = RootFrame;
-
- // Remove this handler since it is no longer needed
- RootFrame.Navigated -= CompleteInitializePhoneApplication;
- }
-
- private void CheckForResetNavigation(object sender, NavigationEventArgs e)
- {
- // If the app has received a 'reset' navigation, then we need to check
- // on the next navigation to see if the page stack should be reset
- if (e.NavigationMode == NavigationMode.Reset)
- RootFrame.Navigated += ClearBackStackAfterReset;
- }
-
- private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
- {
- // Unregister the event so it doesn't get called again
- RootFrame.Navigated -= ClearBackStackAfterReset;
-
- // Only clear the stack for 'new' (forward) and 'refresh' navigations
- if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
- return;
-
- // For UI consistency, clear the entire page stack
- while (RootFrame.RemoveBackEntry() != null)
- {
- ; // do nothing
- }
- }
-
- #endregion
-
- // Initialize the app's font and flow direction as defined in its localized resource strings.
- //
- // To ensure that the font of your application is aligned with its supported languages and that the
- // FlowDirection for each of those languages follows its traditional direction, ResourceLanguage
- // and ResourceFlowDirection should be initialized in each resx file to match these values with that
- // file's culture. For example:
- //
- // AppResources.es-ES.resx
- // ResourceLanguage's value should be "es-ES"
- // ResourceFlowDirection's value should be "LeftToRight"
- //
- // AppResources.ar-SA.resx
- // ResourceLanguage's value should be "ar-SA"
- // ResourceFlowDirection's value should be "RightToLeft"
- //
- // For more info on localizing Windows Phone apps see http://go.microsoft.com/fwlink/?LinkId=262072.
- //
- private void InitializeLanguage()
- {
- try
- {
- // Set the font to match the display language defined by the
- // ResourceLanguage resource string for each supported language.
- //
- // Fall back to the font of the neutral language if the Display
- // language of the phone is not supported.
- //
- // If a compiler error is hit then ResourceLanguage is missing from
- // the resource file.
- RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
-
- // Set the FlowDirection of all elements under the root frame based
- // on the ResourceFlowDirection resource string for each
- // supported language.
- //
- // If a compiler error is hit then ResourceFlowDirection is missing from
- // the resource file.
- FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
- RootFrame.FlowDirection = flow;
- }
- catch
- {
- // If an exception is caught here it is most likely due to either
- // ResourceLangauge not being correctly set to a supported language
- // code or ResourceFlowDirection is set to a value other than LeftToRight
- // or RightToLeft.
-
- if (Debugger.IsAttached)
- {
- Debugger.Break();
- }
-
- throw;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/wp8app/python33app/Assets/130x130.png b/wp8app/python33app/Assets/130x130.png
deleted file mode 100644
index c792148..0000000
Binary files a/wp8app/python33app/Assets/130x130.png and /dev/null differ
diff --git a/wp8app/python33app/Assets/70x70.png b/wp8app/python33app/Assets/70x70.png
deleted file mode 100644
index 49e0677..0000000
Binary files a/wp8app/python33app/Assets/70x70.png and /dev/null differ
diff --git a/wp8app/python33app/Assets/99x99.png b/wp8app/python33app/Assets/99x99.png
deleted file mode 100644
index f9cda88..0000000
Binary files a/wp8app/python33app/Assets/99x99.png and /dev/null differ
diff --git a/wp8app/python33app/Assets/Thumbs.db b/wp8app/python33app/Assets/Thumbs.db
deleted file mode 100644
index 703cb97..0000000
Binary files a/wp8app/python33app/Assets/Thumbs.db and /dev/null differ
diff --git a/wp8app/python33app/Assets/download.png b/wp8app/python33app/Assets/download.png
deleted file mode 100644
index eb603b3..0000000
Binary files a/wp8app/python33app/Assets/download.png and /dev/null differ
diff --git a/wp8app/python33app/Assets/refresh.png b/wp8app/python33app/Assets/refresh.png
deleted file mode 100644
index 3bedf80..0000000
Binary files a/wp8app/python33app/Assets/refresh.png and /dev/null differ
diff --git a/wp8app/python33app/Assets/storelogo.png b/wp8app/python33app/Assets/storelogo.png
deleted file mode 100644
index 26b09a5..0000000
Binary files a/wp8app/python33app/Assets/storelogo.png and /dev/null differ
diff --git a/wp8app/python33app/FileChooser.xaml b/wp8app/python33app/FileChooser.xaml
deleted file mode 100644
index 3a9a125..0000000
--- a/wp8app/python33app/FileChooser.xaml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp8app/python33app/FileChooser.xaml.cs b/wp8app/python33app/FileChooser.xaml.cs
deleted file mode 100644
index 740caf6..0000000
--- a/wp8app/python33app/FileChooser.xaml.cs
+++ /dev/null
@@ -1,236 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Navigation;
-using System.Threading.Tasks;
-using System.IO;
-using System.IO.IsolatedStorage;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-using Microsoft.Live;
-using Microsoft.Live.Controls;
-
-namespace python33app
-{
- class SkyDriveItem : ListBoxItem
- {
- public string id, name;
- public SkyDriveItem(string id, string name)
- {
- this.id = id;
- this.name = name;
- this.Content = name;
- }
-
- virtual public bool CanRun
- {
- get { return false; }
- }
-
- virtual public bool IsFolder
- {
- get { return false; }
- }
-
- }
-
- class SkyDriveFolder : SkyDriveItem
- {
- public SkyDriveFolder(string id, string name) : base(id, name)
- {
- this.Content = "[" + name + "]";
- }
-
- public override bool IsFolder
- {
- get
- {
- return true;
- }
- }
- }
-
- class SkyDriveFile : SkyDriveItem
- {
- public SkyDriveFile(string id, string name)
- : base(id, name)
- {
- IsEnabled = CanRun;
- }
-
- override public bool CanRun
- {
- get { return name.EndsWith(".py"); }
- }
- }
-
- /*
-
- Name
-
- Folder
-
-
-
- */
- class FolderListing : Grid
- {
- FolderListBox box;
- string name;
- TextBlock heading;
- public FolderListing(string name)
- {
- this.name = name;
- RowDefinitions.Add(new RowDefinition());
- RowDefinitions.Add(new RowDefinition());
-
- Margin = new Thickness(0, 0, 10, 0);
-
- heading = new TextBlock();
- heading.Text = "[Loading]";
- Children.Add(heading);
- SetRow(heading, 0);
-
- box = new FolderListBox(this);
- Children.Add(box);
- SetRow(box, 1);
- }
-
- public ListBox Box
- {
- get { return box; }
- }
-
- public void LoadingComplete()
- {
- heading.Text = name;
- }
- }
-
- class FolderListBox : ListBox
- {
- public FolderListing Listing { get; private set; }
- public FolderListBox(FolderListing listing)
- {
- Listing = listing;
- }
- }
-
- public partial class FileChooser : PhoneApplicationPage
- {
- LiveConnectClient client;
- SkyDriveFile selected;
-
- public FileChooser()
- {
- InitializeComponent();
- }
-
- private async void btnSignin_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
- {
- if (e.Status == LiveConnectSessionStatus.Connected)
- {
- MainPage.session = e.Session;
- client = new LiveConnectClient(MainPage.session);
- NavigationService.Navigate(new Uri("/FileChooser.xaml", UriKind.Relative));
- await AddDirectory("me/skydrive", "SkyDrive");
- }
- else
- {
- MainPage.session = null;
- }
- }
-
- private async Task AddDirectory(string id, string name)
- {
- try
- {
- var folder = new FolderListing(name);
- Folders.Children.Add(folder);
- LiveOperationResult operationResult = await client.GetAsync("/" + id + "/files");
- dynamic result = operationResult.Result;
- if (result.data == null)
- {
- this.ShowError("Server did not return a valid response.");
- return;
- }
-
- dynamic items = result.data;
- folder.Box.SelectionChanged += Box_SelectionChanged;
- foreach (dynamic item in items)
- {
- SkyDriveItem e;
- switch ((string)item.type)
- {
- case "folder":
- case "album":
- e = new SkyDriveFolder(item.id, item.name);
- break;
- default:
- e = new SkyDriveFile(item.id, item.name);
- break;
- }
- folder.Box.Items.Add(e);
- }
- folder.LoadingComplete();
- }
- catch (LiveConnectException e)
- {
- this.ShowError(e.Message);
- }
- }
-
- async void Box_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- var listbox = (FolderListBox)sender;
- var panel = listbox.Listing;
- int pos = Folders.Children.IndexOf(panel);
- /* Delete every subsequent folder */
- while (Folders.Children.Count > pos + 1)
- Folders.Children.RemoveAt(pos + 1);
- /* Analyze selected item if any */
- if (e.AddedItems.Count == 0)
- return;
- SkyDriveItem item = (SkyDriveItem)e.AddedItems[0];
- RunButton.IsEnabled = item.CanRun;
- selected = item.CanRun ? (SkyDriveFile)item : null;
- if (item.IsFolder)
- {
- await AddDirectory(item.id, item.name);
- }
- }
-
- private async void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
- {
- Loaded -= OnLoaded;
-
- if (MainPage.session == null)
- {
- this.NavigationService.Navigate(new Uri("/SkyDriveLogin.xaml", UriKind.Relative));
- return;
- }
-
- client = new LiveConnectClient(MainPage.session);
-
- await AddDirectory("me/skydrive", "SkyDrive");
- }
-
- void ShowError(string msg)
- { }
-
- private async void RunSelectedFile(object sender, RoutedEventArgs e)
- {
- var result = await client.DownloadAsync("/"+selected.id+"/content");
- int len = (int)result.Stream.Length;
- // allow for zero-termination
- var buf = new byte[len+1];
- int read = await result.Stream.ReadAsync(buf, 0, len);
- MainPage.downloadedCode = buf;
- NavigationService.GoBack();
- }
-
- }
-}
\ No newline at end of file
diff --git a/wp8app/python33app/LocalizedStrings.cs b/wp8app/python33app/LocalizedStrings.cs
deleted file mode 100644
index a599588..0000000
--- a/wp8app/python33app/LocalizedStrings.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using python33app.Resources;
-
-namespace python33app
-{
- ///
- /// Provides access to string resources.
- ///
- public class LocalizedStrings
- {
- private static AppResources _localizedResources = new AppResources();
-
- public AppResources LocalizedResources { get { return _localizedResources; } }
- }
-}
\ No newline at end of file
diff --git a/wp8app/python33app/MainPage.xaml b/wp8app/python33app/MainPage.xaml
deleted file mode 100644
index e668fc6..0000000
--- a/wp8app/python33app/MainPage.xaml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp8app/python33app/MainPage.xaml.cs b/wp8app/python33app/MainPage.xaml.cs
deleted file mode 100644
index 3a12413..0000000
--- a/wp8app/python33app/MainPage.xaml.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Navigation;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-using System.Windows.Documents;
-using System.Windows.Media;
-using Microsoft.Live;
-using python33app.Resources;
-
-namespace python33app
-{
- /* Apparently, this must be a separate class, else XAML has problems processing it. */
- class GUIHandler : python33.GUI
- {
- private MainPage mainPage;
- public GUIHandler(MainPage mainPage)
- {
- this.mainPage = mainPage;
- }
-
- public void AddErrAsync(string text)
- {
- mainPage.AddErrAsync(text);
- }
-
- public void AddOutAsync(string text)
- {
- mainPage.AddOutAsync(text);
- }
- }
-
- public partial class MainPage : PhoneApplicationPage
- {
- public static LiveConnectSession session;
- // Set after FileChooser has completed
- public static byte[] downloadedCode;
-
- private Paragraph current_paragraph;
- private Run current_run;
- private TextBox current_input;
- bool current_is_stderr;
- string command;
- python33.Interpreter py;
-
- public MainPage()
- {
- InitializeComponent();
- py = new python33.Interpreter(new GUIHandler(this));
- Prompt();
- }
-
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- base.OnNavigatedTo(e);
- if (downloadedCode != null)
- {
- HideInput();
- py.RunScript(downloadedCode);
- Prompt();
- }
- }
-
- protected override Size ArrangeOverride(Size finalSize)
- {
- var result = base.ArrangeOverride(finalSize);
- if (current_input != null)
- current_input.Width = ActualWidth * 0.8;
- return result;
- }
-
- private void NextRun(bool is_stderr)
- {
- current_paragraph = new Paragraph();
- if (is_stderr)
- current_paragraph.Foreground = new SolidColorBrush(Colors.Red);
- current_run = new Run();
- current_paragraph.Inlines.Add(current_run);
- Output.Blocks.Add(current_paragraph);
- current_is_stderr = is_stderr;
- }
-
- private void AddText(string text, bool is_stderr)
- {
- bool first = true;
- if (current_run == null || current_is_stderr != is_stderr)
- NextRun(is_stderr);
- foreach (var line in text.Split(new char[]{'\n'}))
- {
- if (!first)
- {
- NextRun(is_stderr);
- }
- current_run.Text += line;
- first = false;
- }
- }
-
- public void AddOutAsync(string s)
- {
- AddText(s, false);
- }
-
- public void AddErrAsync(string s)
- {
- AddText(s, true);
- }
-
- private void ShowInput()
- {
- if (current_input != null)
- return;
- current_input = new TextBox();
- current_input.FontFamily = Output.FontFamily;
- current_input.FontSize = Output.FontSize;
- current_input.KeyDown += current_input_KeyDown;
- // Set to 100 for now, adjust on
- current_input.Width = 100;
- var container = new InlineUIContainer();
- container.Child = current_input;
- current_paragraph.Inlines.Add(container);
- scrollView.UpdateLayout();
- scrollView.ScrollToVerticalOffset(Output.ActualHeight);
- }
-
- void current_input_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
- {
- if (e.Key == System.Windows.Input.Key.Enter)
- {
- var line = current_input.Text;
- HideInput();
- line += "\n";
- AddOutAsync(line);
- command += line;
- python33.Object result = py.TryCompile(command);
- if (result == null)
- {
- command = null;
- }
- else if (!result.isNone)
- {
- command = null;
- py.RunCode(result);
- }
- Prompt();
- }
- }
-
- private void HideInput()
- {
- if (current_input == null)
- return;
- current_paragraph.Inlines.RemoveAt(current_paragraph.Inlines.Count-1);
- current_input = null;
- }
-
- private void Prompt()
- {
- string prompt = command == null ? ">>> ":"... ";
- AddText(prompt, false);
- ShowInput();
- }
-
- private void Restart(object sender, EventArgs e)
- {
- py.ShutDown();
- Output.Blocks.Clear();
- current_run = null;
- current_is_stderr = false;
- current_input = null;
- py = new python33.Interpreter(new GUIHandler(this));
- Prompt();
- }
-
- private void RunFile(object sender, EventArgs e)
- {
- this.NavigationService.Navigate(new Uri("/FileChooser.xaml", UriKind.Relative));
- }
-
- private void Output_ManipulationDelta_1(object sender, System.Windows.Input.ManipulationDeltaEventArgs e)
- {
- var scale = ((ScaleTransform)Output.RenderTransform);
- var cumul = e.CumulativeManipulation.Scale;
- double min, max;
- if (cumul.X > cumul.Y) {
- max = cumul.X;
- min = cumul.Y;
- } else {
- max = cumul.Y;
- min = cumul.X;
- }
- if (min > 1)
- {
- scale.ScaleX = scale.ScaleY = max;
- }
- else
- {
- scale.ScaleX = scale.ScaleY = min;
- }
- e.Handled = true;
- }
- }
-}
\ No newline at end of file
diff --git a/wp8app/python33app/Properties/AppManifest.xml b/wp8app/python33app/Properties/AppManifest.xml
deleted file mode 100644
index 6712a11..0000000
--- a/wp8app/python33app/Properties/AppManifest.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
diff --git a/wp8app/python33app/Properties/AssemblyInfo.cs b/wp8app/python33app/Properties/AssemblyInfo.cs
deleted file mode 100644
index abf8441..0000000
--- a/wp8app/python33app/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Resources;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("python33app")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("python33app")]
-[assembly: AssemblyCopyright("Copyright © 2013 Python Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("6075c2fb-9697-471b-9861-a902805a737b")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: NeutralResourcesLanguageAttribute("en-US")]
diff --git a/wp8app/python33app/Properties/WMAppManifest.xml b/wp8app/python33app/Properties/WMAppManifest.xml
deleted file mode 100644
index 860a851..0000000
--- a/wp8app/python33app/Properties/WMAppManifest.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
- Assets\99x99.png
-
-
-
-
-
-
-
-
-
-
-
- Assets\70x70.png
- 0
- Assets\130x130.png
- Python 3
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp8app/python33app/Resources/AppResources.Designer.cs b/wp8app/python33app/Resources/AppResources.Designer.cs
deleted file mode 100644
index c416039..0000000
--- a/wp8app/python33app/Resources/AppResources.Designer.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18033
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace python33app.Resources {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class AppResources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal AppResources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("python33app.Resources.AppResources", typeof(AppResources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- ///
- /// Looks up a localized string similar to add.
- ///
- public static string AppBarButtonText {
- get {
- return ResourceManager.GetString("AppBarButtonText", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Menu Item.
- ///
- public static string AppBarMenuItemText {
- get {
- return ResourceManager.GetString("AppBarMenuItemText", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Python 3 for Windows Phone.
- ///
- public static string ApplicationTitle {
- get {
- return ResourceManager.GetString("ApplicationTitle", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to LeftToRight.
- ///
- public static string ResourceFlowDirection {
- get {
- return ResourceManager.GetString("ResourceFlowDirection", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to en-US.
- ///
- public static string ResourceLanguage {
- get {
- return ResourceManager.GetString("ResourceLanguage", resourceCulture);
- }
- }
- }
-}
diff --git a/wp8app/python33app/Resources/AppResources.resx b/wp8app/python33app/Resources/AppResources.resx
deleted file mode 100644
index 7f6b352..0000000
--- a/wp8app/python33app/Resources/AppResources.resx
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- LeftToRight
- Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language
-
-
- en-US
- Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language.
-
-
- Python 3 for Windows Phone
-
-
- add
-
-
- Menu Item
-
-
\ No newline at end of file
diff --git a/wp8app/python33app/SubmissionInfo/Settings.xml b/wp8app/python33app/SubmissionInfo/Settings.xml
deleted file mode 100644
index c81c601..0000000
--- a/wp8app/python33app/SubmissionInfo/Settings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
- storelogo.png
- screenshot_wvga.png;;;;;;;;
- screenshot_wxga.png;;;;;;;;
- screenshot_720p.png;;;;;;;;
-
\ No newline at end of file
diff --git a/wp8app/python33app/SubmissionInfo/screenshot_720p.png b/wp8app/python33app/SubmissionInfo/screenshot_720p.png
deleted file mode 100644
index 7c31f4b..0000000
Binary files a/wp8app/python33app/SubmissionInfo/screenshot_720p.png and /dev/null differ
diff --git a/wp8app/python33app/SubmissionInfo/screenshot_wvga.png b/wp8app/python33app/SubmissionInfo/screenshot_wvga.png
deleted file mode 100644
index 4913f49..0000000
Binary files a/wp8app/python33app/SubmissionInfo/screenshot_wvga.png and /dev/null differ
diff --git a/wp8app/python33app/SubmissionInfo/screenshot_wxga.png b/wp8app/python33app/SubmissionInfo/screenshot_wxga.png
deleted file mode 100644
index 9363f45..0000000
Binary files a/wp8app/python33app/SubmissionInfo/screenshot_wxga.png and /dev/null differ
diff --git a/wp8app/python33app/SubmissionInfo/storelogo.png b/wp8app/python33app/SubmissionInfo/storelogo.png
deleted file mode 100644
index 26b09a5..0000000
Binary files a/wp8app/python33app/SubmissionInfo/storelogo.png and /dev/null differ
diff --git a/wp8app/python33app/python33app.csproj b/wp8app/python33app/python33app.csproj
deleted file mode 100644
index 3af123b..0000000
--- a/wp8app/python33app/python33app.csproj
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 10.0.20506
- 2.0
- {711A9E5D-4758-4158-A034-FD000D88EB49}
- {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
- Library
- Properties
- python33app
- python33app
- WindowsPhone
- v8.0
- $(TargetFrameworkVersion)
- true
-
-
- true
- true
- python33app_$(Configuration)_$(Platform).xap
- Properties\AppManifest.xml
- python33app.App
- true
- 11.0
- true
-
-
- true
- full
- false
- Bin\Debug
- DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
- pdbonly
- true
- Bin\Release
- TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
- true
- full
- false
- Bin\x86\Debug
- DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
- pdbonly
- true
- Bin\x86\Release
- TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
- true
- full
- false
- Bin\ARM\Debug
- DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
- pdbonly
- true
- Bin\ARM\Release
- TRACE;SILVERLIGHT;WINDOWS_PHONE
- true
- true
- prompt
- 4
-
-
-
- App.xaml
-
-
- FileChooser.xaml
-
-
-
- MainPage.xaml
-
-
-
- True
- True
- AppResources.resx
-
-
-
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
-
-
-
-
-
- Designer
-
-
-
-
-
-
-
-
-
- PublicResXFileCodeGenerator
- AppResources.Designer.cs
-
-
-
-
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}
- python33
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp8app/screenshot_720p.png b/wp8app/screenshot_720p.png
deleted file mode 100644
index 7c31f4b..0000000
Binary files a/wp8app/screenshot_720p.png and /dev/null differ
diff --git a/wp8app/screenshot_wvga.png b/wp8app/screenshot_wvga.png
deleted file mode 100644
index 4913f49..0000000
Binary files a/wp8app/screenshot_wvga.png and /dev/null differ
diff --git a/wp8app/screenshot_wxga.png b/wp8app/screenshot_wxga.png
deleted file mode 100644
index 9363f45..0000000
Binary files a/wp8app/screenshot_wxga.png and /dev/null differ
diff --git a/wp8app/wp8app.sln b/wp8app/wp8app.sln
deleted file mode 100644
index 5194e22..0000000
--- a/wp8app/wp8app.sln
+++ /dev/null
@@ -1,74 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "python33app", "python33app\python33app.csproj", "{711A9E5D-4758-4158-A034-FD000D88EB49}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python33", "python33\python33.vcxproj", "{EF50A20B-590D-45B5-9A56-F804D43AD6B8}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|ARM = Debug|ARM
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|Win32 = Debug|Win32
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|ARM = Release|ARM
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|Win32 = Release|Win32
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|ARM.ActiveCfg = Debug|ARM
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|ARM.Build.0 = Debug|ARM
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|ARM.Deploy.0 = Debug|ARM
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Win32.ActiveCfg = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Win32.Build.0 = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|Win32.Deploy.0 = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|x86.ActiveCfg = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|x86.Build.0 = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Debug|x86.Deploy.0 = Debug|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Any CPU.Build.0 = Release|Any CPU
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|ARM.ActiveCfg = Release|ARM
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|ARM.Build.0 = Release|ARM
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|ARM.Deploy.0 = Release|ARM
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Mixed Platforms.Build.0 = Release|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Mixed Platforms.Deploy.0 = Release|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Win32.ActiveCfg = Release|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Win32.Build.0 = Release|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|Win32.Deploy.0 = Release|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|x86.ActiveCfg = Release|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|x86.Build.0 = Release|x86
- {711A9E5D-4758-4158-A034-FD000D88EB49}.Release|x86.Deploy.0 = Release|x86
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|Any CPU.ActiveCfg = Debug|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|ARM.ActiveCfg = Debug|ARM
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|ARM.Build.0 = Debug|ARM
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|Mixed Platforms.Build.0 = Debug|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|Win32.ActiveCfg = Debug|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|Win32.Build.0 = Debug|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|x86.ActiveCfg = Debug|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Debug|x86.Build.0 = Debug|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|Any CPU.ActiveCfg = Release|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|ARM.ActiveCfg = Release|ARM
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|ARM.Build.0 = Release|ARM
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|Mixed Platforms.ActiveCfg = Release|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|Mixed Platforms.Build.0 = Release|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|Win32.ActiveCfg = Release|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|Win32.Build.0 = Release|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|x86.ActiveCfg = Release|Win32
- {EF50A20B-590D-45B5-9A56-F804D43AD6B8}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal