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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...