Skip to content

Instantly share code, notes, and snippets.

View DiddiLeija's full-sized avatar

Diego Ramirez DiddiLeija

View GitHub Profile
@vsajip
vsajip / handles.py
Created September 25, 2021 15:33
Duplicate stdio handles on Windows using ctypes
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Red Dove Consultants Limited. BSD-3-Clause licensed.
#
from ctypes import *
from ctypes.wintypes import BYTE,WORD,DWORD,LPWSTR,LPCWSTR,HANDLE,LPVOID,BOOL
import os
import sys
@DiddiLeija
DiddiLeija / post_output_markdown.rst
Last active February 8, 2023 03:21
A template of how the output must be reported using Markdown.

An example to post output using Markdown, specially for GitHub issues and PRs.

Guess what, my `pip install` command is going as expected!

```
C:\Users\Diego Ramirez\Documents>pip install twine
Requirement already satisfied: twine in c:\users\diego ramirez\appdata\local\programs\python\python39\lib\site-packages (3.4.2)
Requirement already satisfied: colorama>=0.4.3 in c:\users\diego ramirez\appdata\local\programs\python\python39\lib\site-packages (from twine) (0.4.4)