| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,12 @@ | |||
| 1 | + *.suo | ||
| 2 | + *.pdb | ||
| 3 | + [Oo]bj/ | ||
| 4 | + [Bb]in/ | ||
| 5 | + *.dll | ||
| 6 | + *.pyd | ||
| 7 | + *.exe | ||
| 8 | + *.pyc | ||
| 9 | + packages/* | ||
| 10 | + dist | ||
| 11 | + pythonnet.egg-info | ||
| 12 | + *.userprefs | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + language: python | ||
| 2 | + python: | ||
| 3 | + - 2.6 | ||
| 4 | + - 2.7 | ||
| 5 | + before_install: | ||
| 6 | + - sudo apt-get install software-properties-common | ||
| 7 | + - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" | ||
| 8 | + - sudo apt-get -qq update | ||
| 9 | + - sudo apt-get -qq install mono-devel mono-gmcs mono-xbuild nunit-console | ||
| 10 | + - sudo mozroots --import --machine --sync | ||
| 11 | + - yes | sudo certmgr -ssl -m https://go.microsoft.com | ||
| 12 | + - yes | sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net | ||
| 13 | + - yes | sudo certmgr -ssl -m https://nuget.org | ||
| 14 | + install: | ||
| 15 | + - python setup.py build_ext --inplace | ||
| 16 | + script: | ||
| 17 | + - export PYTHONPATH=`pwd` | ||
| 18 | + - ./npython src/tests/runtests.py | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,23 @@ | |||
| 1 | + <!-- Mono DLL map for Python.Runtime.dll | ||
| 2 | + | ||
| 3 | + Keep this file next to Python.Runtime.dll | ||
| 4 | + | ||
| 5 | + For more information read: | ||
| 6 | + http://www.mono-project.com/Config | ||
| 7 | + http://www.mono-project.com/Config_DllMap | ||
| 8 | + | ||
| 9 | + --> | ||
| 10 | + | ||
| 11 | + <configuration> | ||
| 12 | + <dllmap dll="python23" target="libpython2.3.so" os="!windows" /> | ||
| 13 | + <dllmap dll="python24" target="libpython2.4.so" os="!windows" /> | ||
| 14 | + <dllmap dll="python25" target="libpython2.5.so" os="!windows" /> | ||
| 15 | + <dllmap dll="python26" target="libpython2.6.so" os="!windows" /> | ||
| 16 | + <dllmap dll="python27" target="libpython2.7.so" os="!windows" /> | ||
| 17 | + <dllmap dll="python23.dll" target="libpython2.3.so" os="!windows" /> | ||
| 18 | + <dllmap dll="python24.dll" target="libpython2.4.so" os="!windows" /> | ||
| 19 | + <dllmap dll="python25.dll" target="libpython2.5.so" os="!windows" /> | ||
| 20 | + <dllmap dll="python26.dll" target="libpython2.6.so" os="!windows" /> | ||
| 21 | + <dllmap dll="python27.dll" target="libpython2.7.so" os="!windows" /> | ||
| 22 | + </configuration> | ||
| 23 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,8 @@ | |||
| 1 | + pythonnet | ||
| 2 | + ========= | ||
| 3 | + | ||
| 4 | + Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers. | ||
| 5 | + | ||
| 6 | + [](https://travis-ci.org/pythonnet/pythonnet) | ||
| 7 | + | ||
| 8 | + [](https://ci.appveyor.com/project/davidanthoff/pythonnet) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,43 @@ | |||
| 1 | + Visual Studio 2005 | ||
| 2 | + ================== | ||
| 3 | + | ||
| 4 | + pythonnet contains a new solution file for Visual Studio 2005: pythonnet.sln | ||
| 5 | + It should make development under Windows much easier since you don't have to | ||
| 6 | + install MSys or Cygwin to run the makefile. | ||
| 7 | + | ||
| 8 | + The solution file should work with the free VS .NET Express Edition. | ||
| 9 | + | ||
| 10 | + Available configurations | ||
| 11 | + ------------------------ | ||
| 12 | + | ||
| 13 | + Every configuration copies the dll, pdf and exe files to the root directory | ||
| 14 | + of the project. | ||
| 15 | + | ||
| 16 | + * Release | ||
| 17 | + Builds Python.Runtime, Python.Tests, clr.pyd and python.exe. The console | ||
| 18 | + project starts a Python console | ||
| 19 | + | ||
| 20 | + * Debug | ||
| 21 | + Same as Release but creates a build with debug symbols | ||
| 22 | + | ||
| 23 | + * UnitTest | ||
| 24 | + Builds a Debug build. The console project invokes runtests.py instead of | ||
| 25 | + opening a Python shell. | ||
| 26 | + | ||
| 27 | + * EmbeddingTest | ||
| 28 | + Builds Python.EmbeddingTests and its dependencies. The configuration | ||
| 29 | + requires the NUunit framework. | ||
| 30 | + | ||
| 31 | + Python version | ||
| 32 | + -------------- | ||
| 33 | + | ||
| 34 | + You can switch the destination version by defining either PYTHON24 or PYTHON25 | ||
| 35 | + inside the Python.Runtime project. | ||
| 36 | + | ||
| 37 | + ** Don't forget to force a rebuild after you have altered the setting! ** | ||
| 38 | + | ||
| 39 | + MS VS doesn't take changes to define into account. | ||
| 40 | + | ||
| 41 | + Thanks to Virgil Duprasfor his original VS howto! | ||
| 42 | + | ||
| 43 | + Christian 'Tiran' Heimes | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,31 @@ | |||
| 1 | + os: Windows Server 2012 | ||
| 2 | + | ||
| 3 | + environment: | ||
| 4 | + global: | ||
| 5 | + PYTHONPATH: c:\testdir | ||
| 6 | + | ||
| 7 | + matrix: | ||
| 8 | + - pythonurl: http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi | ||
| 9 | + - pythonurl: http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi | ||
| 10 | + - pythonurl: http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi | ||
| 11 | + - pythonurl: http://www.python.org/ftp/python/2.6.6/python-2.6.6.amd64.msi | ||
| 12 | + | ||
| 13 | + install: | ||
| 14 | + - ps: (new-object net.webclient).DownloadFile($env:pythonurl, 'C:\python.msi') | ||
| 15 | + - ps: start-process -wait -FilePath msiexec.exe -ArgumentList "/qn /i C:\python.msi TARGETDIR=C:\Python" | ||
| 16 | + - ps: (new-object net.webclient).DownloadFile('https://raw.github.com/pypa/pip/master/contrib/get-pip.py', 'C:\get-pip.py') | ||
| 17 | + # appveyor has python 2.7.6 x86 preinstalled, but in the wrong directory, this works around this | ||
| 18 | + - ps: if ($env:pythonurl -eq "http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi") {mi c:\python27 c:\python} | ||
| 19 | + - set PATH=C:\Python;%PATH% | ||
| 20 | + - C:\Python\python.exe c:\get-pip.py | ||
| 21 | + - C:\Python\Scripts\pip.exe install wheel | ||
| 22 | + | ||
| 23 | + build_script: | ||
| 24 | + - C:\python\python.exe setup.py bdist_wheel | ||
| 25 | + | ||
| 26 | + test_script: | ||
| 27 | + - ps: C:\python\scripts\pip.exe install ("dist\" + (gci dist)[0].Name) | ||
| 28 | + - mkdir c:\testdir | ||
| 29 | + - ps: copy-item (gci -path build -re -include Python.Test.dll)[0].FullName c:\testdir | ||
| 30 | + - c:\python\python.exe src\tests\runtests.py | ||
| 31 | + - c:\python\scripts\npython.exe src\tests\runtests.py | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,6 +7,9 @@ | |||
| 7 | 7 | # FOR A PARTICULAR PURPOSE. | |
| 8 | 8 | # =========================================================================== | |
| 9 | 9 | ||
| 10 | + import clr | ||
| 11 | + SWF = clr.AddReference("System.Windows.Forms") | ||
| 12 | + print SWF.Location | ||
| 10 | 13 | import System.Windows.Forms as WinForms | |
| 11 | 14 | from System.Drawing import Size, Point | |
| 12 | 15 | ||
@@ -24,8 +27,8 @@ def __init__(self): | |||
| 24 | 27 | ||
| 25 | 28 | # Create the button | |
| 26 | 29 | self.button = WinForms.Button() | |
| 27 | - self.button.Location = Point(256, 64) | ||
| 28 | - self.button.Size = Size(120, 40) | ||
| 30 | + self.button.Location = Point(160, 64) | ||
| 31 | + self.button.Size = Size(820, 20) | ||
| 29 | 32 | self.button.TabIndex = 2 | |
| 30 | 33 | self.button.Text = "Click Me!" | |
| 31 | 34 | ||
@@ -36,8 +39,8 @@ def __init__(self): | |||
| 36 | 39 | self.textbox = WinForms.TextBox() | |
| 37 | 40 | self.textbox.Text = "Hello World" | |
| 38 | 41 | self.textbox.TabIndex = 1 | |
| 39 | - self.textbox.Size = Size(360, 20) | ||
| 40 | - self.textbox.Location = Point(16, 24) | ||
| 42 | + self.textbox.Size = Size(1260, 40) | ||
| 43 | + self.textbox.Location = Point(160, 24) | ||
| 41 | 44 | ||
| 42 | 45 | # Add the controls to the form | |
| 43 | 46 | self.AcceptButton = self.button | |
@@ -46,14 +49,19 @@ def __init__(self): | |||
| 46 | 49 | ||
| 47 | 50 | def button_Click(self, sender, args): | |
| 48 | 51 | """Button click event handler""" | |
| 52 | + print "Click" | ||
| 49 | 53 | WinForms.MessageBox.Show("Please do not press this button again.") | |
| 50 | 54 | ||
| 51 | 55 | def run(self): | |
| 52 | 56 | WinForms.Application.Run(self) | |
| 53 | 57 | ||
| 54 | 58 | ||
| 55 | 59 | def main(): | |
| 56 | - HelloApp().run() | ||
| 60 | + form = HelloApp() | ||
| 61 | + print "form created" | ||
| 62 | + app = WinForms.Application | ||
| 63 | + print "app referenced" | ||
| 64 | + app.Run(form) | ||
| 57 | 65 | ||
| 58 | 66 | ||
| 59 | 67 | if __name__ == '__main__': | |
| Back | FazBrowse Home | New Git URL |
0 commit comments