update the connection code to be flexible on the prompt characters #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #30
The code will now look for 3 possible prompt values:
>>>
standard MicroPython prompt-->
aiorepl promptsys.ps1
Here's a connection to a board with no customized prompt (same behavior as before the change):
![image](https://private-user-images.githubusercontent.com/5414318/381752511-eab7bfcd-ede1-409b-8bda-848e218610b4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4NjA1MzQsIm5iZiI6MTczOTg2MDIzNCwicGF0aCI6Ii81NDE0MzE4LzM4MTc1MjUxMS1lYWI3YmZjZC1lZGUxLTQwOWItOGJkYS04NDhlMjE4NjEwYjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMDYzMDM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDczZTUzY2Q4NDdkYTUxYzBhOGNkM2I0MTY4YmNmN2JmMWE3OTRlYjdkMzdkYWVjNmJlYjM0OWRkZTQwZTk5NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Y0bGxgVBVDb9TrI391MPz5XrgAAnC5NgdzSjlFqThvo)
Here's a connection to a board that has the aiorepl demo script in its main.py:
![image](https://private-user-images.githubusercontent.com/5414318/382429284-db102441-4c1d-41ec-b5a9-ee7e335aac33.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4NjA1MzQsIm5iZiI6MTczOTg2MDIzNCwicGF0aCI6Ii81NDE0MzE4LzM4MjQyOTI4NC1kYjEwMjQ0MS00YzFkLTQxZWMtYjVhOS1lZTdlMzM1YWFjMzMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMDYzMDM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWE3N2ZiZGIwYmE0YjFkOGQwODM4NTg0MzY4Y2RlZmUzODA1ZGFjY2MyNjdhODA4YjkxZjBlODExN2E0YjhhZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.YkgQjTpZtTeaOltZ0PJxN5dDTo_u-KIvtLyaCyDvLtU)
If ViperIDE detects the user has a custom prompt, it will log that fact:
![image](https://private-user-images.githubusercontent.com/5414318/381751691-dcc97e58-6338-44fc-a6eb-e7b26b264b84.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4NjA1MzQsIm5iZiI6MTczOTg2MDIzNCwicGF0aCI6Ii81NDE0MzE4LzM4MTc1MTY5MS1kY2M5N2U1OC02MzM4LTQ0ZmMtYTZlYi1lN2IyNmIyNjRiODQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMDYzMDM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmE2ZmVkNjFjMTAzYWQ2YzY2ZWFmYTRiYThlYjYyOTYzMTkxMmYyZWEzNWQ3NjNlOGUxNjZmNWYxNDYyNWFiYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.dUbC64eA4N4424RxXqJY3lUttpDg6-eVqct5k3oMqaA)