Click here to Skip to main content
15,914,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, i am kind of a junior developer so please forgive my ignorance.

I am using Ubuntu LTS 20.04 at the moment. I have a python script with 4 functions in it. Each function has more than 3 variables. At least on of those variables in each function is a result of one of the other functions.

I want to be able to execute that script from the terminal using Bash and get output with:
1st function name
var name : dataType + value
var name : dataType + value
2nd function name
var name : dataType + value
var name : dataType + value
e.t.c

Is this possible?

What I have tried:

I have used: strace so far and some other commands but with no success.
I have searched the web but with the little knowledge i have on this subject, i find it difficult to connect the dots.
Any help appreciated. Thank you in advance.
Posted
Comments
Richard MacCutchan 22-Dec-20 6:56am    
I am not sure which script you want to run, the Python or some bash script. If it is the Python script then please use the Improve question link above, and show the code, and explain what is the problem. If you are trying to extract information from the Python source using a bash script I do not think that is a simple matter.
Juljan Haka 22-Dec-20 11:25am    
Hey Richard, I am trying to extract information from the Python source using a bash script. My end goal is to be able to execute [ JS, Python, PHP, Java and all frameworks for each language] scripts using Bash and extract that kind of information from them only for the functions ( and + or ) lines of code that were executed. That way i can see the flow of data and debug if necessary. I know that there are debuggers to use for that kind of stuff doing a great job already. I think the visual aspect of the way i am describing is gonna help me understand various concepts and be more efficient during the learning process. Also i have already build an extension in which i process any error message and create the most "correct" sequence of words and symbols of Google Search Engine to get the most relevant results. After i manage to get what i am asking here done, i am gonna try to gather information regarding an error or a desired result from the OS, IDE etc in order for me to be able to find the info i need in the most efficient way. This way then i think it can easily be imported into a little bot.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900