This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Find source library files for module dependencies of some set of source files. | |
Author: Dominique de Waleffe <ddewaleffe@gmail.com> | |
Copyright 2012 Dominique de Waleffe | |
For inclusion in IronPython | |
Licensed under the term of Apache license V2.0 as found in http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
#TODO: As this explores all the source files, it does redundant work that the compiler should be able to do. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Android.App; | |
using Android.Content; | |
using Android.Runtime; | |
using Android.Views; | |
using Android.Widget; | |
using Android.OS; | |
using IronPython; | |
using IronPython.Hosting; | |
using IronPython.Modules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# CompileToStandalone, a Python to .NET ILR compiler which produces standalone binaries | |
# (C) 2012 Niall Douglas http://www.nedproductions.biz/ | |
# Created: March 2012 | |
import modulefinder, sys, os, subprocess, _winreg | |
if len(sys.argv)<2: | |
print("Usage: CompileEverythingToILR.py <source py> [-outdir=<dest dir>]") | |
sys.exit(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
G:\BEurtle\BEXML>ipy | |
IronPython 2.7.2rc1 (2.7.0.40) on .NET 4.0.30319.261 (32-bit) | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import uuid | |
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. | |
at IronPython.Modules.NativeFunctions.LoadLibrary(String lpFileName) | |
at IronPython.Modules.NativeFunctions.LoadDLL(String filename, Int32 flags) | |
at IronPython.Modules.CTypes.LoadLibrary(String library, Int32 mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
print 'NameError:' | |
try: | |
try: | |
nonex | |
except NameError: | |
print sys.exc_traceback | |
raise | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python imports | |
import traceback | |
import time | |
import threading | |
# .NET imports | |
from System.Threading.Tasks import Task | |
# Task method that simply accesses the current thread's name | |
def task_action(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Base { | |
public virtual int Accessor { | |
get; set; | |
} | |
} | |
public class GetOverride: Base { | |
public override int Accessor { | |
get { | |
return base.Accessor - 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""\ | |
Multiline string formatted to left-align | |
text. | |
""" | |
raise Exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root> : 171 MB (100,00%) | |
Handle <root>->Handle->(System.Object []): 152 MB (89,00%) | |
Handle, Pinning <root>->Handle, Pinning->(System.Object []): 8,8 MB (5,15%) | |
Stack <root>->Stack->(IronPython.Runtime.ModuleContext): 4,4 MB (2,55%) | |
Stack <root>->Stack->(Microsoft.Scripting.Debugging.DebuggableLambdaBuilder): 3,0 MB (1,77%) | |
System.Object [] Handle->System.Object []->(IronPython.Runtime.Exceptions.TracebackDelegate,System.Collections.Generic.Stack<T>): 148 MB (86,51%) (1 object, 52 bytes (0,00%)) | |
System.Object [] Handle, Pinning->System.Object []->(Microsoft.Scripting.NullErrorSink,Microsoft.Scripting.PlatformAdaptationLayer,System.Security.PermissionSet,...): 8,5 MB (4,95%) (1 object, 16 kB (0,01%)) | |
IronPython.Runtime.ModuleContext Stack->IronPython.Runtime.ModuleContext->(IronPython.Runtime.CodeContext,IronPython.Runtime.ExtensionMethodSet,IronPython.Runtime.PythonContext): 4,4 MB (2,55%) (1 object, 32 bytes (0,00%)) | |
System.Object [] Handle->System.Obje |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def tf(frame, event, arg): | |
if event == 'exception': | |
print arg[2].tb_lineno | |
return tf | |
sys.settrace(tf) | |
def f(): |