Gallopsled / Gallopsled/pwntools

Avoid __file__ / PyOxidizer support

Open
#1,366 1 comment 0 reactions 0 assignees View on GitHub
code style
Dominant language
Python
Stars
13.7k
Forks
1.9k
Avg merge
6d 23h
Merged PRs (30d)
3

Description

PyOxidizer breaks on pwntools as it doesnt provide `__file__` See indygreg/PyOxidizer#69 for more info about why, but the tl;dr version is `__file__` is an optional attribute and should not be relied upon.

Currently the startup looks like
```py
>>> import pwnlib
Traceback (most recent call last):
File "", line 1, in
File "pwnlib", line 43, in
File "importlib", line 127, in import_module
File "pwnlib.args", line 62, in
File "pwnlib.term", line 6, in
File "pwnlib.term.completer", line 7, in
File "pwnlib.term.readline", line 9, in
File "pwnlib.term.text", line 126, in
File "pwnlib.term.text", line 27, in __init__
NameError: name '__file__' is not defined
```

It looks like many of the cases of `__file__` being used here are optional, and could be omitted if not present.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.