From 44a69f6eaaaed103f0bd403907dc6f4d57c29ec7 Mon Sep 17 00:00:00 2001 From: denfromufa Date: Thu, 16 Feb 2017 01:12:16 -0600 Subject: [PATCH 1/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 86825386c..4e6180d07 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ [![license shield][]](./LICENSE) [![pypi package version][]](https://pypi.python.org/pypi/pythonnet) [![python supported shield][]](https://pypi.python.org/pypi/pythonnet) +[![StackExchange](https://img.shields.io/stackexchange/stackoverflow/t/python.net.svg)](http://stackoverflow.com/questions/tagged/python.net) +[![Slack](https://img.shields.io/badge/chat-slack-color.svg?style=social?link=http://left&link=http://right)](https://pythonnet.slack.com) Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and From 6076cdd49cfc1a3e8adab1c9a676e38a3d1ac845 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Thu, 16 Feb 2017 02:07:42 -0700 Subject: [PATCH 2/3] Fix StackExchange and Slack shields --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4e6180d07..a9081ef1d 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ [![license shield][]](./LICENSE) [![pypi package version][]](https://pypi.python.org/pypi/pythonnet) [![python supported shield][]](https://pypi.python.org/pypi/pythonnet) -[![StackExchange](https://img.shields.io/stackexchange/stackoverflow/t/python.net.svg)](http://stackoverflow.com/questions/tagged/python.net) -[![Slack](https://img.shields.io/badge/chat-slack-color.svg?style=social?link=http://left&link=http://right)](https://pythonnet.slack.com) +[![stackexchange shield][]](http://stackoverflow.com/questions/tagged/python.net) +[![slack][]](https://pythonnet.slack.com) Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and @@ -91,4 +91,8 @@ int32 [python supported shield]: https://img.shields.io/pypi/pyversions/pythonnet.svg +[slack]: https://img.shields.io/badge/chat-slack-color.svg?style=social + +[stackexchange shield]: https://img.shields.io/badge/StackOverflow-python.net-blue.svg + [travis shield]: https://img.shields.io/travis/pythonnet/pythonnet/master.svg?label=Travis From c0bfaa6cfb5e8c477cdf8773b4fbfc48b0a63265 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Thu, 16 Feb 2017 02:12:12 -0700 Subject: [PATCH 3/3] Clean README.md Shields got too long for a single line, had to break them up into two lines. One for build/quality status, the other for social/info. Add regression number to disabled code. --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a9081ef1d..c66e8eef8 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![appveyor shield][]](https://ci.appveyor.com/project/pythonnet/pythonnet/branch/master) [![travis shield][]](https://travis-ci.org/pythonnet/pythonnet) [![codecov shield][]](https://codecov.io/github/pythonnet/pythonnet) + [![license shield][]](./LICENSE) [![pypi package version][]](https://pypi.python.org/pypi/pythonnet) [![python supported shield][]](https://pypi.python.org/pypi/pythonnet) @@ -37,14 +38,14 @@ from System.Windows.Forms import Form ## Embedding Python in .NET - All calls to python should be inside - a `using (Py.GIL()) {/_ Your code here _/}` block. + a `using (Py.GIL()) {/* Your code here */}` block. - Import python modules using `dynamic mod = Py.Import("mod")`, then you can call functions as normal, eg `mod.func(args)`. - Use `mod.func(args, Py.kw("keywordargname", keywordargvalue))` to apply keyword arguments. - All python objects should be declared as `dynamic` type. - Mathematical operations involving python and literal/managed types must - have the python object first, eg `np.pi_2` works, `2_np.pi` doesn't. + have the python object first, eg. `np.pi_2` works, `2_np.pi` doesn't. ### Example @@ -59,7 +60,7 @@ static void Main(string[] args) Console.WriteLine(sin(5)); double c = np.cos(5) + sin(5); Console.WriteLine(c); - /* this block is temporarily disabled due to regression + /* this block is temporarily disabled due to regression #249 dynamic a = np.array(new List { 1, 2, 3 }); dynamic b = np.array(new List { 6, 5, 4 }, Py.kw("dtype", np.int32)); Console.WriteLine(a.dtype); @@ -83,7 +84,7 @@ int32 [appveyor shield]: https://img.shields.io/appveyor/ci/pythonnet/pythonnet/master.svg?label=AppVeyor -[codecov shield]: https://img.shields.io/codecov/c/github/pythonnet/pythonnet/master.svg?label=codecov +[codecov shield]: https://img.shields.io/codecov/c/github/pythonnet/pythonnet/master.svg?label=Codecov [license shield]: https://img.shields.io/badge/license-MIT-blue.svg?maxAge=3600