Exemplo n.º 1
0
        def get_current_session():
            ret, id = CPLDirect.cpl_get_current_session()

            if not CPLDirect.cpl_is_ok(ret):
                raise CPLException("Could not get current session " +
                       CPLDirect.cpl_error_string(ret), ret)

            return id
Exemplo n.º 2
0
        def get_current_session():
            ret, id = CPLDirect.cpl_get_current_session()

            if not CPLDirect.cpl_is_ok(ret):
                raise CPLException("Could not get current session " +
                       CPLDirect.cpl_error_string(ret), ret)

            return id
		def get_current_session():
			idp = CPLDirect.new_cpl_id_tp()
			ret = CPLDirect.cpl_get_current_session(idp)

			if not CPLDirect.cpl_is_ok(ret):
				CPLDirect.delete_cpl_id_tp(idp)
				raise Exception("Could not get current session" +
				       CPLDirect.cpl_error_string(ret))

			s = CPLDirect.cpl_id_tp_value(idp)
			i = copy_id(s)
			CPLDirect.delete_cpl_id_tp(idp)
			return i
Exemplo n.º 4
0
        def get_current_session():
            idp = CPLDirect.new_cpl_id_tp()
            ret = CPLDirect.cpl_get_current_session(idp)

            if not CPLDirect.cpl_is_ok(ret):
                CPLDirect.delete_cpl_id_tp(idp)
                raise Exception("Could not get current session" +
                                CPLDirect.cpl_error_string(ret))

            s = CPLDirect.cpl_id_tp_value(idp)
            i = copy_id(s)
            CPLDirect.delete_cpl_id_tp(idp)
            return i