Pythonnet – A Simple Union of .NET Core and Python You’ll Love

Python is a powerful and versatile programming language that has become increasingly popular. For many, it's one of the very first programming languages they pick up when getting started. Some of the highest traffic posts on my blog many years after they were written look at using C# and Python together. Today we're going to explore how you can use Python from inside a C# .NET Core application with much more modern approaches than my original articles. Enter Pythonnet! Pythonnet Package & Getting Started We're going to be looking at Python for .NET in order to accomplish this goal. This library allows you to take advantage of Python installed on the running machine from within your .NET Core applications. You must configure it to point at the corresponding Python DLL that you'd like to use, and after a couple of…

1 Comment

IronPython: A Quick WinForms Introduction

A few months ago I wrote up an article on using PyTools, Visual Studio, and Python all together. I received some much appreciated positive feedback for it, but really for me it was about exploring. I had dabbled with Python a few years back and hadn't really touched it much since. I spend the bulk of my programming time in Visual Studio, so it was a great opportunity to try and bridge that gap when looking at something like IronPython. I had an individual contact me via the Dev Leader Facebook group that had come across my original article. However, he wanted a little bit more out of it. Since I had my initial exploring out of the way, I figured it was probably worth trying to come up with a semi-useful example. I could get two birds with one…

0 Comments

Dynamic Programming with Python and C#

Previously, I was expressing how excited I was when I discovered Python, C#, and Visual Studio integration. I wanted to save a couple examples regarding dynamic code for a follow up article... and here it is! (And yes... there is code you can copy and paste or download). EDIT: Wait! Before you head to far, you might want to check out this more recent article on Python and C#! What does it mean to be dynamic? As with most things, wikipedia provides a great start. Essentially, much of the work done for type checking and signatures is performed at runtime for a dynamic language. This could mean that you can write code that calls a non-existent method and you wont get any compilation errors. However, once execution hits that line of code, you might get an exception thrown. This Stack…

6 Comments

Movember Prep – Weekly Article Dump

Movember Preparation You might think we're a bit early on this one, but at Magnet Forensics we're going to take Movember to a whole new level this year. If you're not familiar with Movember, you may want to head over here and get a rundown of the history of it. Movember started in Australia between a group of people who wanted to (somewhat jokingly) bring the moustache back into style. The next year they started getting people to grow mo's for causes. Now people participate in Movember to raise awareness for men's health, and it's bigger than ever. Our team members of MoMagnets have started discussing the various styles of mo's that they'll grow this year. It looks like there's going to be some intra-team competition to grow the best mo. The top contenders? It's looking like: Matthew Chang Cameron…

1 Comment

Python, Visual Studio, and C#… So. Sweet.

Python & C# - Background Let's clear the air. Using Python and C# together isn't anything new. If you've used one of these languages and at least heard of the other, then you've probably heard of IronPython. IronPython lets you use both C# and Python together. Pretty legit. If you haven't tried it out yet, hopefully your brain is starting to whir and fizzle thinking about the possibilities. My development experiences is primarily in C# and before that it was VB .NET (So I'm pretty attached to the whole .NET framework... We're basically best friends at this point). However, pretty early in my career (my first co-op at Engenuity Corporation, really) I was introduced to Python. I had never really used a dynamic or implicitly typed language, so it was quite an adventure and learning experience. Unfortunately, aside from my…

15 Comments

End of content

No more pages to load