Skip to content

python programming

Python, Pygame and Tkinter with free tutorials – on twitter I'm @pythonprogrammi on youtube GiovanniPython

  • Home
  • Cheatsheet
  • Components
  • Ffmpeg
  • Free Apps
  • Free Games
  • Free music
  • Free sounds for videogames
  • Install ffmpeg
  • Javascript
  • Newsletter
  • Presentations with Python
  • Pygame
  • Pygame cheatsheets
  • Pygame devlog
  • PySnake
  • Python and Javascript
  • Python resources
  • Tkinter templates
  • Tkinter tutorial
  • Tkinter’s Staff Picks
  • Tutorials
  • Ursina
  • Useful sites
  • ZeroToHero
Main Menu

Check if a dir exists

19/05/201919/05/2019pythonprogramming

We will create a directory and the we will check if it exists, avoiding receiving an error message. We checked two ways to do it. The first uses os.path.isdir to check the presence of the directory, while the second uses the try except method to intercept the error.

PinterestXFacebookWhatsApp
Advertisement
Posted Under
Basics Examples
Tagged
create directory except os module os.mkdir try

Post navigation

Machine learning: from zero to hero
Share files through your devices with Python
Advertisement

Search for Python’s stuffs

Go get into Amazon Prime

#pygame #ai pic.twitter.com/JDwD967eet

— py-learn (@pythonprogrammi) November 30, 2021

Videos


Games


My games on itch.io
PyPowerpoint

Articoli in evidenza


Giovanni G. Py

I like to solve problems with Python

Newsletter
Copyright © 2026 python programming.
Proudly powered by WordPress. | Theme: Awaken by ThemezHut.

Create a website and earn with Altervista - Disclaimer - Report Abuse - Privacy Policy - Manage tracking preferences