[AG-TECH] Developers - How to diferenciate between "creator" and "viewer"?

Christoph Willing c.willing at uq.edu.au
Tue May 18 07:44:46 CDT 2010


On 18/05/2010, at 7:12 AM, Jesus Cea Oliva wrote:

> Thanks Christoph again for your responses, that, always helps ;).
>
> It's possible install python 2.5 on newer Linux distributions and do  
> something for Access Grid "take" the python 2.5 modules? We have a  
> server with Ubuntu Karmic and reinstall the system is not possible  
> due to there are many programs installed for others purposes.
>

Although 2.6 is the default python on karmic, the official Ubuntu  
repos have versions 2.4 and 2.5 available too (even 3.1 actually).  
They can be installed at the same time. Applications can then call any  
of them explicitly e.g. application script could start with #!/usr/bin/ 
python2.6 or #!/usr/bin/python2.5 etc. Another mechanism to choose  
between them is to add python to the "alternatives" framework and then  
select the version you want to be the default using "update- 
alternatives".

So I think the answer is yes - you may be able to run python 2.5 on  
your server alongside 2.6. The AccessGrid applications all begin with  
#!/usr/bin/python so they should use whichever python is set as the  
default with update-alternatives.

To protect the other services your server is providing, you would want  
to check that those services are able to run OK in the different  
python environment.


> Thanks again for your help about differenciate rolles, I'll try as  
> soon as possible :).
>
> It's possible to "work" with the Server? I would like to have a DB  
> (sqlite?) for manage Tests (tests, students, etc) and it should be  
> on the Server due to concurrency issues. So, the shared application  
> should send the data to the server and, then, it insert this data  
> (or manipulate) to the DB.
>


There is a sqlite3 module for python so your idea would probably work  
OK. See:
     http://docs.python.org/library/sqlite3.html


chris


> El dia 17 may 2010 13:10, Christoph Willing <c.willing at uq.edu.au>  
> escribió:
> On 17/05/2010, at 6:41 AM, Jesus Cea Oliva wrote:
>
> Hi list!
>
> Firstly, any news about file uploading and sent/recive events? :P. I  
> have a virtual machine with Fedora 10 and there works all fine, so,  
> I'm working with this machine now.
>
> The fact that Fedora 10 uses python2.5 (and works correctly)  
> supports someone's idea that this is problem is related to the  
> python version being used; so far, all known non-working cases use  
> python2.6.
>
>
> Well, we are doing some Shared Applications for our project, like a  
> PDF Viewer or, now, I'm developing an application for create  
> evaluation tests and, later, do them.
>
> I need to differenciate two "roles" for my applications: the  
> "creator", I mean, the participant that "invokes" a Shared  
> Application; and the "viewer" or something like this, I mean, the  
> participant that receive the invitation of a Shared Application.  
> (sorry for the roles name xD)
>
> I would like to show differents windows for this roles. For example,  
> on the evaluation tests designer; the application shows to the  
> creator (a teacher, for example) a form to design a evaluation test.  
> However, if the participant is the "viewer" (a student, for  
> example), the application shows a evaluation test designed.
>
> On others Shared application, I would like to differenciate this  
> roles. It this possible?. How?
>
> I suggest you have a look at AccessGrid/AppMonitor.py - it shows how  
> to join a Shared App., obtain its state and then its description.  
> This description seems to include the name of whoever started the  
> app - as is shown if you right click->Open Monitor on any shared  
> app. In your applications, if your own profile's name matches that  
> of the app's creator then you would consider yourself the teacher,  
> otherwise a student.
>
>
> chris
>
>
> Christoph Willing +61 7 3365 8316
> QCIF Access Grid Manager
> University of Queensland
>
>

Christoph Willing                       +61 7 3365 8316
QCIF Access Grid Manager
University of Queensland



More information about the ag-tech mailing list