geekcomputers / geekcomputers/Python

Python command os.path.isfile

Open
#498 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
35.4k
Forks
12.9k
Avg merge
2h 37m
Merged PRs (30d)
1

Description

I know maybe my question is not relevant but please help!
print( os.path.isfile(os.getcwd()) )
gives False!
and
print(os.path.isfile('C:/Windows'))
print(os.path.isfile('C:\Windows'))
False
False
how could it be possible?
would you please help in this regards?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two os.path.isfile examples shown in the issue and read the Python documentation for os.path.isfile, os.getcwd, and Windows path handling. The issue does not name a repository file or test; a useful resolution would need a clarified, reproducible behavior and an agreed change or documentation target.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.