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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...