Home Forums UiPath How to run a python script from UiPath?

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1684
    AutomationGeekAutomationGeek
    Participant

    Hey ! I am new to RPA (UiPath). I want to run a python script which is renaming some files present in my computer memory and i want to run that script form uipath. Is it possible ? if yes then please help me with this.

    Thanks in Advance . 🙂

    #1691
    Girish AmetaAdmin
    Keymaster

    Hi @AutomationGeek

    Let me explain the process in below mentioned steps:

    Step 1: Install  a package UiPath.Python.Activities from Manage Package Section in UiPath Studio.

    Note* : UiPath supports python version 3.6 or above.

    This package contains total 5 Activities.

    1.      Python Scope:- A container which provides a scope for Python activities and initializes the specified Python environment. This will take python of Python.exe file and version of python as input attribute.

    2.      Invoke python Method:- by using this activity you can invoke a particular method present in a python script but first you have to load that python script using Load python Script Activity. These all activity should used under the python scope activity.

    3.      Run Python Activity :- this activity can run a whole python script and will take path to the file you want to run or also you can direct pass the code as string input.

    Step 2:  Add Python Scope activity and pass the path to python.exe file present in your system.

    Step 3: Add run python script activity pass path to file as input.

    Sample Python File Code:

    This is the file flow to run this file.

    Hope It Works !!

     

     

    • This reply was modified 1 year, 5 months ago by Girish AmetaAdmin.
    • This reply was modified 1 year, 5 months ago by Girish AmetaAdmin.
    #1694
    JohnRPAJohnRPA
    Participant

    Hi @admin

    Installing packages for every new things may get UiPath to make slow in loading activity? Is it a good way to have additional packages for every activity?

    Cant we have custom activity in UiPath.??

    Thanks

    #1710
    mohitchugmohitchug
    Participant

    Hey @vikasdesai048

    I would like to express my thoughts on this topic. The option of making the package and use when needed is a good option it is same as like in a C program you don’t include all the header files and only include which is needed so in the same way we are making our workflow fast.

    And Yes your last question that can we create custom activity in UiPath? so answer is Yes! we can develop custom activities in UiPath and UiPath also have a platform named as UiPath Go! where we can make it available to public use.

    It may be possible I am not absolutely right its just my thought on it.

    Have a Good Day!!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.