I have a working Python console script and have created a plugin (processing provider through the plugin builder). Now I want to put the python console script into the plugin. Can I simply copy and paste the script? Which file do I need to edit and where?

1 Answer 1


Here is a link that will teach you all you will need to know to create your first QGIS plugin.

You can copy/paste what you wrote in the QGIS python console to the python file called "name_of_your_plugin".py in your plugin folder but you will need to link your functions to a pushbutton (use Qtdesigner for this) for instance to make it work.

  • I have already created the QGIS plugin. I need help on how to add my script (previously made in the QGIS python console) to the plugin.
    – GISJess
    Aug 22, 2022 at 14:52
  • Link-only answers are usually deleted by the review process. Please Edit the Answer to contain at least a summary.
    – Vince
    Aug 22, 2022 at 17:22
  • @Vince, while this is generally true for links pointing to information, I think that in the case of a step-by-step tutorial, the beneficial content is indeed the link and summarizing it in the answer text is unlikely to be helpful unless it would essentially be duplicated.
    – Houska
    Aug 23, 2022 at 10:00
  • And when that link goes stale, since they all do, eventually, then the link-only Answer is devoid of useful information. You don't need to duplicate the information to provide enough detail that the link contents can be found again. It could be enough to include the name of the page in the documentation to be the link text instead of just "link".
    – Vince
    Aug 23, 2022 at 11:14

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.