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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...