Skip to main content

The package provides a more direct way to help students ask their questions about the errors in their codes by combining the codes and the errors to one file.

Project description

Description

To help students to upload their codes along with errors, this module comes up. Based on the work of cgitb, it provides more functionalities to simply gather the code and the errors for teachers to have a clean view on where the bug might be.

Usage

Simply import yuDebug. When an error pops up, there will be guide in the console.

介绍

为帮助学生更好地向老师提供自己的代码特写此模块。在教学过程中,经常有学生书写的代码出现了bug,但是绝大多数情况下,学生无法完整截取代码图片,这导致了老师在解答问题时无法更好地解答,经常需要反复要求学生截全,大大降低了答疑的效率。

使用

只需要:

import yuDebug

模块会接管报错流,并当出现错误时,自动将源代码和报错信息整合到一个文件中,再提示学生复制该文件内容。

示例

当出现错误时,模块会在console里输出

发生异常,代码及报错已保存到./yuLog.txt 请双击打开文件,并复制全部内容,粘贴到qq群内寻求帮助 yuLog.txt的内容如下

[Author: PuluterYu]

[=====Raw Code Part=====]
    1 #coding:utf-8
    2 import yud
    3 
    4 a = 1/0
    5 b = 1/3
    6 c = 1/4
    7 b = 1/3
    8 c = 1/4
    9 d = 1/0
[=======================]


[=====Basic Part=====]
ZeroDivisionError
Python 3.7.0: C:\Users\HASEE\AppData\Local\Programs\Python\Python37\python.exe
Sun Feb 16 13:37:24 2020
[====================]


[=====Data Part=====]
a undefined
[===================]


[=====Raw Error=====]
ZeroDivisionError: division by zero

    The above is a description of an error in a Python program.  Here is
    the original traceback:

    Traceback (most recent call last):
  File ".\er.py", line 4, in <module>
    a = 1/0
ZeroDivisionError: division by zero
[===================]

主要包括了:

  1. 全部源代码
  2. 运行环境
  3. 局部变量值
  4. 原生报错信息

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yuDebug-1.0.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yuDebug-1.0.2-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file yuDebug-1.0.2.tar.gz.

File metadata

  • Download URL: yuDebug-1.0.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.0

File hashes

Hashes for yuDebug-1.0.2.tar.gz
Algorithm Hash digest
SHA256 150ea043992187fd817c1b96cbd5a4faec116c09081dce2ffdae2dbd79b97160
MD5 5e69a948a1e670b4d91d118ccd8f0397
BLAKE2b-256 468b3f7ed0dfadfeb1ee197834e8e210a1b1579cd4955d19d8f955cc8670e06c

See more details on using hashes here.

File details

Details for the file yuDebug-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: yuDebug-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.0

File hashes

Hashes for yuDebug-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 192b751fd15181ca650c468215b5e26545b5168b238421255570a87975225ac9
MD5 7f55f84b455b3d7614b792173ecfd8c4
BLAKE2b-256 63a6153f40da66783d5bfef04d0a8e166f0d86181a892941e0674486f08d1277

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page