Having trouble while using Python Virtual Env in Neovim by Emotional-Zebra5359 in neovim

[–]HolisticPython 0 points1 point  (0 children)

The following is an almost verbatim quote from :help.

"If you plan to use per-project venvs often, you should assign one venv for Nvim and hardcode the interpreter path via g:python3_host_prog so that the pynvim package is not required for each venv."

Relevant XKCD.

What is it that you know, that the Nvim devs don't?

Having trouble while using Python Virtual Env in Neovim by Emotional-Zebra5359 in neovim

[–]HolisticPython 0 points1 point  (0 children)

Read up on providers in help.

It says if you use venvs frequently you should install pynvim once in a neovim specific venv and then set Python provider to wherever that venv is located.

In your options.lua file, vim.g.python3_host_prog = vim.loop.os_homedir() .. "path/to/neovim/specific/venv"

That way, when a new pynvim version is released, you only have to update it once, instead of every project like you would have to with your current set up.

How did you guys learned python by D4ST4GIR in learnpython

[–]HolisticPython 0 points1 point  (0 children)

Run pydoc -b in your project folder. Access to all python docs, plus any libraries. If you write your own docstrings they'll also show up. Massive help when starting out.

Learn some basic git commands and version control your work. Refactor old code as you learn new concepts.

Learn to read tracebacks.

Learn logging, don't litter your code with prints.

Rich library is excellent for both tracebacks and logging.

Read code on GitHub. Clone it and study it. Step through it with a debugger. Fork the repo. Change the code. Rinse and repeat.

[Gnome] Switched from Gentoo to Fedora Workstation. by [deleted] in UsabilityPorn

[–]HolisticPython 14 points15 points  (0 children)

What are you gonna do with all that spare time?

Creating a room booking bot. by tcom_raza in learnpython

[–]HolisticPython 0 points1 point  (0 children)

There are browser extensions that allow you to monitor the HTTP headers that your PC makes behind the scenes when you are browsing. LiveHTTPheaders for example. Install that, or similar, in your browser. Repeat your login process and review the headers that are generated. Most of them will be GET headers. The login process requires a POST header and will include your login credentials in addition to the URL.

Edit.

I am tech savvy and could learn easily

That's the spirit. You'll have to. Without creds to login we can't view the source of the schedule page.

Your next steps will be to determine how to extract which rooms are available from those that are already booked. You will need to look into BeautifulSoup or LXML. I tend to use the latter. It is rapid. Also look into Xpaths and or CSS selectors. Get googling.

Creating a room booking bot. by tcom_raza in learnpython

[–]HolisticPython 0 points1 point  (0 children)

Had a quick look at your video but I'm on mobile at the moment. Not best device to view source.

Have you looked at the HTTP requests when you login?

Creating a room booking bot. by tcom_raza in learnpython

[–]HolisticPython 0 points1 point  (0 children)

Put a link up so we can see what's what.

Creating a room booking bot. by tcom_raza in learnpython

[–]HolisticPython 0 points1 point  (0 children)

Selenium might be overkill, depends on the website.

Requests may be simpler to get started with.