aboutsummaryrefslogtreecommitdiff
path: root/challenge-045/paulo-custodio/python/ch-2.py
blob: 28fd2e75d4f1ea99dc52919ec07793af33829d5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python3

# Challenge 045
#
# TASK #2
# Source Dumper
# Write a script that dumps its own source code. For example, say, the script
# name is ch-2.pl then the following command should returns nothing.
#
# $ perl ch-2.pl | diff - ch-2.pl

import sys

file = open(sys.argv[0])
print(file.read(), end='')