1- # Should You Put the Unix Shebang (#!) in Python Scripts?
1+ # Executing Python Scripts With a Shebang
22
3- This folder holds the code for the Real Python Should You Put the Unix Shebang (#!) in Python Scripts? tutorial .
3+ This folder holds the code for the Real Python tutorial entitled [ Executing Python Scripts With a Shebang ] ( https://realpython.com/python-shebang/ ) .
44
55## Sample Scripts
66
@@ -9,16 +9,8 @@ This folder holds the code for the Real Python Should You Put the Unix Shebang (
99Command:
1010
1111``` shell
12- $ ./hello.py
13- Hello from Python!
14- ```
15-
16- Source:
17-
18- ``` python
19- # !/usr/bin/env python
20-
21- print (" Hello from Python!" )
12+ $ ./hello.py
13+ Hello, World!
2214```
2315
2416### Perl
@@ -27,15 +19,7 @@ Command:
2719
2820``` shell
2921$ ./hello.pl
30- Hello from Perl!
31- ```
32-
33- Source:
34-
35- ``` perl
36- # !/usr/bin/env perl
37-
38- print " Hello from Perl!\n " ;
22+ Hello, World!
3923```
4024
4125### JavaScript
@@ -44,15 +28,7 @@ Command:
4428
4529``` shell
4630$ ./hello.js
47- Hello from JavaScript!
48- ```
49-
50- Source:
51-
52- ``` javascript
53- #! / usr/ bin/ env node
54-
55- console .log (" Hello from JavaScript!" )
31+ Hello, World!
5632```
5733
5834### Java
@@ -61,18 +37,7 @@ Command:
6137
6238``` shell
6339$ ./hello.j
64- Hello from Java!
65- ```
66-
67- Source:
68-
69- ``` java
70- #! / usr/ bin/ env - S java -- source 11
71- public class Hello {
72- public static void main (String [] args ) {
73- System . out. println(" Hello from Java!" );
74- }
75- }
40+ Hello, World!
7641```
7742
7843## Custom Interpreter
@@ -86,11 +51,12 @@ $ source venv/bin/activate
8651(venv) $ python -m pip install .
8752```
8853
89- Execute sample scripts through the esoteric language interepreter while using the virtual environment:
54+ Execute sample scripts through the esoteric language interpreter while using the virtual environment:
9055
9156``` shell
9257(venv) $ cd scripts/
9358```
59+
9460### Towers of Hanoi
9561
9662``` shell
@@ -233,6 +199,8 @@ Execute sample scripts through the esoteric language interepreter while using th
233199
234200### ROT-13
235201
202+ This is an interactive script that will expect you to provide input from your keyboard:
203+
236204``` shell
237205(venv) $ ./rot13.b
238206This text will be encrypted.
0 commit comments