Skip to content

Instantly share code, notes, and snippets.

@dwoz
dwoz / winconsole.py
Last active September 22, 2018 07:47
Test Setting Codepage from Current Process.
#!python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import win32console
import os
import sys
import codecs
import sys
@dwoz
dwoz / max_files.py
Last active September 22, 2018 06:54
Windows max files
#!python
from __future__ import print_function
import os, io
import ctypes, logging
import win32file, win32con
import sys
logging.basicConfig()
log = logging.getLogger()
print("Max files before set {}".format(ctypes.windll.msvcrt._getmaxstdio()))
if sys.version_info.major == 2:
@dwoz
dwoz / photon-py3-gdb-debug.md
Last active May 31, 2023 00:42
Debug python3 with gdb on photon linux

Debug python3 process with GDB on Photon Linux

  • Enable the debuginfo package repository.

    In /etc/yum.repos.d/photon-debuginfo.repo change enabled=0 to enable=1.

    /etc/yum.repos.d/photon-debuginfo.repo should look like this

    [photon-debuginfo]
    
  • Start Date: 2022-04-20
  • SEP Status: Draft
  • SEP PR: (leave this empty)
  • Salt Issue: (leave this empty)

Summary

The core team would like to move to an LTS release strategy