Skip to content

singmann/psytml

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

PsyTML

psytml.py contains the function show_form() for displaying a borderless html page (always on top) with html forms (using method "get"). Participants' responses are returned as a python dict. (Actually show_form wraps class PsyTML.)

  • show_form(filename, size, position)
    shows a html form and returns the response as a Python dict
    • filename string, path to local html file containing the form.
    • size tuple containing the width and the height of the window in pixel.
    • position either a tuple indicating the position (of the center of the window, relative to the screen center) or None which results in centering the window.

psytml_psychopy.py adds a norm argument to show_form adding PsychoPy Units "deg", "cm", "norm" for specifying window size and position (needs PsychoPy and a PsychoPy Monitor Object).

  • show_form(filename, size=(800, 600), position=None, units="pix", monitor)

The examples folder contains some examples, including a quasi complete experiment, see corresponding README.

Known Issues

  • Does not run with psychopy full screen mode. If psychopy is run in full screen mode, the PsyTML window does not show up and the whole program "dead locks". This, unfortunately is by design and cannot be changed (see Issue 10).
  • Some issues with non ascii characters in html text fields. Non ascii characters does not break the program, but you can sometimes only continue, when you remove all characters PsyTML does not like in the text field.

Henrik Singmann and Konstantin Sering, November 2012

About

display html pages without borders

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published