{ "info": { "author": "Florent Rougon", "author_email": "f.rougon@free.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "Environment :: X11 Applications :: Qt", "Intended Audience :: Education", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Education :: Computer Aided Instruction (CAI)" ], "description": "===============================================================================\nProgram allowing to run other programs only after some \"homework\" has been done\n===============================================================================\nA way to consolidate calculus and grammar skills\n-------------------------------------------------------------------------------\n\nGeneral idea\n------------\n\nflo-check-homework presents one or more questionnaires to the user. Once all\nquestions have been answered, and if the score exceeds a predefined threshold,\na special button is enabled. When pressed, this button launches the program\n(with optional arguments) that was specified on flo-check-homework's command\nline. For instance, the following command::\n\n flo-check-homework -- prog arg1 arg2 arg3\n\nwill start flo-check-homework without any option and allow the pupil to run,\nif the questionnaires receive good enough answers, the program 'prog' with 3\narguments: 'arg1', 'arg2' and 'arg3'. To see all available command line\noptions, you may run::\n\n flo-check-homework --help\n\nIn flo-check-homework's graphical user interface, a \"magic word\" button allows\none to bypass the test in case the pupil has already done his homework in\nanother way. It also makes it possible to exit the program immediately.\n\nIndeed, flo-check-homework refuses to quit immediately unless option -e was\ngiven or a sufficient score was obtained; this is done so as to avoid the\nchildren validating the whole questionnaire with incorrect answers only to get\ncorrections that they can blindly copy after rerunning the program. For the\nsame reason, some of the question generators purposedly don't remember\nincorrect answers, in contrast with the initial design.\n\nSince version 0.10.0, there is a new feature called *super magic word* that\ngives, if properly entered, a *super magic token* which is valid for a limited\namount of time (see `The super magic word`_ below). This allows more freedom\nto run the available games once the token has been granted. Since my goal is\ndefinitely not to use technical means in order to limit the pleasure children\ncan have with games, a successful work does grant a super magic token, just as\nif the super magic word had been entered.\n\nNote:\n\n Version 0.10.0 also introduced the ``AllowExitBeforeChild`` configuration\n file parameter in the ``General`` section, defaulting to 1. If set to 0,\n quitting is also forbidden as long as the program specified on the command\n line (\"desired program\") is running---assuming it was started from\n flo-check-homework. This can be useful with kids misusing a super magic\n token to run dozens of games simultaneously.\n\nCurrently, the questions are designed to help consolidate simple additions,\nsubstractions, multiplications, euclidian divisions and conjugations of French\nverbs. The questionnaires are built at run-time and can be customized to some\nextent via a configuration file\n(~/.config/Florent Rougon/flo-check-homework.ini on Unix-like systems). It is\neasy for a Python programmer to add new question generators, questionnaires or\nsubquestionnaires.\n\nThe ItemGenerator class, which is the basis for many question generators, has\nthe following properties:\n\n - starts with items that have been incorrectly answered in previous sessions\n - cycles through all items but does not yield an item that has already been\n seen in the current session (unless all items have been seen)\n - Seen objects (used to remember which items of a given type have been seen\n in the current session) can be shared between several question generators.\n This avoids asking the same question twice in case several question\n generators are likely to generate the same question.\n\nIt is possible to setup launcher scripts that call flo-check-homework with the\nappropriate parameters depending on the script (and parameters passed to the\nscript). The flo-check-homework-decorate-games program from the 'tools'\ndirectory is provided to help automate such a setup. Basically, you write a\nlist of programs/games in an XML file which we'll call DATAFILE for the sake\nof the example. You may look at flo-check-homework-decorate-games.xml from the\ntools/flo-check-homework-decorate-games folder or run\n'flo-check-homework-decorate-games --help' for an example of such a file. Once\nyou have a proper DATAFILE, run the following command as a user who has\npermission to write to /usr/local/games::\n\n # flo-check-homework-decorate-games /path/to/DATAFILE\n\nThis will create an appropriate launcher script in /usr/local/games for every\nprogram listed in DATAFILE. If /usr/local/games is prepended to the system\nPATH, then the launcher scripts will take precedence over the corresponding\ngame executables when a user tries to run a game, unless a full path to the\ngame executable is specified. So, when using wrapper scripts, the call chain\nlooks like the following::\n\n --> wrapper script 'foo' called with arguments arg1 ... argn\n --> flo-check-homework [some options] -- foo arg1 ... argn\n --> foo arg1 ... argn\n (or ' foo arg1 ... argn' if using the ProgramLauncher\n feature)\n\nwhere each arrow indicates a different process. \"some options\" typically\ncontains -p (--pretty-name) to tell flo-check-homework the \"pretty name\" of\nprogram 'foo', for displaying in the graphical user interface.\n\nThe above trick, based on the PATH environment variable, also works if the\ngame is started from the freedesktop_ menu, because freedesktop .desktop files\nusually don't specify a full path to the executable (when they do, the only\nrecourse is to fix the .desktop file manually and report a bug to the game in\nquestion). The format of .desktop files is described in the `Desktop Entry\nspecification`_.\n\nflo-check-homework-decorate-games has options to customize the paths such as\n/usr/games and /usr/local/games, as well as options to choose which locale to\nuse when a launcher script starts flo-check-homework, and when\nflo-check-homework runs a game. See the output of\n'flo-check-homework-decorate-games --help' for more information.\n\n\nThe super magic word\n~~~~~~~~~~~~~~~~~~~~\n\nSince version 0.10.0, a new kind of magic word, creatively called the \"super\nmagic word\", allows one to run the decorated games more easily and\ntransparently. When one chooses this function from the Magic menu (added in\nversion 0.10.0) or from the toolbar, one is asked to enter the super magic\nword, similarly to the simple \"magic word\". If the given answer is correct, a\n\"super magic token\" is granted that allows one to run all decorated programs\n(likely to be games) in a transparent manner. This special permission is valid\nfor some time that depends on the super magic word that was given (see the\nsource!). Once the token has been granted, it is possible to launch the\npredefined game from flo-check-homework's GUI, as for a simple \"magic word\".\nHowever, in order to run different games under the super magic token super\npowers, one should rather quit flo-check-homework first, otherwise the locking\nmechanism used to protect the QSettings against eventual corruption caused by\nseveral concurrent uses would prevent other instances of flo-check-homework\nfrom running normally, and therefore make it impossible to run other decorated\ngames until the instance that is holding the lock is ended.\n\nIn short, the suggested use of this feature is the following:\n\n#. Ensure the child has done his work correctly, be it with flo-check-homework,\n yourself, or any way that seems reasonable to you.\n#. Enter the super magic word in flo-check-homework. This grants you a virtual\n \"super magic token\" stored on the filesystem that persists even after\n flo-check-homework has been ended (the storage location being under\n '~/.config/Florent Rougon' on Unix-like systems).\n#. Quit flo-check-homework (or accept to be limited to the game and parameters\n given on flo-check-homework's command line as specified in the previous\n step).\n#. Let the child play with any of the decorated games without\n flo-check-homework interfering during the validity period of the super\n magic token.\n#. Either let the super magic token expire by itself, or launch\n flo-check-homework and use the appropriate item from the Magic menu to\n remove it.\n\nNote: there is still some locking performed when flo-check-homework runs the\ndecorated game \"transparently\" after finding out that the user has a valid\nsuper magic token. However, it is very short, the lock being released before\nthe decorated game is started. Therefore, several decorated programs/games may\nbe run concurrently this way, even though the corresponding flo-check-homework\nprocesses may block each other for a short time because of the locking\nperformed in order to protect the QSettings.\n\nIn this mode, flo-check-homework uses a call from the exec*(2) family\n(execvp(2) in version 0.10.0) without forking beforehand. Consequently, it\ndoesn't consume any resource whatsoever once the decorated program is started,\nand the exit code returned is exactly the same as if the decorated program had\nbeen run without flo-check-homework intervening. This is why this mode is said\nto allow transparent execution of the decorated programs.\n\nWhen flo-check-homework is started, it can operate in two distinct modes:\neither the graphical interface is displayed, or the program specified on the\ncommand line is automatically run. The former is called *interactive mode* and\nthe latter *transparent mode*. Interactive mode is chosen if, and only if:\n\n - the ``--interactive`` option has been given or;\n - the ``ForceInteractive`` setting in the ``General`` section of the\n configuration file is equal to ``1`` or;\n - the user has no valid super magic token.\n\n\nRequirements\n------------\n\nThe following software is required to run flo-check-homework:\n\n - Python\u00a03.1 or later in the 3 series;\n - Qt\u00a04.8 or later;\n - PyQt\u00a04.10.3 is known to work, version 4.9 should be enough and older\n versions will most probably not work with this version of\n flo-check-homework.\n\nVersion 0.11.1 of flo-check-homework has been tested on Linux with\nPython\u00a03.5.1, Qt\u00a04.8.7 and PyQt\u00a04.11.4. It should work on any platform with\nthe aforementioned dependencies installed, but trivial bugs are likely to pop\nup on non-Unix platforms as no test whatsoever has been done on them. Please\nreport.\n\nFor installation instructions, please refer to INSTALL.txt.\n\n\nRunning flo-check-homework from the Git repository\n--------------------------------------------------\n\nflo-check-homework is maintained in a `Git repository\n`_ that can be cloned with::\n\n git clone https://github.com/frougon/flo-check-homework\n\nIt is possible to run flo-check-homework from a clone of that repository, but\ntwo things that are not part of it have to be set up in order for everything\nto work properly:\n\n - the flo_check_homework/images directory tree containing icons and \u201creward\n images\u201d must be copied from a release tarball, otherwise there will be an\n error when all questions have been answered and the program tries to show\n an image;\n - the .qm files (used for translations) that are relevant to your locale\n settings must be generated from the corresponding .ts source files; this\n can be done automatically with the Makefile shipped in the top-level\n directory of the Git repository, provided you have GNU Make (run 'make').\n\n\nAdvanced tips (or hacks)\n------------------------\n\nSince version 0.10.0, it is possible to tell flo-check-homework to use an\nintermediate launcher to start the desired program (game or whatever you\nwant). This is done by setting ProgramLauncher in the configuration file to\nthe name or path to the launcher executable. This results in a command where\nthe value of ProgramLauncher is prepended to the command line for the desired\nprogram. Of course, if ProgramLauncher is empty or unset, no intermediate\nlauncher is used.\n\nThis new feature can be used in a setup where for instance /usr/games does not\nhave the executable bit set for the user running flo-check-homework, but does\nhave it for a particular group which we'll call gamers for the sake of this\ndiscussion. If you create a custom launcher program in C that uses the\nsetgroups(2) system call to add the gamers group to the list of supplementary\ngroups for the calling process before using execve(2) to run the desired\nprogram, then it becomes possible for the user to run the desired program\nthrough flo-check-homework even though it would appear to be impossible at\nfirst (of course, the launcher program is the one providing the required\nprivileges here, and is also accessible to the user in such a setup).\n\nThe setup described in the previous paragraph requires a little modification\nto wrapper scripts, which by default check the executable bit of the program\nto run. In this case, the check would necessarily fail and should be skipped.\nInvoking flo-check-homework-decorate-games with the --no-exec-check option\ngenerates scripts that don't perform such a check.\n\nNote:\n\n To be of any use, a launcher program as described above would need the\n CAP_SETGID capability on Linux. As a consequence, it would require great\n care in writing and installing. For a start, the GID of the group passed in\n the aforementioned setgroups(2) system call *must not* be something that\n unprivileged users can choose, and that group should have no more powers\n than being able to access /usr/games in a read-only manner. Additionally,\n the launcher program should be installed on a partition where unprivileged\n users have absolutely no write access, otherwise they could make a hard link\n to the executable that would defeat the purpose of a security update (this\n is a general issue to consider whenever using setuid or setgid executables\n or, as described here, programs with special capabilities---in the specific\n sense this word has for Linux, as documented in the capabilities(7) manual\n page). For all these reasons, and because of its obvious side effects (such\n as not being able to execute fortune(6) normally, if installed in\n /usr/games), this kind of setup should only be adopted if really necessary\n (not to mention the fact that it can be easily defeated; as announced in the\n title, it is a hack!).\n\n\nAdditional notes\n----------------\n\nSince flo-check-homework-decorate-games is currently only able to generate\nshell scripts, it is not expected to be of any use on platforms that cannot\nrun them. This means that you can fill in questionnaires on these platforms\nbut can't expect to be able to run the desired program/games from\nflo-check-homework after a good enough work without some adaptation for such\nplatforms. (For Windows platforms, one might use Cygwin or adapt\nflo-check-homework-decorate-games to generate batch files, or something else,\nlet Windows experts decide in this matter...)\n\nAll images, as the rest of the package, are free according to the `Debian Free\nSoftware Guidelines`_ (DFSG-free for short). I wanted to use photos of\nangry-looking dogs easily found with Google Images, but unfortunately, they\nall appear to be non-free. If you have good suggestions of free\nsoftware-licensed images to improve this program, please advise.\n\n\n.. _freedesktop: http://www.freedesktop.org/\n.. _Desktop Entry specification: http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec\n.. _Debian Free Software Guidelines: http://www.debian.org/social_contract#guidelines", "description_content_type": null, "docs_url": null, "download_url": "http://frougon.net/projects/flo-check-homework/dist/0.11.1/flo-check-homework-0.11.1.tar.bz2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://frougon.net/", "keywords": "flo-check-homework,education,learning,calculus,grammar", "license": "", "maintainer": "", "maintainer_email": "", "name": "flo-check-homework", "package_url": "https://pypi.org/project/flo-check-homework/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/flo-check-homework/", "project_urls": { "Download": "http://frougon.net/projects/flo-check-homework/dist/0.11.1/flo-check-homework-0.11.1.tar.bz2", "Homepage": "http://frougon.net/" }, "release_url": "https://pypi.org/project/flo-check-homework/0.11.1/", "requires_dist": null, "requires_python": "", "summary": "A program that allows to run other programs only after a set of questions have been correctly answered", "version": "0.11.1" }, "last_serial": 2095760, "releases": { "0.10.0": [ { "comment_text": "", "digests": { "md5": "8b6487fd4f8fb467ce8bf4216795fe32", "sha256": "ca8669b1513faa008164711566573f116d3e217acfcf52be410d4af12f2076cf" }, "downloads": -1, "filename": "flo-check-homework-0.10.0.tar.bz2", "has_sig": true, "md5_digest": "8b6487fd4f8fb467ce8bf4216795fe32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10539407, "upload_time": "2014-04-12T11:38:39", "url": "https://files.pythonhosted.org/packages/d2/22/6bf818ccfc08a16401a8be3303c631444b6e5db5871ffdd786aa7b9160e3/flo-check-homework-0.10.0.tar.bz2" } ], "0.11.0": [ { "comment_text": "", "digests": { "md5": "31e8874164eda21e3e9bb3c1c929ee82", "sha256": "4d1c99d9cc4d88d7123258f02b83f1d4804648f70550a8b8e670f9809141b3b3" }, "downloads": -1, "filename": "flo-check-homework-0.11.0.tar.bz2", "has_sig": true, "md5_digest": "31e8874164eda21e3e9bb3c1c929ee82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10556783, "upload_time": "2014-07-16T18:58:03", "url": "https://files.pythonhosted.org/packages/18/5d/0dc5772b5339f8caa4607daac1bbc34f10242e6377dff75aa1b5a1920e4f/flo-check-homework-0.11.0.tar.bz2" } ], "0.11.1": [ { "comment_text": "", "digests": { "md5": "da61899b170e087c2a6f2a8620ba0dcf", "sha256": "f6029ebb2ccb15d58f11a2773d9becd1c0cc419e6fc77b3e15c73e2ad64435c7" }, "downloads": -1, "filename": "flo-check-homework-0.11.1.tar.bz2", "has_sig": true, "md5_digest": "da61899b170e087c2a6f2a8620ba0dcf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10557850, "upload_time": "2016-05-02T21:03:16", "url": "https://files.pythonhosted.org/packages/ff/20/23e81fd3cd312c73cef0e419ede4d73127e2d669ed434a68f5e83ed79a49/flo-check-homework-0.11.1.tar.bz2" } ], "0.9.11": [ { "comment_text": "", "digests": { "md5": "fb93423ceeabd27c636b7b5bcf6f015b", "sha256": "a7be1511e0eb313c511e42acbf61e82e8b8ef1b3dadff8c4148862cf700b352f" }, "downloads": -1, "filename": "flo-check-homework-0.9.11.tar.bz2", "has_sig": false, "md5_digest": "fb93423ceeabd27c636b7b5bcf6f015b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10488915, "upload_time": "2013-08-29T14:19:20", "url": "https://files.pythonhosted.org/packages/86/c4/15c58413fb0b5c0aa6b86c10f7bbb43bd814805ca4339494a3c33dd13249/flo-check-homework-0.9.11.tar.bz2" } ], "0.9.12": [ { "comment_text": "", "digests": { "md5": "73f6173b7db5ccd54ff318bda0f1fc9d", "sha256": "e1aba5af7b4369ffe4086aa83c000623524dcaa73f05f09d7d176e1f63124c61" }, "downloads": -1, "filename": "flo-check-homework-0.9.12.tar.bz2", "has_sig": true, "md5_digest": "73f6173b7db5ccd54ff318bda0f1fc9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10491495, "upload_time": "2014-01-13T12:16:41", "url": "https://files.pythonhosted.org/packages/6e/13/bb1c9f68f85b9cf5607ecad30801f44b37184cefe89db425893c09dbcfb7/flo-check-homework-0.9.12.tar.bz2" } ], "0.9.12.post1": [ { "comment_text": "", "digests": { "md5": "cd2e35e6cddcb28520438ee9219f7a6a", "sha256": "bc92e2775e1323018b6d1a13fadb1fbc45e36e7d8dcd590733692952824cc2c0" }, "downloads": -1, "filename": "flo-check-homework-0.9.12.post1.tar.bz2", "has_sig": true, "md5_digest": "cd2e35e6cddcb28520438ee9219f7a6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10492935, "upload_time": "2014-01-13T21:31:04", "url": "https://files.pythonhosted.org/packages/dc/45/926cfdb6cdbab1f6402f10581e8238a24b8314c276738a1e9e536171f9f2/flo-check-homework-0.9.12.post1.tar.bz2" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "da61899b170e087c2a6f2a8620ba0dcf", "sha256": "f6029ebb2ccb15d58f11a2773d9becd1c0cc419e6fc77b3e15c73e2ad64435c7" }, "downloads": -1, "filename": "flo-check-homework-0.11.1.tar.bz2", "has_sig": true, "md5_digest": "da61899b170e087c2a6f2a8620ba0dcf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10557850, "upload_time": "2016-05-02T21:03:16", "url": "https://files.pythonhosted.org/packages/ff/20/23e81fd3cd312c73cef0e419ede4d73127e2d669ed434a68f5e83ed79a49/flo-check-homework-0.11.1.tar.bz2" } ] }