| I don't know really; csndsugui uses sugar.activity, which AFAIK is
not designed for the command-line. Perhaps you should just use
PyGTK directly.
Victor
----- Original Message -----
From: "Art Hunkins"
To:
Sent: Thursday, March 12, 2009 11:23 PM
Subject: [Csnd] Re: Re: Re: Re: Python script to embed csd's for OLPC
> Victor et al. -
>
> Before I get too deeply involved with GUI's and csndsugui, I'd like to
> make sure it's not possible to create "normal" (i.e., non-GUI) Python
> scripts as Sugar Activities (simulating the command line).
>
> My Activities could really take advantage an opening text dialog (as well
> as explanatory text) as a way of choosing among versions (.csd's) and to
> set variables/options. So, no required graphics at all. The only real
> trick will be to call the appropriate .csd at the end of the dialog, and I
> assume that an "import csd" would take care of this.
>
> If such is possible, I'd appreciate some guidance as to which parts of
> waves.py (from Victor's Waves.activities) might be necessary as a base to
> create this "hybrid."
>
> Art Hunkins
>
> ----- Original Message -----
> From: "victor"
> To:
> Sent: Wednesday, March 11, 2009 6:03 PM
> Subject: [Csnd] Re: Re: Re: Python script to embed csd's for OLPC
>
>
>> That is how it is done. You create your activity as per the
>> OLPC sugar recipes. The command-line is not really thought
>> as the main interface in the system and kids/educators are
>> not really being expected to use it.
>>
>> No sugar Activity is really designed to be run from the command-line.
>> The csndsugui project is there to allow an easier integration of
>> csound and activities, but you need to learn how to build activities
>> (the basics at least) first. The OLPC wiki and sugar labs wiki have
>> very good pages about it.
>>
>> Victor
>>
>>>
>>> 2) Assuming it is not, how do you practically develop a Python GUI
>>> application for the OLPC? Do you need to install some other Activity,
>>> like one of Victor's, modify it with your code, get it to work, then
>>> create a new .xo bundle to install? (Ouch!)
>>>
>>> Or do you try to develop it on another machine? I installed Python 2.5
>>> on my Windows XP, and can't get Brian's files (along with csndsugui) to
>>> work there. "Install pygtk" can't find pygtk (it isn't part of Python
>>> 2.5 for Windows apparently). Is there something reasonable I can do to
>>> use csndsugui on Windows?
>>>
>>> Frankly, I still hope that maybe command-line Python on the OLPC, with
>>> csndsugui, will work. This would seem the simplest, most straightforward
>>> possibility. Meanwhile, I remain one "stymied developer".
>>>
>>> Art Hunkins
>>>
>>> ----- Original Message -----
>>> From: "victor"
>>> To:
>>> Sent: Tuesday, March 10, 2009 5:25 AM
>>> Subject: [Csnd] Re: Re: Re: Re: Re: Python script to embed csd's for
>>> OLPC
>>>
>>>
>>>> You will need to move the activity bundles to the top-level
>>>> activities; GIT is just a repository, not a packaging system,
>>>> so things don't get 'installed'.
>>>>
>>>> Do something like this (from the csndsugui directory)
>>>>
>>>> $ cp -R *.activity ~/Activities/
>>>>
>>>> and then restart X
>>>>
>>>> They should pop up in the activity list or bar (depending
>>>> on the version of sugar you are using).
>>>>
>>>> Then you can edit the CSD/python files (but not csndsugui.py) to
>>>> do what you want. For error logs you can look in the files in
>>>>
>>>> .sugar/default/logs/
>>>>
>>>> (from the home directory, ~)
>>>>
>>>> Victor
>>>>
>>>> ----- Original Message -----
>>>> From: "Art Hunkins"
>>>> To:
>>>> Sent: Tuesday, March 10, 2009 1:39 AM
>>>> Subject: [Csnd] Re: Re: Re: Re: Python script to embed csd's for OLPC
>>>>
>>>>
>>>>> Victor,
>>>>>
>>>>> When installing csndsugui via git-clone, this is where they get
>>>>> installed. But it is the *csndsugui* directory that is installed in
>>>>> Activities; Synth.activity, Waves.activity, etc. are installed in
>>>>> sub-directories of csndsugui. Does this fact perhaps make your
>>>>> activities invisible to Sugar?
>>>>>
>>>>> I've not been able to move any of your activities directly to the
>>>>> Activities folder; frankly, I don't know where they are disappearing
>>>>> to. For example, I do (from csndsugui): mv synth.activity Activities,
>>>>> and synth.activity vanishes (no trace even after restart).
>>>>>
>>>>> Actually, all I really want to do is to use csndsugui.py to create a
>>>>> GUI for my .csd's. Must the user download/install your *entire*
>>>>> csndsugui project (as I'm having trouble with), or is the only
>>>>> requirement that the single file, csndsugui.py, be included in the
>>>>> same directory with my .csd/.py?
>>>>>
>>>>> Sorry to be so completely confused.
>>>>>
>>>>> Art Hunkins
>>>>>
>>>>> ----- Original Message -----
>>>>> From: "victor"
>>>>> To:
>>>>> Sent: Monday, March 09, 2009 6:43 PM
>>>>> Subject: [Csnd] Re: Re: Re: Python script to embed csd's for OLPC
>>>>>
>>>>>
>>>>>> you need to put them in the Activities directory in
>>>>>> your home directory. Then restart X (ctl-alt-del).
>>>>>>
>>>>>> Victor
>>>>>>
>>>>>> ----- Original Message -----
>>>>>> From: "Art Hunkins"
>>>>>> To:
>>>>>> Sent: Monday, March 09, 2009 10:19 PM
>>>>>> Subject: [Csnd] Re: Re: Python script to embed csd's for OLPC
>>>>>>
>>>>>>
>>>>>>> I've not been able to run them from the sugar UI, as they don't show
>>>>>>> up in my list of activities. I've tried the git-clone download
>>>>>>> several times (after deletion and after completely redoing my
>>>>>>> system). Downloading/installing Csound-editor exhibits the same
>>>>>>> problem; however, in this case, I can get into the directory and run
>>>>>>> it from the command line (or at least the GUI shows up).
>>>>>>>
>>>>>>> The "normal" activities (.xo bundles from the laptop.org Activities
>>>>>>> page) install fine, but I've had no luck with your and Greg's
>>>>>>> project/activities.
>>>>>>>
>>>>>>> I presume when you talk about running from the sugar UI, you're
>>>>>>> clicking on their Activity listing icon. Correct?
>>>>>>>
>>>>>>> What can be causing these activities not to show up on my list? They
>>>>>>> are seemingly installed; during download they show no error
>>>>>>> messages.
>>>>>>>
>>>>>>> Art Hunkins
>>>>>>>
>>>>>>> ----- Original Message -----
>>>>>>> From: "victor"
>>>>>>> To:
>>>>>>> Sent: Monday, March 09, 2009 4:33 AM
>>>>>>> Subject: [Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Python script to
>>>>>>> embed csd's for OLPC
>>>>>>>
>>>>>>>
>>>>>>>> Not sure. I have never run Activities from the command line, I
>>>>>>>> always run them from the sugar UI. I am not sure they are meant
>>>>>>>> to be run from the terminal.
>>>>>>>>
>>>>>>>> Victor
>>>>>>>> ----- Original Message -----
>>>>>>>> From: "Felipe Sateler"
>>>>>>>> To:
>>>>>>>> Sent: Monday, March 09, 2009 2:01 AM
>>>>>>>> Subject: [Csnd] Re: Re: Re: Re: Re: Re: Re: Python script to embed
>>>>>>>> csd's for OLPC
>>>>>>>>
>>>>>>>>
>>>>>>>>> There is the possibility that the files have Victor's ownership,
>>>>>>>>> and
>>>>>>>>> thus your user can't write to them. The pyc files are
>>>>>>>>> automatically
>>>>>>>>> generated by python when you execute a py files. Check the output
>>>>>>>>> of
>>>>>>>>> ls -l $file to determine if you have the right access permissions
>>>>>>>>>
>>>>>>>>> On Mon, Mar 9, 2009 at 12:56, Art Hunkins
>>>>>>>>> wrote:
>>>>>>>>>> I've no idea.
>>>>>>>>>>
>>>>>>>>>> They're Victor's files, and I did nothing special in relation to
>>>>>>>>>> them. I
>>>>>>>>>> didn't know writing was involved. Hopefully, Victor has some
>>>>>>>>>> idea.
>>>>>>>>>>
>>>>>>>>>> Art Hunkins
>>>>>>>>>>
>>>>>>>>>> ----- Original Message ----- From: "Felipe Sateler"
>>>>>>>>>>
>>>>>>>>>> To:
>>>>>>>>>> Sent: Sunday, March 08, 2009 9:48 PM
>>>>>>>>>> Subject: [Csnd] Re: Re: Re: Re: Re: Python script to embed csd's
>>>>>>>>>> for OLPC
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Do you have write access to those files/directories?
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Mar 9, 2009 at 12:18, Art Hunkins
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Victor,
>>>>>>>>>>>>
>>>>>>>>>>>> Today I tried (on OLPC) to run your two Activities, Waves and
>>>>>>>>>>>> synth -
>>>>>>>>>>>> from
>>>>>>>>>>>> their respective directories within csndsugui. I ran both
>>>>>>>>>>>> with -d and -v
>>>>>>>>>>>> flags.
>>>>>>>>>>>>
>>>>>>>>>>>> Among the myriad of messages output, two in each run may have
>>>>>>>>>>>> some
>>>>>>>>>>>> significance, and be related to why I'm getting no joy. (Both
>>>>>>>>>>>> activities
>>>>>>>>>>>> run
>>>>>>>>>>>> for about two seconds and come back to the command line
>>>>>>>>>>>> "normally".)
>>>>>>>>>>>>
>>>>>>>>>>>> The messages:
>>>>>>>>>>>> /home/olpc/Activities/csndsugui/Waves.activity/csndsugui.pyc
>>>>>>>>>>>> has bad
>>>>>>>>>>>> mtime
>>>>>>>>>>>> and several lines later
>>>>>>>>>>>> can't create
>>>>>>>>>>>> /home/olpc/Activities/csndsugui/Waves.activity/csndsugui.pyc
>>>>>>>>>>>>
>>>>>>>>>>>> (Of course, synth.activity substitutes synth.) BTW, both .pyc's
>>>>>>>>>>>> are (or
>>>>>>>>>>>> have
>>>>>>>>>>>> been) created (obviously compiled code with sporadic portions
>>>>>>>>>>>> of what
>>>>>>>>>>>> looks
>>>>>>>>>>>> like csndsugui.py scattered throughout).
>>>>>>>>>>>>
>>>>>>>>>>>> The installed Python version is 2.5.1.
>>>>>>>>>>>>
>>>>>>>>>>>> Any ideas?
>>>>>>>>>>>>
>>>>>>>>>>>> Art Hunkins
>>>>>>>>>>>>
>>>>>>>>>>>> ----- Original Message ----- From: "victor"
>>>>>>>>>>>>
>>>>>>>>>>>> To:
>>>>>>>>>>>> Sent: Thursday, March 05, 2009 6:42 PM
>>>>>>>>>>>> Subject: [Csnd] Re: Re: Re: Python script to embed csd's for
>>>>>>>>>>>> OLPC
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> This is basically explained in:
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://wiki.laptop.org/go/Activity_tutorial
>>>>>>>>>>>>>
>>>>>>>>>>>>> it's a bundle (a directory with all the required files). Your
>>>>>>>>>>>>> CSD and
>>>>>>>>>>>>> python script go there. You will need to include csndsugui.py
>>>>>>>>>>>>> in the
>>>>>>>>>>>>> bundle.
>>>>>>>>>>>>> Look at the examples in
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://git.sugarlabs.org/projects/csndsugui
>>>>>>>>>>>>>
>>>>>>>>>>>>> (you can get them using git clone...)
>>>>>>>>>>>>>
>>>>>>>>>>>>> Victor
>>>>>>>>>>>>>
>>>>>>>>>>>>> ----- Original Message ----- From: "Art Hunkins"
>>>>>>>>>>>>>
>>>>>>>>>>>>> To:
>>>>>>>>>>>>> Sent: Thursday, March 05, 2009 10:28 PM
>>>>>>>>>>>>> Subject: [Csnd] Re: Re: Python script to embed csd's for OLPC
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Victor,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Where does a Python script have to be located and run from to
>>>>>>>>>>>>>> be able
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> find csndsugui? It is installed normally on my OLPC, and a
>>>>>>>>>>>>>> script run
>>>>>>>>>>>>>> from a
>>>>>>>>>>>>>> thumb drive cannot find it.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Art Hunkins
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> ----- Original Message ----- From: "victor"
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> To:
>>>>>>>>>>>>>> Sent: Thursday, March 05, 2009 4:23 PM
>>>>>>>>>>>>>> Subject: [Csnd] Re: Python script to embed csd's for OLPC
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> See:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://wiki.laptop.org/go/Csndsugui
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Victor
>>>>>>>>>>>>>>> ----- Original Message ----- From: "Art Hunkins"
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> To:
>>>>>>>>>>>>>>> Sent: Thursday, March 05, 2009 9:12 PM
>>>>>>>>>>>>>>> Subject: [Csnd] Python script to embed csd's for OLPC
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Since Python opcodes are absent from OLPCsound, I'd like to
>>>>>>>>>>>>>>>> try
>>>>>>>>>>>>>>>> embedding csd's in a Python script. My thought is to have
>>>>>>>>>>>>>>>> an opening
>>>>>>>>>>>>>>>> Python
>>>>>>>>>>>>>>>> "initialization dialog" allowing the performer to set
>>>>>>>>>>>>>>>> initialization
>>>>>>>>>>>>>>>> values
>>>>>>>>>>>>>>>> (accessed via chnget), then embark on real-time
>>>>>>>>>>>>>>>> performance. No
>>>>>>>>>>>>>>>> performance-time interaction. The run concludes as usual
>>>>>>>>>>>>>>>> with Ctrl-C.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Can someone point me to a Csound .py script that does just
>>>>>>>>>>>>>>>> this? (I'm
>>>>>>>>>>>>>>>> thinking that such a dialog could well substitute for a
>>>>>>>>>>>>>>>> "setup GUI",
>>>>>>>>>>>>>>>> and
>>>>>>>>>>>>>>>> would not require other software, such as the csndsugui
>>>>>>>>>>>>>>>> activity, to
>>>>>>>>>>>>>>>> be
>>>>>>>>>>>>>>>> downloaded.)
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Art Hunkins
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
|