I wrote a script containing several functions, which I loaded in IDA pro. From IDAPython now I'd want to call a specific function. Is it possible? Which idaapi functions should I use to call my functions in the script?

EDIT: I am running IDA on a linux system and the script has been written in python.

  • how did you load these functions to IDA pro ? Is the script is wrote in IDAPython too ?
    – w s
    May 5, 2015 at 8:14
  • Just updated the post. I uploaded the script using the IDA functionality
    – badnack
    May 5, 2015 at 8:20
  • Would you please explain which IDA functionality did you use ? And how are you going to run your script ?
    – w s
    May 5, 2015 at 8:27
  • What do you mean? I just load the script using File->Load file->Script file. Or by using (from shell) ida -Smyscript mybin
    – badnack
    May 5, 2015 at 8:30

1 Answer 1


You have 3 alternatives:

  1. You can just run the function by its name. If you already ran your script, defined functions should remain in the Python interpreter context.

  2. You can add the path of your script to sys.path and import the script again. It should looks as follows:

    import sys
    sys.path.append("path to your folder with the script")
    import your_script_name
  3. You can add this (addition to sys.path and import) into file idapythonrc.py in the root of IDA installation and this script will be imported each time you running IDA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.