donkirkby / donkirkby/live-py-plugin

Turtle background picture

Open
#356 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
302
Forks
63
Avg merge
6h 50m
Merged PRs (30d)
2

Description

Add support for the `Screen.bgpic()` method. One challenge is that the PyCharm canvas only supports PNG graphics, not sure about the browser. The turtle module supports at least GIF and PNG graphics, so either add support for GIF to PyCharm and the browser, or use PIL to convert if it's installed and fail if it's not.

Also check why it currently fails with a weird error:

Live coding plugin error:
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/don/.cache/JetBrains/IntelliJIdea2020.1/plugins-sandbox/plugins/livepy/classes/space_tracer/__main__.py", line 6, in
main()
File "/home/don/.cache/JetBrains/IntelliJIdea2020.1/plugins-sandbox/plugins/livepy/classes/space_tracer/main.py", line 176, in main
code_report = tracer.trace_command()
File "/home/don/.cache/JetBrains/IntelliJIdea2020.1/plugins-sandbox/plugins/livepy/classes/space_tracer/main.py", line 596, in trace_command
'\n'.join(turtle_report) +
TypeError: sequence item 14: expected str instance, tuple found

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Screen.bgpic() entry point and reproducing the reported failure in the PyCharm or browser canvas. Inspect how turtle_report reaches the join shown in the traceback, then verify the chosen GIF/PNG behavior and that unsupported or unavailable conversion cases are handled without the tuple error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop, tooling, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.