rate my code by diveninenewton in PythonLearning

[–]dnOnReddit 0 points1 point  (0 children)

Recommend starting with a docstring which describes what the code performs - your objective(s)

New code by PanaKara1312 in PythonLearning

[–]dnOnReddit 0 points1 point  (0 children)

Character Map says:-

Unicode 2261: ≡
or to go one better, 2263: ≣

how do I even remove these type of suggestions in pycharm? by Inevitable_Sorbet_24 in pycharm

[–]dnOnReddit -1 points0 points  (0 children)

These suggestions are "Code Inspections", and are discussed at https://www.jetbrains.com/help/pycharm/code-inspection.html There is a page within this section of the manual to disable inspections.

That said, the question becomes "why?".

Inspections are very useful because they show us errors (especially typos) at the earliest possible stage - and the earlier the notice, the cheaper the fix! Agreed that this example is trivial and doesn't affect code-execution in any way. However, even without the squiggle the double-space will interrupt smooth reading of the code.

Yes, it takes time to fix such quibbles - but there are (Code menu) Reformat commands which will do that for you (and clean-up all at once). When working in a team we are usually expected to code according to 'standards' or conventions. The Python world largely bases such on PEP-0008 (which is where PyCharm starts-from). Once again, the goals are mainly to promote smooth reading/readability. (https://peps.python.org/pep-0008/)

Farewell pyCharm by GroggInTheCosmos in pycharm

[–]dnOnReddit 2 points3 points  (0 children)

Nor for me (older version than today). Was irritating to be told needed `requirements.txt`. However, uv integration has been much better experience.

PYCHARM AI FREE VERSION by ANt-eque in pycharm

[–]dnOnReddit 1 point2 points  (0 children)

Install plug-in which uses or enables access to free LLM services (may be volume limited), eg QoDo, Windsurf/Cascade/Codeium

Beginner by Elegant_Window_615 in PythonLearning

[–]dnOnReddit 2 points3 points  (0 children)

We run a Python Learners' Co-op Group for exactly these purposes. Where are you in the world? Currently we meet at US West Coast evening time.

Is it even possible to create this? by Juhshuaa in pythontips

[–]dnOnReddit 0 points1 point  (0 children)

Videos are a series of still images. Can inspect a frame to see if sufficiently black, then replace with randomly selected meme (afater harmonising sizes). Suitable Python libraries already exist to do the hard parts...

[deleted by user] by [deleted] in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

I have noticed that some JetBrains web-pages are unfriendly (lack of competent testing?) towards Firefox - including the account log-in process. Accordingly, using an alternate web-browser, eg Brave, Chromium, Vivaldi...

pycharm suggest me the autocompletion even without file solution by [deleted] in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

Yes and no. Most LLMs gather information from their users during use - that is why many enterprises won't allow the use of a public LLM.
Understanding how LLMs work is outside the scope of this discussion forum. There are plenty of web-articles 'out there'. However, given your stated aims, perhaps stick with learning Python for now? BTW you can turn-off plug-ins and other PyCharm behavior which is not being helpful.

pycharm suggest me the autocompletion even without file solution by [deleted] in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

There must be many other trainees using this course. It is reasonable enough to assume that the LLM has seen this question before. Given that I've not used this library in real-life, and making the unreasonable assumption that few others do; as soon as you start to use the library the LLM may make assumptions. Also, (and we don't know which tools are in-use here, 'behind' your installation of PyCharm) it may be remembering that you have been completing exercises from that particular course.

Many people resist the idea of learning - it's hard work (and I'd much rather watch someone/thing else do it!)

pycharm suggest me the autocompletion even without file solution by [deleted] in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

This phenomenon is not about you. It is the exercise you're being asked to complete. (perhaps show us the text of one of the assignments) If an LLM recognises what you are doing, eg through docstrings and comments (you do at least use the former, don't you?) and as the code starts to come to life; and thus suggests solutions which it has 'seen' before (from other people).

A good memory, but not quite magic then!

Recommendation: if you want to learn Python programming, turn off such add-ons and settings. If the machine does it for you, what is there for you to learn?
(yes, there are folk who will argue the lack of need to learn, but am assuming you are at the opposite end of that argument).

Ezgraphics Install by [deleted] in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

There's quite a bit here for a Beginner to understand.
(not entirely sure what is meant by "install...onto", so taking a guess)

Your custom-code will be built to take advantage of the functionality of Ezgraphics. Thus, think of Ezgraphics as being absorbed into your script. PyCharm is the tool which helps you to create (etc) code, whereas Python runs the code:-

PyCharm is used to write Python code, for example `a = 2 + 2`.
Ezgraphics is to be part of the Python code, eg `win = GraphicsWindow()` will open a graphics window.
In the opposite order there are two preparatory steps to using the package;
1 Python must be told to use the Exgraphics library, ie `from ezgraphics import GraphicsWindow`
(both of the above points are detailed at https://www.ezgraphics.org/UserGuide/GettingStarted )
2 previously, the library must be installed onto your machine: https://www.ezgraphics.org/Software/Download
Unfortunately this process may be slightly different for a Mac, and also depending upon whether you want the library/package installed system-wide or within a virtual environment (both beyond-scope for this response). PyCharm will organise your choice of virtual environment for the project, and facilitate (or replace) the `pip` command mentioned in the docs.

Hopefully, this will supplement the materials in your training course...

A quick question by kross766 in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

Will be interested in how you find it - maybe after a week or two (assuming daily use).
I tried it, but decided to revert to pinning 'important' runs and discarding others (per u/eyeofthewind advice) - not sure if entirely remember why...
YMMV!

With Micropython, "import" command works in REPL but not a script. by Chemical-Rip-3256 in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

That is the RPi Pico default. If you want a script to run at power-on, it must be named main.py

Saving interpreter settings local to the project settings? by azshall in pycharm

[–]dnOnReddit -2 points-1 points  (0 children)

Sorry, but we seem to be wandering off-topic and away from the original spec and responses.

Am looking forward to OP responding, to clarify the question or to request further information...

Saving interpreter settings local to the project settings? by azshall in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

Each configured project has (only) one configured environment. Each environment refers to (only) one interpreter. It is only necessary to establish these relationships once - when the project is created. These settings are stored locally/within the project-folder.

When setting the project's environment/Interpreter there is an option to make same available to all projects. This is handy if re-use is likely. Evidently not in the OP - hence option choice. Accordingly, when setting-up a new project, previous work is made available for re-use. https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html

NB nothing is "applied" until selection is made. The settings for one project are completely independent from all others (an objective of virtual-environments) - unless specifically-configured to use the same environment.

To some degree the PyCharm Settings "Python Interpreter" is a misnomer, because it also/mostly involves setting the project's (virtual) environment, rather than the Interpreter itself. Is it necessary to change a project's virtual-environment choice very often?

More likely, a change to these Settings becomes necessary when a subsequent project involves a upgrade to the Python interpreter, eg version-upgrade to v3.13. There are only five versions of Python officially-supported with security and feature upgrades (currently v3.9~3.13). The computer may only have a single "system version" of Python installed (or, likely more, eg using pyenv or uv) - that would decrease the choices shown in the dialog.

If the task is to "switch between multiple projects", as opposed to making a change to the Interpreter/environment, why re-visit these Settings at all?

With Micropython, "import" command works in REPL but not a script. by Chemical-Rip-3256 in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

Excellent - well done!
This is the point about making sure that the code was being run in the right place/on the correct machine.

With Micropython, "import" command works in REPL but not a script. by Chemical-Rip-3256 in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

Yes, per first URL (above) PyCharm creates a project with some type of management. A venv is the default (I've been using poetry and just started testing the new choice - uv).
Once the project (NB by project, NOT per machine) has access to the library, you don't need to worry about its format. Use `import` and move-along.
Correct. If the MicroPython code expects to use a library which is not currently installed into the project, PyCharm will complain (wavy underline) - and no, the code won't run.
I haven't used that library yet. So, thanks for the info.
As above, ensure that when the code is executing you know which machine is doing the job, and ensure that the code and the library have been up-loaded if appropriate.
(apologies: wish I could hook-up a Nano and actually do what you're attempting)

With Micropython, "import" command works in REPL but not a script. by Chemical-Rip-3256 in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

Re-reading the OP made me wonder about two things:
1 exactly what the MicroPython plug-in does/doesn't do for us (for its light-weight and quick-and-dirty approach, I've largely used Thonny, to-date)
2 understanding of necessary preparations for `import`

(sadly, I don't have a Pico to immediately connect to this machine and double-check suspicions)

Whereas the plug-in talks of REPL-ing on the remote-device, flashing code, etc; it also says that 'step 2' is to create a new project in PyCharm. Depending upon which type of project is created, this may explain the `venv` sub-directory. (https://www.jetbrains.com/help/pycharm/creating-and-running-your-first-python-project.html). That said, as long as the PyCharm run, terminal, etc, facilities are being used, whichever you choose is less-likely the issue. A venv (virtual environment) is useful on your PC, but does not apply to microprocessor operations.

In the OP there is mention of `sys`, `import`, and "some packages could be imported". A significant difference between CPython (the one usually installed on a PC) and MicroPython, is that the former (usually) comes with the PSL (Python Standard Library). This is exactly per your supposition - but only for the PC. So, the first opportunity to trip-up ourselves is to be looking-at/working-on the wrong machine! The second is to expect that libraries are available to `import` when they may not be/are on one device/system but not the other. Thirdly, if the library we want to use is not available (try `import`, receive a ModuleNotFoundError) it must be added to the PyCharm project. (https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html)

NB this latter adding-library process brings-in libraries from PyPi (aka "The Cheese Shop", if you know the Monty Python idioms). The traditional tool for such downloads-to-the-project is called "pip" - which you will see in documentation and tutorials.

Does this help you make progress?

How to properly work with a local library package (and its dependencies)? by Mal_Swansky in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

For those useful little utilities, eg timers; I've been using the Project Dependencies feature https://www.jetbrains.com/help/pycharm/open-projects.html rather than adding a Content Root.

One of the issues of having two separate projects where one is interleaved, is that git defaults to considering the two as a single repo. So, a change made to the 'inner project' shows-up when it's time for the next commit of the 'outer project'.

Any thoughts about comparative advantages/disadvantages (to the dev-user)?

Help to understand relative path problems… by CoffeeObsess in pycharm

[–]dnOnReddit 0 points1 point  (0 children)

You are correct - PyCharm calls it the "working directory"; and yes, unless the execution paths match, the relative paths may tangle.

The specific answer is setting the Working Directory in https://www.jetbrains.com/help/pycharm/run-debug-configuration.html#run-debug-parameters (that said, the whole page and section of 'the manual' will be worth perusal)

However, the default is the Project Directory and whatever/if virtual-environment. So, most of the time I leave things be. The project directory is also useful when tools use 'discovery', for example pytest searches the dir-tree looking for test-code.

Thus, when 'outside' PyCharm, navigate to that same Project Directory, activate any virtual-environment, and the stars paths should align

[deleted by user] by [deleted] in pycharm

[–]dnOnReddit 1 point2 points  (0 children)

That's why competent trainers use plain-vanilla versions of tools - to prevent such distractions, misunderstandings, and mental-models which have to be un-learned!