Hi Dr Peirce,
I am working with David Eagleman and trying to use pyshopy on a mac. The problem I have got is that: I need to use a serial port but an error always occur on the line of �import serial�. It says there is no such module of serial.
�
The version of Mac OS X is 10.6.4, and I downloaded the standalone Psychopy of 1.62.01-OSX.10.6, installed it and updated to 1.62.02. Since it had that error, I then downloaded pyserial 2.5 to install; it still had that error. Then I found that somewhere on the website said I should use pyserial 2.4, then I go ahead to download and install 2.4, but the error is still the same. Do you have any clue how this can be solved? BTW, When I typed python in an X11 terminal, and then typed help(), then modules(serial), I can see that serial is there with 2.4 version.
�
(don�t worry about the available serial port on Mac, I have got a USB � serial adaptor and installed a drive that works on another older Mac)
�
�
Thanks very much,
Mingbo Cai
Eagleman Lab
Department of Neuroscience
Baylor College of Medicien
-- Dr. Jonathan Peirce Associate Professor Nottingham Visual Neuroscience School of Psychology Nottingham University +44 (0)115 8467176 (tel) http://www.peirce.org.uk/
also, you could dynamically change(/add to) the search path of your
script at the top of the script and it should import the module you
want as well:
# this should append the pyserial module to your
# system's(/psychopy's) search when you run the script
import sys
sys.path.append("wherever/the/pyserial/module/resides")
I think these should work...
--jason
---
Jason Gors
Dartmouth College
Dept. of Psychological and Brain Sciences
6207 Moore Hall
Hanover, NH 03755
Phone: (603) 646-9689    Fax: (603) 646-1419
On Tue, Dec 7, 2010 at 1:54 PM, Jonathan Peirce <jon.p...@gmail.com> wrote:
> I'll make sure that release 1.63.00 has serial included again.
>
> But for now:
> The serial package that you've installed has gone to the system python.
> Standalone PsychoPy includes an entirely separate python that doesn't talk
> to your system one. If you right-click the psychopy app and navigate to the
> resources/lib/site-packages (or something along those lines) you can paste
> in there the pyserial folder from your system site-packages. For some
> packages that doesn't work but for pyserial i think it's fine.
>
> Jon
>
> On 07/12/2010 18:25, Mingbo Cai wrote:
>
> Hi Dr Peirce,
>
> I am working with David Eagleman and trying to use pyshopy on a mac. The
> problem I have got is that: I need to use a serial port but an error always
> occur on the line of “import serial”. It says there is no such module of
> serial.
>
>
>
> The version of Mac OS X is 10.6.4, and I downloaded the standalone Psychopy
> of 1.62.01-OSX.10.6, installed it and updated to 1.62.02. Since it had that
> error, I then downloaded pyserial 2.5 to install; it still had that error.
> Then I found that somewhere on the website said I should use pyserial 2.4,
> then I go ahead to download and install 2.4, but the error is still the
> same. Do you have any clue how this can be solved? BTW, When I typed python
> in an X11 terminal, and then typed help(), then modules(serial), I can see
> that serial is there with 2.4 version.
>
>
>
> (don’t worry about the available serial port on Mac, I have got a USB –
> serial adaptor and installed a drive that works on another older Mac)
>
>
>
>
>
> Thanks very much,
>
> Mingbo Cai
>
> Eagleman Lab
>
> Department of Neuroscience
>
> Baylor College of Medicien
>
> --
> Dr. Jonathan Peirce
> Associate Professor
> Nottingham Visual Neuroscience
> School of Psychology
> Nottingham University
>
> +44 (0)115 8467176 (tel)
> http://www.peirce.org.uk/
>
> --
> You received this message because you are subscribed to the Google Groups
> "psychopy-users" group.
> To post to this group, send email to psychop...@googlegroups.com.
> To unsubscribe from this group, send email to
> psychopy-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/psychopy-users?hl=en.
>
hmm, actually, maybe PsychoPy should have an 'path' menu option or 
preference, to make this concept more obvious.
Jon
>> occur on the line of �import serial�. It says there is no such module of
>> serial.
>>
>>
>>
>> The version of Mac OS X is 10.6.4, and I downloaded the standalone Psychopy
>> of 1.62.01-OSX.10.6, installed it and updated to 1.62.02. Since it had that
>> error, I then downloaded pyserial 2.5 to install; it still had that error.
>> Then I found that somewhere on the website said I should use pyserial 2.4,
>> then I go ahead to download and install 2.4, but the error is still the
>> same. Do you have any clue how this can be solved? BTW, When I typed python
>> in an X11 terminal, and then typed help(), then modules(serial), I can see
>> that serial is there with 2.4 version.
>>
>>
>>
>> (don�t worry about the available serial port on Mac, I have got a USB �
>> serial adaptor and installed a drive that works on another older Mac)
>>
>>
>>
>>
>>
>> Thanks very much,
>>
>> Mingbo Cai
>>
>> Eagleman Lab
>>
>> Department of Neuroscience
>>
>> Baylor College of Medicien
>>
>> --
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
--jason
---
Jason Gors
Dartmouth College
Dept. of Psychological and Brain Sciences
6207 Moore Hall
Hanover, NH 03755
Phone: (603) 646-9689    Fax: (603) 646-1419
>>> occur on the line of “import serial”. It says there is no such module of
>>> serial.
>>>
>>>
>>>
>>> The version of Mac OS X is 10.6.4, and I downloaded the standalone
>>> Psychopy
>>> of 1.62.01-OSX.10.6, installed it and updated to 1.62.02. Since it had
>>> that
>>> error, I then downloaded pyserial 2.5 to install; it still had that
>>> error.
>>> Then I found that somewhere on the website said I should use pyserial
>>> 2.4,
>>> then I go ahead to download and install 2.4, but the error is still the
>>> same. Do you have any clue how this can be solved? BTW, When I typed
>>> python
>>> in an X11 terminal, and then typed help(), then modules(serial), I can
>>> see
>>> that serial is there with 2.4 version.
>>>
>>>
>>>
>>> (don’t worry about the available serial port on Mac, I have got a USB –
>>> serial adaptor and installed a drive that works on another older Mac)
>>>
>>>
>>>
>>>
>>>
>>> Thanks very much,
>>>
>>> Mingbo Cai
>>>
>>> Eagleman Lab
>>>
>>> Department of Neuroscience
>>>
>>> Baylor College of Medicien
>>>
>>> --
>
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do not
> use, copy or disclose the information contained in this message or in any
> attachment.  Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
On 08/12/2010 15:52, Andy wrote:
> Hi Jon,
>
> Thanks for all your great work on PsychoPy!
>
> I second the idea of having a 'path' menu option. This would allow
> users to add packages (either custom made or standard downloads) which
> could live in a folder that does not get wiped clean with each new
> PsychoPy update.
> Is there a "safe" place to put packages (or a file with path
> extensions) so that they won't be wiped out upon upgrade?  I just put
> stuff in /Applications/PsychoPy2.app/Contents/Resources/lib/
> python2.5 , but Jason tells me these will be wiped out when I upgrade
> PsychoPy.
>
>    
Jason's right, we need to setup a path possibility in user prefs to make 
it resilient to upgrades of the standalone psychopy. Actually, upgrades 
that are installed automatically are fine. But major upgrades (with a 
new binary) will not have your .pth file.
> As a python and Mac user who is relatively new to PsychoPy, I am a
> little confounded by the standalone environment - mostly because I
> don't have access to my system python with all of the packages I have
> installed, including custom utility packages.
> The fixes suggested are good as long as they can survive Psychopy
> upgrades.  But path extensions and pasting in code from site-packages
> (system) to site-packages (PsychoPy) will only work for packages
> without special (e.g. clib) dependencies. For these latter types, it
> would also be useful for psychopy to have an easy way to build/install
> new packages.  These new packages could also reside in a site-packages
> folder that would be protected upon upgrade.
>    
I looked into the possibility of having psychopy actually install 
packages from other places to itself and it didn't work well at all.
But I think that experienced users, that already know how to install 
packages, could just use psychopy from their own python. You can install 
it with easy_install and then you 'just' have to get all the 
dependencies. The standalone is designed very much for the people that 
want to see an application rather than a framework.
> While I am at it, here are couple other things on my wish list for
> future PsychoPy release:
> (1) Packages:
>      pyserial (right now I already have it on PsychoPy v1.62.01 on Mac
> OS 10.5.8)
>    
agreed
>      parallel python (I have it on my system but not in psychopy
> python)
>    
do you mean pyparallel (for communication with the parallel port) or do 
you actually mean parallel python (for running multiple processes? Only 
the former really makes sense for psychopy in my view. I don't want to 
include all possible packages for use with python - just the ones useful 
for psych/vision/neuro experiments. Otherwise I'll spend my life just 
doing packaging.
> (2) An Ipython terminal that you can launch from the PsychoPy GUI that
> would be running PsychoPy's python. This would be helpful for testing
> bits of code; it would let users interrogate the contents of the 'new'
> python environment; and it would make me feel more at home as a python
> programmer using PsychoPy.
>    
Yes, am planning to add a shell like this, but it may be the pycrust 
shell instead of ipython - I think that will be easier so get included 
quicker. Happy to be corrected if someone knows how to build ipython 
into a wx app.
all the best,
Jon
do you mean pyparallel (for communication with the parallel port) or do you actually mean parallel python (for running multiple processes? Only the former really makes sense for psychopy in my view. I don't want to include all possible packages for use with python - just the ones useful for psych/vision/neuro experiments. Otherwise I'll spend my life just doing packaging.
parallel python (I have it on my system but not in psychopy
python)
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.
1 is the tricky part, but it's done and about to be released
2 has begun and will happen gradually as we think of more things that 
could be logged
3 will evolve over the next couple of versions of psychopy.
Jon
This development is too sudden for me to add it in this release - I want 
to do some thinking and testing first. But for those that want to have a 
look at option 1 above, all you need to do is go to 
psychopy/app/coder/coder.py and change the lines around 940 to look like 
this:
         #create output viewer
         self._origStdOut = sys.stdout#keep track of previous output
         self._origStdErr = sys.stderr
#        self.outputWindow = 
stdOutRich.StdOutRich(self,style=wx.TE_MULTILINE|wx.TE_READONLY, 
size=wx.Size(400,400))
#        self.outputWindow.write('Welcome to PsychoPy2!\n')
#        self.outputWindow.write("v%s\n" %self.app.version)
         import IPython.gui.wx.ipython_view
         self.outputWindow = 
IPython.gui.wx.ipython_view.IPShellWidget(parent=self, 
background_color='WHITE')
         #turn off threading - interferes with pygame thread
         self.outputWindow.options['threading']['value']='False'
         self.outputWindow.IP.set_threading(False)
         self.outputWindow.threading_option.SetValue(False)
         #allow a write fmethod for the window
         self.outputWindow.cout.write = self.outputWindow.text_ctrl.write
         self.outputWindow.write = self.outputWindow.text_ctrl.write
         #set background to white
         
self.outputWindow.options['background_color']['value']='WHITE'#this 
setting isn't used by __init__ apparently
         
self.outputWindow.text_ctrl.setBackgroundColor(self.outputWindow.options['background_color']['value'])
         self.outputWindow.background_option.SetValue(True)
         self.outputWindow.updateOptionTracker('background_color',
                                  
self.outputWindow.options['background_color']['value'])
         #scintilla autocompletion method
         self.outputWindow.completion_option.SetValue(True)
         self.outputWindow.options['completion']['value']='STC'
         
self.outputWindow.text_ctrl.setCompletionMethod(self.outputWindow.options['completion']['value'])
         self.outputWindow.updateOptionTracker('completion',
                                  
self.outputWindow.options['completion']['value'])
         self.outputWindow.text_ctrl.SetFocus()
-- 
Dr. Jonathan Peirce
Nottingham Visual Neuroscience
Either way, like Andy, I think having ipython would be really great;
also, this is only slightly related, but if folks are interested in
just doing smallish code snippet testing, I find Reinteract really
nice for this.
--jason
---
Jason Gors
Dartmouth College
Dept. of Psychological and Brain Sciences
6207 Moore Hall
Hanover, NH 03755
Phone: (603) 646-9689    Fax: (603) 646-1419
On 09/12/2010 14:04, jason gors wrote:
> Your (1) sounds really nice, but it's not
> clear to me why this might be preferable
-- 
Dr. Jonathan Peirce
Nottingham Visual Neuroscience