Skip to content

Commit

Permalink
basic info
Browse files Browse the repository at this point in the history
  • Loading branch information
shree007 committed Oct 17, 2024
1 parent 093ed05 commit 221885b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
In this repo, I will write python related code.

Squash in same branch:
git reset --soft $(git merge-base master HEAD)
10 changes: 4 additions & 6 deletions os-moudle-code/current-working-directory.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import os

def get_current_directory():
print("Current directory is: ", os.getcwd())

def driver():
print(os.getcwd())


if "__name__" == "__main__":
driver()
if __name__ == '__main__':
get_current_directory()
12 changes: 12 additions & 0 deletions os-moudle-code/system_information.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import os

if __name__ == '__main__':
try:
file_path=input("enter file name: ").strip()
if os.path.isfile(file_path):
print("File infomration: ", os.stat(file_path))
print("Current Directory is: ", os.getcwd())
print("System logged in by: ",os.getlogin())
except Exception as e:
print("Invalid file name, check if it is already exists: ",e)

0 comments on commit 221885b

Please sign in to comment.