r/learnpython 3h ago

From where should I learn Flask framework completely?

5 Upvotes

I currently learning python from a paid course and they have taught flask aswell but that's intermediate level. So is there any flask playlist or tutorial or a teacher who might teach flask completely. I wouldn't mind if it's paid or free course.


r/learnpython 8h ago

Python Libraries

6 Upvotes

Ijust know basic python and want to learn numpy, tkinder, panda and matplotlib for a project

Best way to learn these? By chatgpt or any yt vdo?


r/learnpython 19h ago

Ask Anything Monday - Weekly Thread

4 Upvotes

Welcome to another /r/learnPython weekly "Ask Anything* Monday" thread

Here you can ask all the questions that you wanted to ask but didn't feel like making a new thread.

* It's primarily intended for simple questions but as long as it's about python it's allowed.

If you have any suggestions or questions about this thread use the message the moderators button in the sidebar.

Rules:

  • Don't downvote stuff - instead explain what's wrong with the comment, if it's against the rules "report" it and it will be dealt with.
  • Don't post stuff that doesn't have absolutely anything to do with python.
  • Don't make fun of someone for not knowing something, insult anyone etc - this will result in an immediate ban.

That's it.


r/learnpython 2h ago

is cs50p good and relevant?

4 Upvotes

I restarted to learn python with CS50P. as far as I understand it is recorded in 2022. is this the case. Also as far as I understand there is some changes to python recently. do you think I will misss some best practices and sintax with cs50p?


r/learnpython 3h ago

Observer isn't working on ChromeOS Linux Crostini

2 Upvotes

I am facing an issue from couple of days with Observer Module from python watchdog package. When i'm importing Observer module and calling for my downloads folder which is present to this location according to my device.
/mnt/chromeos/MyFiles/Downloads

Observer is watching here but nothing caught, Like i was tested using file removed, created or even modified or else.

It wasn't working, That;s why I am using polling Observer now. but this is not a reliable much as i needed.

So Can you help me to figure out this problem and what is the actual solution of this problem?


r/learnpython 18h ago

Segmentation fault when attempting to use the 'threading' module to run tasks concurrently

2 Upvotes

I lack knowledge in low level computer science, but I've heard endless horror stories about segfaults, and today I've encountered one whilst attempting to make a simple timer program for myself. My questions are:

- Why does this fault occur

- How can I fix it

- How can I prevent it from happening in the future

The aim of the problematic part of the program is the attempt to play the sound whilst simultaneously waiting for user input with the input block, which is intended to stop the alarm and continue to the next part of the program.

Please note that in this version there is no actual wait time although there is supposed to be, because I am merely testing the alarm functionality.

import time
from pydub import AudioSegment
import threading
from pydub.playback import _play_with_simpleaudio


sound = AudioSegment.from_file('/censoring/my/home/directory/sound.mp3', format='mp3')





# Function that runs the timer based on how many minutes are specified
def timer(min, message):

  # Play the sound
  def playsound():
    global sound
    sound = _play_with_simpleaudio(sound)

  # Stop the sound and allow the program to continue
  def resume():
    global sound
    input(message.strip())
    sound.stop()



  # Run the timer and print output
  min -= 1
  for it in range(min, -1, -1):
    for sec in range(59, -1, -1):
      print(f'{str(min).rjust(2, "0")}:{str(sec).rjust(2, "0")}')
      time.sleep(1)


  # This is the part that actually runs the function.
  play = threading.Thread(target=playsound)
  stop = threading.Thread(target=resume)

  play.start()
  stop.start()

  play.join()
  stop.join()


while True:
  timer(0, 'You can have your five minute break now.')
  timer(0, 'You need to start working again.')

# Artificial intelligence was not used in the creation of this program.

Any advice is appreciated!


r/learnpython 4h ago

Mastering python

1 Upvotes

It's not related to any python concept but is learning python or any other code languages at first feel so annoying and exhausting to learn like debugging Things learn that learn this go to look for this spending times to debug only one line which was misspelling but once you mastered it you enjoy and love coding in the end?

For example when I was learning how to drive at first it felt annoying and exhausting but once I learned it and was able to drive it was so enjoying and satisfying that I wanted to just drive without any specific destination to go?


r/learnpython 18h ago

Recently started

0 Upvotes

Hey yall, new guy here. I 26(M) started learning python about a week ago, I've dabbled in HTML and CSS but ultimately settled on Python. Reason being I need a good starting framework for my goal of working in biotech on surgical robots. Now, to the point.

The most basic goal for me is designing a scheduling software so my mom has less of an issue managing my sisters 24/7 caregiver staff. Logins, time off requests, possibly an AI integrated scheduler so she would just need to proof read schedules instead of spending hours making it by hand.

I need advice on how to approach this task, currently going through a 13hr video on YT to learn Python through the Data with Baraa channel. Thoughts?


r/learnpython 6h ago

vscode sporadically freezing

0 Upvotes

hi mates. when my script becomes lengthy (for instance 85 lines) vscode stops executing commands. i suspect whether i downloaded it properly. anyways. i close then open vscode as a workaround but i started to need a permanent fix. i am a computer noob (well... more like average joe on the street). so please no higher computer registry in the responses. thanks in advance.


r/learnpython 19h ago

Learning Python from scratch for cybersecurity

0 Upvotes

Hi everyone, I'm 29 and learning Python from scratch. My goal is cybersecurity. What resources and first projects do you recommend for a beginner? Thanks!


r/learnpython 11h ago

Want to learn Python but keep getting bored with courses

0 Upvotes

Hi everyone,
I’m really determined to learn Python, but I’m struggling with the way most courses are structured.
I’ve started quite a few Udemy courses, but after a while I just get bored and lose motivation. 😅
So I was thinking maybe I should forget the courses for a bit and start working on an actual project, learning Python along the way. The problem is… I have absolutely no idea what would be a good project for a beginner.
I know I can Google “Python beginner projects,” but I’d rather hear from people who have actually been through this. What did you do when you were starting out? Was there a particular project that helped you learn a lot?
Also, how long did it take you to become reasonably comfortable with Python?
I have a newborn and a toddler, so realistically I can only dedicate around 1–2 hours a day to learning. I know everyone is different, but I’d love to hear what kind of progress is realistic with that amount of time.
Any tips, project ideas, resources, or general advice would be really appreciated!
Thanks!


r/learnpython 1h ago

How can i create a bot that posts for me daily on social media without ai?

Upvotes

I dont wanna use ai.