We're Hiring!

getting the address of the server

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

getting the address of the server

Postby bhcho » Mon Jul 18, 2011 5:25 pm

Hi all,

just quick question.

when I connect to a local omero server (localhost) by
Code: Select all
server = 'localhost'
port = 4064
client = omero.client( server, port )
session = client.createSession( username, password )


is there anyway to retrieve the full address of the server (such as omero.aaa.edu)?
(getPropertyMap will give me 'localhost')

Best,
BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: getting the address of the server

Postby jmoore » Mon Jul 18, 2011 7:59 pm

There's no OMERO-specific way to do that, no. The Python "socket" module has some functions that may be of use.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 0 guests