Actions

Programming

From ACL@NCU

Revision as of 22:59, 9 March 2018 by Aclexp (talk | contribs) (→‎Python)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Python

TKinter is used in easygui for creating GUIs. Somehow when installing PyInstaller, the system will use the python in Panda package if it is installed on the system, which may not have all the required modules. Therefore, a quick solution is to first remove all Panda installations on the system, and then install the PyInstaller package again. There is sometimes also a warning saying that:

WARNING: file already exists but should not: C:\Users\username\AppData\Local\Temp\_MEI86402\Include\pyconfig.h

This is caused by repetitive importing of the pyconfig.h in the current release of PyInstaller. To fix it, one can manually "patch" the problem by adding the following lines into the *.spec file (generated after using python makespec.py <yourfile.py>):

for d in a.datas:
    if 'pyconfig' in d[0]: 
        a.datas.remove(d)
        break

Not as convenient as one would hope, but it works (see similar issue here).


Actually I wouldnt use the screen setColor option - the way it works (using glClearColor) it only has an effect one frame later than expected.


  • Using Chinese Fonts in python scripts (details)
  • Problem in installing packages
    • "error: Unable to find vcvarsall.bat"[1] when running
pip install cffi

(details)


Ascesion TrakStar

  • To use the API (ATC3DG.h), you must have MicroSoft Visual Studio 2010 installed, and run the vcvars32.bat first to set up the environment.



-1073741515 = STATUS_DLL_NOT_FOUND

Matlab

Version Control


Touch Screen

I just wanted to reply to this thread so that other people who are searching for specific solutions might find answers more effectively. The "mouseMoved" solution provided by Lily is very clever and also worked for me! I was having difficulty getting a microsoft surface (touch screen) to register mouse-clicks. For some reason it always waited for double-clicks instead of the single-click, which I needed for reaction time. I typically use an Elo Touch screen and that has always responded like a regular mouse (as if the computer didn't know any difference), so this was completely baffling for me. For some reason the surface touch was different (I suspect because of the multi-touch features / windows 8/ being possessed). mouse.getPressed() just returns [0,0,0] unless there is a double click. The mouse itself, however, will trigger mouse.getPressed() on a single click. There is something different between the touch aspect and the mouse. I tried 1,000,000 things, including every possible strategy one could think of for changing this feature on the surface itself. No dice. This works just as well.

So if you have a tablet (or surface) that you are using to collect touch input, but can't get usual mouse.getPressed() tactics to work, try mouse.mouseMoved()

Someday when I am bored, I am going to look into the kivy library, which might provide some solutions (and fun stuff) for multi-touch surfaces (http://kivy.org/#home)