Skip to content

jhu-data-services/data-bytes-debugging-python-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debugging your Python Code

There is nothing more frustrating than when your code does not run as expected, or completely fails to run! Python offers a number of ways to "debug" your code, and understand what went wrong and how to fix it. Join Data Services for this Data Bytes session for some tips and tools on how to debug your own Python programs.

JHU Data Services

Website: dataservices.library.jhu.edu/
Contact us: dataservices@jhu.edu
JHU Data Services, part of the Johns Hopkins University Sheridan Libraries, helps the JHU community find, use, visualize, manage, and share data. We offer live webinars and self-paced online trainings on computational research and coding, GIS, data management, data visualization, and more. See all of our training topics on our website.

This repository contains materials for one of our Data Bytes webinars, which is open to JHU students, faculty, and staff. Please contact us with any questions.

As of March 2020, Data Services workshops are being held virtually on Zoom. See our calendar to register for upcoming workshops.

Description of Files

  • In-ClassScripts: This folder contains code files you will need for the workshop:
    • debugging_python.py - A Python file containing a simple two function script with two errors present, a type error and a divide by zero eror.
    • debugging_python.ipynb - A iPython Notebook containing the same functions as debugging_python.py, along with a iPython magic function for running ipdb in Jupyter Notebook.
    • pdb_commands.md - A markdown file containing common pdb (Python Debugger) commands with brief descriptions.
  • PresentationMaterials: This folder contains PowerPoint slides and other presentation materials used in the workshop:
    • DebuggingPythonCode.pdf - Slides for the workshop.
  • Resources: This folder contains cheatsheets to assist you during the workshop and links to external sources for you to continue your learning:
    • PythonDebuggerCheatsheet.pdf - A cheatsheet containing all of the pdb commands needed for debugging your python code.

Post-Class Survey

If you have taken the live webinar for this class, please take this survey: Data Bytes Survey

License and Terms of Use

The presentation materials are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0), attributable to Data Services, Johns Hopkins University.

See LICENSE file for additional code licensing and re-use information.

The images, external resources, and cheatsheets linked in this repository may have other licenses and terms of use.

Citation

Please cite this material as:
Johns Hopkins University Data Services. October 3rd, 2022. Debugging Python Code. https://github.com/jhu-data-services/data-bytes-debugging-python-code

About

Data Bytes workshop on debugging Python code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published