1. Homepage
  2. Programming
  3. 32547 UNIX Systems Programming Assignment: Locale

32547 UNIX Systems Programming Assignment: Locale

Engage in a Conversation
UTS32547 UNIX Systems ProgrammingPython

Subject 32547 UNIX Systems Programming, Autumn 2024 Assignment
CourseNana.COM

This assignment is an individual programming assignment using Python. It addresses objectives 2 and 3 as listed in the Subject Outline document. CourseNana.COM

No limits apply to the number of lines of code of the program. CourseNana.COM

Assignments are to be completed individually (this might be checked with the use of anti- plagiarism tools such as Turnitin). You should not receive help in the preparation of this assignment, nor ask anyone else to prepare it on your behalf, nor utilise generative AI tools such as GitHub Copilot or similar in any way. CourseNana.COM

Marks CourseNana.COM

The assignment corresponds to 30% of the total marks. CourseNana.COM

Submission CourseNana.COM

The completed assignment is due by 5:00pm of Friday 17 May 2024. PLEASE PAY ATTENTION TO THE FOLLOWING SUBMISSION INSTRUCTIONS: CourseNana.COM

  1. Your Python program has to be submitted in Canvas, following the “Assignments” menu and then the “Assignment” link by the due date. You can prepare your Python program anywhere you like, but probably the easiest option is to develop it in Ed STEM. You can submit your program multiple times if you like, and we will mark the last submission. Note that Canvas adds a small suffix to the filename (“-1”, “-2” etc) for any submission after the first one, but it’s perfectly fine, we’ll remove the suffix ourselves before marking. CourseNana.COM

  2. Please submit only your Python program, and nothing else (no data files). CourseNana.COM

  3. Late submissions will be deducted one mark per day late; more than seven days late, the assignment will receive zero. Special considerations for a late submission must be arranged in advance with the Subject Coordinator. CourseNana.COM

Academic Standards CourseNana.COM

The assignments in this Subject should be your own original work. Any code taken from a textbook, journal, the Internet or any other source should be acknowledged. For referencing, please use the standard referencing conventions (http://www.lib.uts.edu.au/help/referencing). CourseNana.COM

Marking Scheme CourseNana.COM

Mark Range CourseNana.COM

18-23 The program does not work as expected with one of the options. CourseNana.COM

All requirements of the assignment are met. The submitted program can be executed by the lecturer “as is” and produces the requested output. CourseNana.COM

The program works correctly with any valid file and for all options, but its execution experiences some minor problems. CourseNana.COM

This range goes from no submission at all (0 marks) to a submission which does not meet major requirements of the assignment.
Examples:
CourseNana.COM

the program does not work as expected with two or more options; CourseNana.COM

The assignments will be marked within two weeks from the submission deadline or as soon as possible. CourseNana.COM

Important notes: CourseNana.COM

  • Submission of this assignment is not compulsory to pass the subject; do not feel that you have CourseNana.COM

    to submit it “at all costs” and perhaps be tempted to seek unauthorised assistance. CourseNana.COM

  • There are no minimum requirements on the marks on this assignment to pass the subject. CourseNana.COM

  • This assignment must be your own work and you should not be helped to prepare it in any way; your assignment may be tested with anti-plagiarism software that detects superficial changes such as changing variable names, swapping lines of code and the like. CourseNana.COM

  • The subject coordinator may ask you to describe your assignment in a “viva voce” in Zoom to finalise your mark. CourseNana.COM

  • Understanding the assignment specifications is part of the assignment itself and no further instructions will be provided; on the other hand, whatever is not constrained you can implement it according to your own best judgment. CourseNana.COM

Title: Processing a “locale” file with Python CourseNana.COM

In this assignment, you will write a Python program vaguely inspired by Unix command locale. Your Python program will parse a file containing information about language “locales” and “charmaps” and will generate output depending on the command line. CourseNana.COM

These are the specifications for your Python program: CourseNana.COM

It must be named locale.py It should be invoked as: CourseNana.COM

python locale.py option argument_file
In the command line above, option means one of the options described below, and CourseNana.COM

argument_file means the chosen argument file, which can have any arbitrary name. CourseNana.COM

The program must check that argument argument_file exists, is a file and is readable. If not, it must print an error message to the standard output and exit. The specifications for the argument_file and option arguments are given below. CourseNana.COM

File argument_file can have any arbitrary name. It must be a file of text with the following format: CourseNana.COM

  1. The file consists of an arbitrary number of lines (including, possibly, zero lines). CourseNana.COM

  2. Each line must contain three fields separated by commas. CourseNana.COM

  3. The three fields are: type, language, filename. CourseNana.COM

  4. The type field can only have as value the literal strings locale or charmap. CourseNana.COM

  5. The language and filename fields are each a string of characters of arbitrary (yet reasonably limited) length. Acceptable characters include: lower and upper case letters, digits, underscore, dot. CourseNana.COM

Fundamental note: your program is not expected to verify that file argument_file complies with the above specifications. It will only be tested with compliant files. CourseNana.COM

The following example should be regarded as the reference specification for the format of file argument_file: CourseNana.COM

  locale,English,en_AU
  locale,French,fr_BE
  charmap,English,EN
  locale,English,en_US
  charmap,Chinese,GBK
  1. Your program can be invoked with option: -a. In this case, it must print the filenames of all the available locales, in this format: CourseNana.COM

        Available locales:
    
        filename of first locale in appearance order
        filename of second locale in appearance order
        ...
        filename of last locale in appearance order
    

    Example with the example argument_file given above: Command line: CourseNana.COM

    python locale.py -a argument_file Expected output: CourseNana.COM

    Available locales: en_AU
    fr_BE
    en_US
    CourseNana.COM

    In the case in which file argument_file is empty or no available locales exist, your program must instead only print: CourseNana.COM

        No locales available
    
  2. Your program can be invoked with option: -m. In this case, it must print the filenames of all the available charmaps, in this format: CourseNana.COM

        Available charmaps:
    
        filename of first charmap in appearance order
        filename of second charmap in appearance order
        ...
        filename of last charmap in appearance order
    

    Example with the example argument_file given above: Command line: CourseNana.COM

    python locale.py -m argument_file Expected output: CourseNana.COM

    Available charmaps: EN
    GBK
    CourseNana.COM

In the case in which file argument_file is empty or no available charmaps exist, your program must instead only print: CourseNana.COM

    No charmaps available

6. Your program can be invoked with option: -l language. The language argument has the same format as the language field in the argument file. In this case, your program must search for the language in the argument file, and if it finds it, print the following information: CourseNana.COM

Language language:
Total number of locales:
total number of locales in that language (possibly 0)
Total number of charmaps: total number of charmaps in that language (possibly 0) CourseNana.COM

Example with the example argument_file given above: Command line: CourseNana.COM

python locale.py –l English argument_file CourseNana.COM

Expected output: CourseNana.COM

    Language English:
    Total number of locales: 2
    Total number of charmaps: 1

Another example with the example argument_file given above: Command line: CourseNana.COM

python locale.py –l Chinese argument_file CourseNana.COM

Expected output: CourseNana.COM

    Language Chinese:
    Total number of locales: 0
    Total number of charmaps: 1

In the case in which language language is not present at all in argument_file, your program must print: CourseNana.COM

    No locales or charmaps in this language

Example with file argument_file given above: CourseNana.COM

Command line: CourseNana.COM

python locale.py -l German argument_file CourseNana.COM

CourseNana.COM

Expected output: CourseNana.COM

    No locales or charmaps in this language
  1. Your program can be invoked with option: -v. In this case, it must only print your name, surname, student ID and date of completion of your assignment, in a format of your choice. Please note that argument argument_file is still required. CourseNana.COM

  2. No options can be used simultaneously. This means that your program can only be invoked with one of the options at a time. CourseNana.COM

  3. If your program is invoked with any other syntax than those specified above, it must print a message of your choice to the standard output and exit. CourseNana.COM

    Examples of incorrect syntax: CourseNana.COM

    python locale.py -Z argument_file (this option doesn't exist) python locale.py –a (it misses the argument file)
    python locale.py -l argument_file (it misses the language argument) CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
UTS代写,32547 UNIX Systems Programming代写,Python代写,UTS代编,32547 UNIX Systems Programming代编,Python代编,UTS代考,32547 UNIX Systems Programming代考,Python代考,UTShelp,32547 UNIX Systems Programminghelp,Pythonhelp,UTS作业代写,32547 UNIX Systems Programming作业代写,Python作业代写,UTS编程代写,32547 UNIX Systems Programming编程代写,Python编程代写,UTSprogramming help,32547 UNIX Systems Programmingprogramming help,Pythonprogramming help,UTSassignment help,32547 UNIX Systems Programmingassignment help,Pythonassignment help,UTSsolution,32547 UNIX Systems Programmingsolution,Pythonsolution,