We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1b716f commit d3c6b4cCopy full SHA for d3c6b4c
.gitignore
@@ -0,0 +1 @@
1
+/target/
src/main/python/demo_files.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python3
2
+
3
+'''
4
5
6
+movies = "A list of movies..."
7
8
+import os
9
10
+def main():
11
12
+ pythonfileDir = os.path.dirname(__file__)
13
14
+ filename = os.path.normpath(pythonfileDir + r'/../../../target/movies.txt')
15
16
+ target_dir = os.path.dirname(filename)
17
+ if not os.path.exists(target_dir):
18
+ os.mkdir(target_dir)
19
20
+ with open(filename, 'w') as fh:
21
+ fh.write(f"{movies}")
22
23
24
+ with open(filename) as fh:
25
+ print(fh.read())
26
27
28
29
+if __name__ == "__main__":
30
+ main()
0 commit comments