-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
args passed to main(...) are not parsed correctly #406
Comments
Hi @marcelstoer , Do you have an example of how exactly you are calling main()? Regarding the "big picture" for this, I consider calling The real problem (imo) is tracked in the venerable #208. I am hoping that before esptool v3.0 I get a chance to actually look into this, and we can have a proper story for how to use esptool from Python, can generate API docs, etc. |
(On the same note, I haven't looked closely at #402 yet but it looks like a good first set of steps on the path to breaking out |
Duh, I haven't actually studied how command = ""
if not self._config.port.startswith(__auto_select__):
command += "--port %s " % self._config.port
command += "--baud %s --after no_reset write_flash --flash_mode %s 0x00000 %s" % \
(self._config.baud, self._config.mode, self._config.firmware_path)
if self._config.erase_before_flash:
command += " --erase-all "
print("Command: %s\n" % command)
esptool.main(command) I should be able to replace this with |
* Document passing arguments to main() Addresses #406]
python -V
to check this) 3.6.5What is the expected behaviour?
CLI args can be passed as-is to
esptool.main(...)
to get exactly the same behavior.Actual behaviour
All of the below combinations trip up the parser. It fails with (highlight is mine)
All of them work just fine on the CLI.
I haven't found a single combination yet that works when passed to
main(...)
.The text was updated successfully, but these errors were encountered: