Audimation Services has been acquired by Caseware International Learn More.


Blog Image

Exploring IDEA’s Built-In Power of Python

IDEA Tech Tip

In December of 1989, Dutch programmer Guido van Rossum was looking for a hobby programming project to keep him occupied during a slow work week around Christmas. He used his home computer to write an interpreter for a new scripting language, which would become known as Python. Van Rossum’s goal was to create an intuitive, powerful language with code that could be easily understood and used by everyone and suitable for everyday tasks, allowing for short development times.

Python is a high-level programming language for general-purpose programming on both small and large scales. It supports multiple programming paradigms, including object-oriented, imperative, functional and procedural, and has a comprehensive standard library. With the release of version 10.3, IDEA created a buzz with its implementation of the Python scripting language, thereby taking a huge step towards having a more robust coding environment. IDEA users throughout the world are exploring new ways to use the Python data analytics packages to enable outlier analysis, analyze both numeric and character fields and combine IDEAScripts with Python for more powerful analysis capabilities.

Benefits of Python

Python is an advanced language that has a powerful presence in the numerical analysis and machine learning fields. It is considered one of the most versatile programming languages ever developed.

  • Adaptive – Facilitates the creation of algorithms that adapt to data over time to continually improve its predictions
  • Versatile – Serves as a general-purpose language, which can process virtually any task
  • Dynamic – The code requires no heavy compilation before execution (interpreted), and there is no strict type system (dynamic)
  • Fast – Since the coder is not hindered by strict compiler rules, solutions can be coded quickly and execution is immediate, which naturally speeds up testing
  • Accessible – IDEA users have access to the native numerical analysis libraries, and potentially all Python libraries


How Accessible is Python’s Power within IDEA?

Even those who have dabbled in Python programming before having some things to get used to; there’s a small learning curve. IDEA can call an existing Python script to execute, but this is the extent of its current capabilities. There is not a code editor built into IDEA for editing Python code, which requires editing scripts outside of IDEA using one of three scenarios:

Scenario A for Proficient Python Users:

If you’re comfortable writing and testing Python scripts, this will be a snap! You’ll need to know about a few quirks within IDEA that can impede certain actions. IDEA can only call Python scripts to execute and does not recognize them as being an internal component. (more on this in our next blog post)

Scenario B for Proficient Programmers:

If you’re not familiar with Python, but you are familiar with programming concepts in general, then you’ll need to learn the Python syntax along with the IDEA quirks that user A must also learn. As predicted given the lack of a native editor, IDEA will not be able to help with the Syntax. For example, those familiar with using IDEAScript will recall IDEA’s editor color-codes native functions, most keywords, and certain data. This helps when learning a language because it asserts to the coder that the compiler recognized the keyword. If there is no color-coding, then the compiler does not know what the coder is trying to say, and it hints that some research may be needed. IDEAScript users will also recall that formatting assistance is provided as code is typed and that it’s possible to step through code line by line (using breakpoints) for debugging purposes.

Since IDEA has no native Python editor, all of this goes out the window. However, being already familiar with programming in general, hopefully user B knows 3rd party editors you can use. Excellent options include Sublime Text, Atom, VS Code, and Python’s very own IDLE Environment. Simply install your favorite and check out Python’s Official Documentation for how to run Python scripts on your system for testing purposes.

Using IDEAScript to Call Phyhon Scripts

Text View of Python Coding Shell 3.7.0

Scenario C for Those New to Programming

If you lack scripting experience, it may be easier to start with Visual Basic, which is the basis of IDEAScript and native to IDEA. Let’s start with what you’re working to accomplish. Is there a pressing need for deep data manipulation, or something more basic, such as task automation?

Visual Basic for Applications (VBA) is the building block for IDEAScripts and transfers well to other dialects of VBA, such as those built into Excel and Access. It also has more built-in documentation.

There are three ways to create IDEAScripts, outlined in our blog post: Ready, Set, Script!

If deep data manipulation is needed, or you need guidance in using Python, stay tuned for our next blog post on this topic.

…and if you’re curious about how Python got its name, Guido van Rossum was a fan of Monty Python’s Flying Circus.

Automate Procedures , CaseWare IDEA , Tech Tip

Posted By

By Audimation Team

Related Posts
Expensive Expenses: Identifying Fraud in T&E
Nov 13 Expense Reports and Travel and Entertainment expenses are both common areas for fraud and challenging to find. These frauds are complex and contain a mix of pre...
Tech Tip: Fuzzy Join
Sep 24 CaseWare IDEA 11.1 provides a robust plugin to perform a fuzzy join between IDEA databases, searching for any overlap or possible duplicates between the two dat...
Unconventional Analysis
Jan 24 Data is often underutilized. The opportunity to use data analytics to gain insights, add more value and unravel opportunities are endless. We’ve rounded up a ...

This website has been designed for modern browsers. Please update. Update my browser now