Comments (8)
Yep, hence this project exists and functions at all. 😉
My point is it will take more time and effort to support what you're asking for and I don't think it's worth it. Doing --list --help
once and reading the error message that says to run --help
on its own is a one-time thing if you even happen to even run into it. I don't think increasing the code complexity to let you specify --help
in multiple positions when it doesn't make sense to me as to what --list --help
would even produce for output is worth the effort in supporting. I would much rather just tell the user "you're not using the flags the way the tool was designed; see py --help
for details" then try to support this.
As such, I'm not planning to make any more changes around this beyond what I have already done. I understand your suggestion and I appreciate the input, but it isn't worth it to me to implement this idea and/or the support cost of the resulting code.
from python-launcher.
Sorry to comment here but #77 is locked, so can't do it there,
the current design only checks the first argument and ignores the rest to pass on to Python
I understand, this is highly unexpected for me at least. No other tool I know does this, so I wasn't aware.
Doesn't rust has some form of parse_known_args
? :-) Rather than just the first argument?
from python-launcher.
Unfortunately the flag for the Launcher is dynamic since you could literally say any Python version (else I would have used an argument parsing library and simplified my life 😉). Unless I do a complete version search upfront and then construct the possible completions I can't know ahead of time what the possible flags are. And doing that seems unnecessarily costly just for this use-case.
from python-launcher.
I meant parse known args from the python-launcher POV 👍🏻 We can forward everything else to the resolved interpreter.
from python-launcher.
Right, but there is no "known args from the Python Launcher POV" without knowing what all potential Python versions are. E.g. the Launcher doesn't know if -3.6
is a valid flag to specify when you want Python 3.6. Same goes for 0.9
, 42.1
, etc. The only way to know that list of flags would be is to do a complete version search like --list
does to calculate all valid version flags. This is why I had to hand-roll CLI flag parsing myself since I can't statically specify it otherwise.
from python-launcher.
As far as I understand currently known args are --help, --list and any -x.y where x and y are 1+ digit. That's seems fairly simple to parse and handle, no?
from python-launcher.
I mean I understand your point, but if just 1000 users run into this and 1000 times you have to tell them to not do it, it will be cheaper to just support it IMHO.
from python-launcher.
I've locked the conversation as I consider this topic resolved.
from python-launcher.
Related Issues (20)
- Have rustc strip binaries binaries HOT 1
- py will loop forever if used as python symlink HOT 5
- Consider auto-generated changelog
- Replace control flow diagram with Mermaid
- Bump serial_test_derive from 0.5.1 to 0.6.0 HOT 2
- Find a replacement for stderrlog HOT 6
- Have `rustfmt` group `use` statements HOT 2
- $PY_PYTHON is not being honoring on a brew installed py on macOS HOT 1
- Use `std::hint::black_box` with the benchmarks
- Create a logo HOT 8
- Automate the execution of cog via `justfile`
- Document the release process
- Add a FAQ entry about how to turn off `.venv` usage HOT 1
- No configurations support (or undocumentd) aka py.ini
- Manpage wording around `--list` and virtual environments confusing HOT 5
- Manpage typos HOT 3
- Local virtualenv not found on WSL2 HOT 2
- Support PEP 723
- Update `docs/requirements.txt`
- Add Repology badge to website
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-launcher.