HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
say4n
hotreload
Python2020–2020
say4n / hotreload

hotreload

hot reload your python code!

2Distinct people
2Mentions
0Explicit recommenders
317GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

hot reload your python code!

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by 3-hour interval2 dated mentions

Observed mentions: 2020-06-12 12:24:28 UTC to 2020-06-14 05:59:50 UTC.

012020-06-12 12:00:00 UTC to 2020-06-12 15:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJun 12, 12:002020-06-12 15:00:00 UTC to 2020-06-12 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-12 18:00:00 UTC to 2020-06-12 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-12 21:00:00 UTC to 2020-06-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-13 00:00:00 UTC to 2020-06-13 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-13 03:00:00 UTC to 2020-06-13 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-13 06:00:00 UTC to 2020-06-13 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJun 13, 06:002020-06-13 09:00:00 UTC to 2020-06-13 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-13 12:00:00 UTC to 2020-06-13 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-13 15:00:00 UTC to 2020-06-13 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-13 18:00:00 UTC to 2020-06-13 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-13 21:00:00 UTC to 2020-06-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-14 00:00:00 UTC to 2020-06-14 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-14 03:00:00 UTC to 2020-06-14 06:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJun 14, 03:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jun 12, 12:002020-06-12 12:00:00 UTC2020-06-12 15:00:00 UTC110
Jun 12, 15:002020-06-12 15:00:00 UTC2020-06-12 18:00:00 UTC000
Jun 12, 18:002020-06-12 18:00:00 UTC2020-06-12 21:00:00 UTC000
Jun 12, 21:002020-06-12 21:00:00 UTC2020-06-13 00:00:00 UTC000
Jun 13, 00:002020-06-13 00:00:00 UTC2020-06-13 03:00:00 UTC000
Jun 13, 03:002020-06-13 03:00:00 UTC2020-06-13 06:00:00 UTC000
Jun 13, 06:002020-06-13 06:00:00 UTC2020-06-13 09:00:00 UTC000
Jun 13, 09:002020-06-13 09:00:00 UTC2020-06-13 12:00:00 UTC000
Jun 13, 12:002020-06-13 12:00:00 UTC2020-06-13 15:00:00 UTC000
Jun 13, 15:002020-06-13 15:00:00 UTC2020-06-13 18:00:00 UTC000
Jun 13, 18:002020-06-13 18:00:00 UTC2020-06-13 21:00:00 UTC000
Jun 13, 21:002020-06-13 21:00:00 UTC2020-06-14 00:00:00 UTC000
Jun 14, 00:002020-06-14 00:00:00 UTC2020-06-14 03:00:00 UTC000
Jun 14, 03:002020-06-14 03:00:00 UTC2020-06-14 06:00:00 UTC101

What Hacker News says

2 sources
Does this "just work"? How does it handle classes? I've been writing my python code in a style that can be hotswapped. Roughly, I use global functions and pass around structs, like C. The function calls are made with `api.foo(data)` instead of `data.foo()`. Then I can just replace `api.foo`'s definition with whatever I want after attaching with a debugger. Example: https://github.com/shawwn/gpt-2/blob/e4868225382e8a475ef3c3d... I assume there's a much better way to do this, but the class system seems to make it hard to swap things out. Doesn't "isinstance" break if you redefine the class? EDIT: Oh, this isn't actual hot-reloading for python. Darn. I'm really hoping someone will tackle that... Cool project though! EDIT2: Actually, this project does seem to reload the modules: https://github.com/say4n/hotreload/blob/0cf3a0b466466f99f8c7...
Read the rest
... so the original question stands. By the way, you may want to use `import traceback; traceback.print_exc()` to log exceptions. I'm not sure how that plays with python's `logger` class though.
In Hot-swapping Python 3 code

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.