Is a path a symbolic link?

EasyOS Module Programs · 47 of 49

Write a Python program to check whether a path is a symbolic link.

Advertisement
Output
Creating symlinks needs extra permission here
target.txt is a link: False

Approach

  1. os.path.islink; creating links may need extra rights on Windows, so handle the error.

Solution

Advertisement

Learn the concept

New to this topic? Read the lesson, then come back.

More os module programs

← All 49 OS Module Programs