psychopy.org | Reference | Downloads | Github

Please surround python code with backticks

formatting
forum
code

#1

When you include python code on this forum please put triple “backticks” like this ``` on the line before and the line after your code.

If you’ve done it correctly then your code will appear in a grey box with correct indentation like this (check the preview of your post on the right hand side before posting it) and other people will be better able to work out what might be right/wrong with your code.

if myVal==True:
    break

If you’ve already posted something that didn’t follow this rule then please edit that post and add these backticks.

thanks


Pause and resume
Counting number of trials in stair handler
Blank screen in Psychopy!
Stops moving when two stimuli meets
When i use wait.keys in a block,it needs to press the keyboard twice to move on
.overlaps() method fails with rectangles
Randomly Select from Multiple Conditions files
Speech Recognition
Routine Won't Stay Up for Duration of Specified Time
Screenshot using getmovieframe how to get shot of both front and back screens
If statement not working
Memory Leak Issue - troubleshooting - 14 questions
How to Reverse Score output
Advice on using moviestim3
Giving feedback based on the number of trials inside the loop
Displaying participant responses
Eyelink II , exception in thread Thread-2
Mouse click on shape
Iohub_server_response_error
Creating an n-back task in builder view
Sending Message for EyeTracker using Pylinkwrapper
Problem with IoHub datastore while using ioHubExperimentRuntime class
Creating barriers in a grid
Clicking on Image Causes Response
Importing Images from a File of Images
Stroop test error when adding a language
Lose data file(.csv) if I press esc. to terminate the program
Wait for joystick response in psychopy
Setting the Gamma Ramp Manually
Record responses during pauses (blank screens)
Force end of routine with two key presses, within time limit
Need some help coding
Providing feedback before routine has ended
If condition not working with input from keyboard component
Calling win.flip() at every frame when using static stimuli: pros and cons
Signaling when an image is clicked
Rounding mouse click location
Lowering the fps during presentation of random dots stimulus
Use key responses as triggers
RT and key response not recording in data
Jitter duration not recording
Self paced reading - space doesn't always move window
Ending a routine 0.5 seconds after key press
Self Paced Reading Task with questions
Importerror: cannot import name genFilenameDelimiter
Need help in getting feedback based on rating scale response from previous rountine. Partial Success
Multiple Rating scale
Parallel Port Trigger Issues
Feedback after trial block
How can I have the total experiment time?
Save large number of frames to tiff image stack
"The truth value of an array with more than one element is ambiguous" while using ".POS"
Code working in some routines, but not others
Providing 'No Response' Feedback to Participants
How to insert a countdown for the stimuli?
Conditional Branching for Picture Naming Trials
Opposite colors for my stimuli
#2

thank you Jon, i will do this


#3

Thanks! I’ll do that!