Skip to content

Commit

Permalink
Merge pull request #61 from jayvdb/unix-without-ctypes
Browse files Browse the repository at this point in the history
cursor.py: Remove unnecessary loading of libffi
  • Loading branch information
techalchemy committed Mar 8, 2019
2 parents 43d05e7 + 7eb17a3 commit fd5eda4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/vistir/cursor.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function

import ctypes
import os
import sys

__all__ = ["hide_cursor", "show_cursor"]


class CONSOLE_CURSOR_INFO(ctypes.Structure):
_fields_ = [("dwSize", ctypes.c_int), ("bVisible", ctypes.c_int)]
if os.name == 'nt':
import ctypes

class CONSOLE_CURSOR_INFO(ctypes.Structure):
_fields_ = [("dwSize", ctypes.c_int), ("bVisible", ctypes.c_int)]

WIN_STDERR_HANDLE_ID = ctypes.c_ulong(-12)
WIN_STDOUT_HANDLE_ID = ctypes.c_ulong(-11)

WIN_STDERR_HANDLE_ID = ctypes.c_ulong(-12)
WIN_STDOUT_HANDLE_ID = ctypes.c_ulong(-11)


def get_stream_handle(stream=sys.stdout):
Expand Down

0 comments on commit fd5eda4

Please sign in to comment.