diff options
Diffstat (limited to 'Programming_in_C/Chapter_17.ipynb')
-rw-r--r-- | Programming_in_C/Chapter_17.ipynb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/Programming_in_C/Chapter_17.ipynb b/Programming_in_C/Chapter_17.ipynb index 192aef85..c854a59b 100644 --- a/Programming_in_C/Chapter_17.ipynb +++ b/Programming_in_C/Chapter_17.ipynb @@ -27,10 +27,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "#17.1.py\n", - "#File Copy Program Using Command-Line Arguments\n", "\n", - "#Import Libraries\n", "import sys\n", "\n", "def main():\n", @@ -40,7 +37,6 @@ " #print(\"need two file names!\")\n", " #sys.exit()\n", " \n", - "#Read Command Line Arguments\n", " inName=\"source.txt\" #str(sys.argv[1])\n", " outName=\"target.txt\" #str(sys.argv[2])\n", "\n", @@ -51,7 +47,6 @@ " print(\"cant open {0} for reading\".format(inName))\n", " sys.exit()\n", "\n", - "#try to open a file for writing\n", " try:\n", " out=open(outName,\"w\") \n", " except:# Exception:\n", @@ -61,7 +56,6 @@ " string=inn.read() #Read content from File-1\n", " out.write(string) #Write content to File-2\n", "\n", - "#Close Files\n", " inn.close()\n", " out.close()\n", "\n", @@ -69,7 +63,6 @@ " print(\"File has been copied.\\n\");\n", "\n", "\n", - "#Setting top level conditional script\n", "if __name__=='__main__':\n", " main()\n", "\n" |