How can i find the python triggered by the GUI? I want to fully automatize some of my blender processes, an i run into a lot of problems not finding the correct commands, not using the correct args...

Can i just "see" in a log somewhere what were the commands blender ran ?

To be very precise, i want to load a gltf file, and export it to stl.

No problem through the gui, but i'm stuck with that bit of code : 

import bpy
import sys
import os

file = open(r"C:\Users\theo1\Documents\GitHub\Hackathon2020\map&amp;mapdata\mini.gltf")

bpy.ops.import_scene.gltf(file)
bpy.ops.export_mesh.stl(filePath=r"C:\Users\theo1\Documents\GitHub\Hackathon2020\map&amp;mapdata\mini.stl")


Which gives me this : 

Traceback (most recent call last):
  File "&lt;string&gt;", line 1, in &lt;module&gt;
  File "C:\Users\theo1\Desktop\impExp.py", line 7, in &lt;module&gt;
    bpy.ops.import_scene.gltf(file)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 198, in __call__
    C_dict, C_exec, C_undo = BPyOpsSubModOp._parse_args(args)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 151, in _parse_args
    raise ValueError("1-3 args execution context is supported")
ValueError: 1-3 args execution context is supported


thanks.
The API documentation should be your primary reference when implementing Python scripts for Blender.

Additionally you can enable the Python Tooltips and Developer Extras in the preferences (Edit > Preferences > Interface > Display). 



The Python Tooltips will be displayed when hovering over a UI element with your mouse and show what Python command would be executed when interacting with it. The Developer Extras add helpful options such as Edit Source or Online Python Reference to the context menu (RMB).







Using the references provided above it's fairly easy to see why your script doesn't work properly.

bpy.ops.import_scene.gltf() expects a file path as argument, not a file object. Therefore you shouldn't use open() at all. Instead pass the file path as named argument: 

bpy.ops.import_scene.gltf(filepath="/path/to/your/file")