Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Merge two related Django projects or keep them separate?

I'm weighing out the pros and cons of merging the retail and wholesale applications of a business. The two projects aren't massive but there are quite a few shared classes and even some shared models/db tables between them. Hosting, servers, and deployment strategies are basically identical.

My instinct is that the pros outweigh the cons but I'm wondering if there's anything that I'm missing here?

Pros:

1. Easier to maintain - update packages, versions, databases, shared classes in code, etc one time rather than two
1. Cheaper web hosting

Cons:

1. Small changes require redeployment of full application

/r/django
https://redd.it/ukarop
Saturday Daily Thread: Resource Request and Sharing! Daily Thread

Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?

Use this thread to chat about and share Python resources!

/r/Python
https://redd.it/uk0tyy
I am trying to run a code cell in a Jupyter notebook but it always end up with this error. What should I do ?

/r/JupyterNotebooks
https://redd.it/ue3k13
Why is it so hard to output a running scripts output live to a webbrowser?

I am new to webdev... I am currently trying to get rq & socketio working...
With flask I am able to get the following working:
Submit > do a thing, when thing finished > dump output of thing to client

However, what I am finding near impossible

Submit.... run a python script, output from python script to client, keep running script, a bit more output from script to client, keep running script, send last bit of output to client.

I understand that it will require ajax to update the page without reloading, but whichever way i turn i can't seem to find a simple way of doing this.

Why is something that I would have assumed would be very simple so hard?

/r/flask
https://redd.it/ukvc2v
D Simple Questions Thread

Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the title.

Thanks to everyone for answering questions in the previous thread!

/r/MachineLearning
https://redd.it/ul3jib
Learn to use Jupyter Notebook and Command Line Interfaces!

My friends and I created a Jupyter Notebook and CLI Guide to help beginners get started with these important data/computer science tools. Any feedback welcome!

/r/JupyterNotebooks
https://redd.it/ulsszh
Replace bash scripts with iPython ...scripts?

I recently discovered the joy of using iPython for all of my bash needs, but want to fully transition form using the terminal. Is there a way I can execute bash statements in a python script using the iPython "!sudo ___" syntax or similar? Thanks!

/r/IPython
https://redd.it/uj87m9
Learning Python and Flask. Major milestone completed on my personal web project. So much more to do. Welcome any feedback.
https://www.mooie.me/race

/r/flask
https://redd.it/um90cj
How do we pass a variable to include tag?

I have a bunch of html files with files names as id.html. I want to include one of the files in another html file depending on the value of id received from the route. I want to do something like this:

{% include 'files/{{ id }}.html' %}

How do I achieve this?

/r/flask
https://redd.it/umdzoq
Is Jupyter Notebooks unreliable or am I good to hand in this project?

I have a final project for a class that I have used jupyter notebooks to complete. There are a lot of graphs and such in the notebook. When I get into the notebook and use "Run All" and run all of the cells it works, but if I go back in and run an individual cell it will crash.

Also, last night it worked perfectly fine when I did run all, but then this morning I did it and some of the cells crashed and I had to fix them.

It feels like sometimes things work in Jupyter notebooks and sometimes they don't, it is honestly really frustrating and makes me glad that I am taught more application development vs data science, because I can't imagine having to use Jupyter notebooks all the time.

I believe they crash because I change variables later on in the code, and when I run the individual cell again the variables have changed so it crashes, but I am not positive since sometimes it works and sometimes it does not.

If I run all and have all of the cells properly working and displaying their graphs will it appear that way when my professor looks at

/r/JupyterNotebooks
https://redd.it/ul8cbb
Sunday Daily Thread: What's everyone working on this week?

Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.

/r/Python
https://redd.it/ukpqov
Large plots in Jupyter notebooks (in Windows)

I am doing some mapping/GIS work with Python, which leads to large plots. However, I can't seem to enlarge the plot area - at least vertically. I can't change the backend, as the only ones I seem to have available are backend_agg, backend_nbagg, backend_webagg_core. So: how do I install other backends? Or - how do I enlarge the plot area so that the entire plot is displayed; that is, without scroll bars? Thanks!

/r/JupyterNotebooks
https://redd.it/un4l5m
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!

This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.

/r/Python
https://redd.it/unnmyf
2022 Python Language Summit

The Python Language Summit blogs just dropped: [https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit\_01678898482.html](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit_01678898482.html)

There was a lot of focus on making Python faster this year, in a lot of different ways:

* [Optimising single-threaded code](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit_2.html)
* Creating [a version of Python without the GIL](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit-python_11.html)
* Enabling [multiple interpreters to run inside a single process](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit-per.html)
* [Upstreaming async optimisations from Cinder](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit_60.html)
* A proposal for [lazy imports](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit.html)

There's also coverage on [immortal objects](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit_11.html), [f-strings in the grammar](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit-f.html), [dealing with the issue/PR backlog](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit-dealing.html), and [Python in the browser](https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit-python.html).

/r/Python
https://redd.it/unx80h
Django Templates + React

I currently have a project that is a django-rest-api backend with a react/redux front end. I recently implemented "django-wiki" into my project and customized the cosmetics, this project uses django templates. Has anyone ever used django templates on one portion of the website and a different front end framework like react for another portion? I'm having difficulties syncing the login, in the react portion I use local storage to save the jwt for access and i'm not sure where to implement that on the django end so it flows to both portions of the project.

/r/djangolearning
https://redd.it/uo2jip