Oct-04-2021, 07:55 AM
Hi all,
I'm new to the world of Python, linux and programming in general so my question may be very basic but I can't find an answer anywhere.
I'm running a python file (to do a regression so I'm expecting tables as result) on a virtual cluster using a shell file. The job launches and runs fine but I can't visualize the result (print them on prompt) nor create a file with the output.
What could I do to see the results of my python file? Is there a command to put in the bash or in my Python code?
I've already tried a couple of solutions that did not work like putting the following command in the bash python
I also tried adding the following lines in my Python code to get the results in tex and pickle files but it didn't work either:
PS: To have a better idea of the Python code that I want to run on the cluster I attached the script mycode.py (small clarification: since it is the first code I run so as a test I only ask for 5 Monte Carlo draws but the objective is to ask for 100000 draws or more)
I'm new to the world of Python, linux and programming in general so my question may be very basic but I can't find an answer anywhere.
I'm running a python file (to do a regression so I'm expecting tables as result) on a virtual cluster using a shell file. The job launches and runs fine but I can't visualize the result (print them on prompt) nor create a file with the output.
What could I do to see the results of my python file? Is there a command to put in the bash or in my Python code?
I've already tried a couple of solutions that did not work like putting the following command in the bash python
mycode.py > SomeFile.txtThis generated an empty txt file named SomeFile.
I also tried adding the following lines in my Python code to get the results in tex and pickle files but it didn't work either:
print(f"Output file: {results.data.htmlFileName}") results.writeLaTeX() print(f'LaTeX file: {results.data.latexFileName}') results.writePickle() print(f'Pickle file: {results.data.pickleFileName}')Thank you in advance for any help

PS: To have a better idea of the Python code that I want to run on the cluster I attached the script mycode.py (small clarification: since it is the first code I run so as a test I only ask for 5 Monte Carlo draws but the objective is to ask for 100000 draws or more)
Attached Files