Without using the system function to call any bash commands

Assignment Help Python Programming
Reference no: EM13346377

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command. This command will look at the contents of two directories and report on the differences between them. This includes those ?les that are only in one directory or the other, as well as ?les that have the same name, but have different characteristics as de?ned below.

The format of this command will be: diff [-R] [-c value] directory1 directory2

The options are as follows:

• -c value, determines what level of difference should be reported between two ?les. If not speci?ed, the default is to say that two ?les are the same if they have the same name and are not different types (?le vs. directory). If the option is speci?ed with a value of 1, then two ?les are only considered the same if they also have the same size. If the option is speci?ed with a value of 2, then two ?les are only considered the same if they have the same size and the same exact contents.

• -R, when present the contents of subdirectories with common names in each directory should also be analyzed in a recursive manner.

The report generated by the program should include three lists of ?les for every pair of directories (or subdirectories in the recursive case). The ?rst list contains those ?les only in directory1. The second list contains those ?les only in directory2. The third list contains those ?les that have the same name in each directory, but are considered different based on the -c option value. These lists should be sorted alphabetically. If a bad option is given to the command an error message should be displayed (including a bad value to the -c option). If anything other than two directories are speci?ed on the command line, an error message should be displayed.

Reference no: EM13346377

Questions Cloud

Write a paper about what normal operations of the system : write a paper about what normal operations of the system that has gone wrong with obesity. then the effects of obesity
Exercise prepare a flexible budget gator divers is a : exercise prepare a flexible budget gator divers is a company that provides diving services such as underwater ship
At thermo fisher scientific we fulfill our mission by : at thermo fisher scientific we fulfill our mission by working everyday in accordance with our values which we can the 4
Question tweedle pty ltd is a company that lays down : question tweedle pty ltd is a company that lays down railway track in newly developing countries. a b c and d are the 4
Without using the system function to call any bash commands : without using the system function to call any bash commands write a python program that will implement a simple version
A quoted company is considering several long-term sources : a quoted company is considering several long-term sources of finance for expansion into new foreign markets. critically
A jayantha commenced business on 1 january 2010 with equity : a. jayantha commenced business on 1 january 2010 with equity of 100000. during the year ending 31 december 2010 he paid
Task 1you are part of a global financial services company : task 1you are part of a global financial services company that has offices in london new york tokyo and singapore. its
On a graph this is demonstrated by a series of hills and : on a graph this is demonstrated by a series of hills and valleys corresponding to the expansion and contraction of

Reviews

Write a Review

Python Programming Questions & Answers

  The block of statements below the line of stars

The block of statements below the line of stars is where I need help correcting. The true line that needs to be corrected is p = add((getX(k),getY(r))), it needs to give points of the path using the block of information. I have somthing which I kn..

  Design a function that accepts an integer

Design a function that accepts an integer argument and returns the sum of all the integers from 1 up to the number passed as an argument. For example, if 50 is passed as an argument, the function will return the sum of 1, 2, 3, 4, . . . 50. Use recur..

  Code for the haunted house game

Improve the game by adding more features, for example you can examine more items, more props etc. You may implement this using more lists regarding items and props, remember, you should check if the object is being carried or in the location of th..

  Assume that the variables gpa , deanslist and studentname

Assume that the variables gpa , deansList and studentName , have been initialized. Write a statement that adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.

  A string is valid windows filename.

writing a function in python that verifies whether a string is valid windows filename.

  The dictionary order based on the ascii order

Needless to say, the dictionary order based on the ASCII order is not what a real-world indexing software wants. So, we want to implement the dictionary order of strings in the standard wa

  Write a program that obtains integer numbers from user

Emphasize standard approaches that verify you have successfully mastered the concepts of structured design - selects a menu item, program should perform calculation, display the result to the user, and return to the main menu.

  What are the issues assciated with top-down analysis

what are the issues assciated with top-down analysis please explain?

  The initial number for generating the sequences

Then, after the functions, read in the initial number for generating the sequences. Here, check that it is a positive integer. If it is not, give an error message and exit the program.

  Implement your algorithm in python

Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified and reinforce topic material related to the programming work cycle, and the input, processing, output program structure.

  Most popular name would be the one with the biggest number

the program will ask you to insert the year that the user is interested in, then ask the gender that the user is interested in, and print out the most popular names corresponding to the year and gender. FYI, the number on the right represents how man..

  Interaction between the customer and the machine

In Python:Simulate a cash register or ATM including the interaction between the customer and the machine (i.e. assume that you are automating the responses)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd