Splunk Dev

Is Python 3.x in Splunk's Future?

kqc767
Path Finder

Are there any plans to migrate Splunk to Python 3.x? Should I learn Python 2.x or 3.x?

After 20 years in IT, I've finally decided to take the plunge and learn to program

I've chosen Python, for both academic reasons (mature, easy to learn, lots of resources) and practical (system administration tasks, extending VMware and Splunk functionality).

Any thoughts (pros and cons) on starting out with Python 2.x vs. 3.x?

Thanks!

JP

1 Solution

hexx
Splunk Employee
Splunk Employee

I don't believe that we will be upgrading the version of Python bundled with Splunk for the next major release at the very least.

That being said, if you're interested in learning to code in Python I don't think that the version on which to start is a big deal. If you want to plan to write code to be run by Splunk's Python, you might be better off sticking with 2.7 for the time being. If/when we upgrade to 3.0, the 2.7 code should still work and the new available methods will be gravy on top.

View solution in original post

amrit
Splunk Employee
Splunk Employee

hexx
Splunk Employee
Splunk Employee

I don't believe that we will be upgrading the version of Python bundled with Splunk for the next major release at the very least.

That being said, if you're interested in learning to code in Python I don't think that the version on which to start is a big deal. If you want to plan to write code to be run by Splunk's Python, you might be better off sticking with 2.7 for the time being. If/when we upgrade to 3.0, the 2.7 code should still work and the new available methods will be gravy on top.

dflodstrom
Builder

This answer was accepted. But in 2017 I think its fair to say that this answer is unacceptable.

0 Karma

araitz
Splunk Employee
Splunk Employee

To pile on, Python 3.0 is a huge leap in terms of breaking compatibility with Python 2.x and in terms of issues around stability and thread safety. As hexx mentioned, there is plenty to learn in 2.7 that will be applicable for the forseable future.

kqc767
Path Finder

Thanks, hexx!

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...