windows support
Closed this issue · 4 comments
dgkuester commented
Hi all,
First, thank you for putting this library out there!
From the install instructions I this looks intended for/developed in Linux. However, it works in windows too with some fairly trivial adjustments:
- Platform-specific adjustment to the _cmd method
import platform
def _cmd(self, *cmd):
if len(cmd) > 64:
raise ValueError('command data length is limited to 64')
cmd = list(cmd) + (63-len(cmd))*[0]
if platform.system().lower() == 'windows':
self.h.write([0]+cmd[:-1])
else:
self.h.write(cmd)
while True:
d = self.h.read(64)
if d:
break
if d[0] != cmd[0]:
raise RuntimeError("Invalid response from device: %s" % d)
return d
- Installation
All I needed to do to make this work on current 64-bit anaconda in windows was:
pip install hidapi
No USB configuration necessary
storborg commented
Cool! Thanks for the patch, I'll definitely get this included. If you don't mind, could you share what version of Windows and what device(s) you're using it with?
dgkuester commented
RCDAT-6000-110 and Windows 10. Plan to test soon on an RC4DAT and switch as well
From: Scott Torborg <notifications@github.com>
Sent: Tuesday, November 06, 2018 8:40 PM
To: storborg/pyminicircuits <pyminicircuits@noreply.github.com>
Cc: Kuester, Dan (Fed) <daniel.kuester@nist.gov>; Author <author@noreply.github.com>
Subject: Re: [storborg/pyminicircuits] windows support (#1)
Cool! Thanks for the patch, I'll definitely get this included. If you don't mind, could you share what version of Windows and what device(s) you're using it with?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#1 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ARvR8nRber27GHYUWMob2yhGqXTuHKyiks5uslYDgaJpZM4YPZjC>.
adamschoenwald commented
Works for me, windows 10