Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve python trace user experience. #1890

Open
yihong0618 opened this issue Feb 18, 2024 · 1 comment · May be fixed by #1891
Open

feat: improve python trace user experience. #1890

yihong0618 opened this issue Feb 18, 2024 · 1 comment · May be fixed by #1891

Comments

@yihong0618
Copy link
Contributor

for now, for python tracing work, we need the following steps.

  1. chmod +x xxx.py
  2. make sure we have shebang in front of python file

but in 2020s most python scripts do not executable and some of them do not have shebang,
if we want to trace it, we must make sure the two steps done.

if we can just run

# like uftrace a.out would be better 
uftrace xxx.py # this support all files ends with .py  

that would be better.
I would like to give a simple method and open one PR for that.

yihong0618 added a commit to yihong0618/uftrace that referenced this issue Feb 18, 2024
Add a simple way to support trace python file without shebang and
be an executable file.

Fixed: namhyung#1890
Signed-off-by: Yi Hong <[email protected]>
yihong0618 added a commit to yihong0618/uftrace that referenced this issue Feb 18, 2024
Add a simple way to support trace python file without shebang and
be an executable file.

Fixed: namhyung#1890
Signed-off-by: Yi Hong <[email protected]>
@yihong0618 yihong0618 linked a pull request Feb 18, 2024 that will close this issue
@namhyung
Copy link
Owner

The basic idea is to trace exactly what users do. Non-executable python script means it needs a python interpreter so I didn't support tracing the script directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants