auto.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 #
00003 # Copyright 2011 Facebook
00004 #
00005 # Licensed under the Apache License, Version 2.0 (the "License"); you may
00006 # not use this file except in compliance with the License. You may obtain
00007 # a copy of the License at
00008 #
00009 #     http://www.apache.org/licenses/LICENSE-2.0
00010 #
00011 # Unless required by applicable law or agreed to in writing, software
00012 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00013 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
00014 # License for the specific language governing permissions and limitations
00015 # under the License.
00016 
00017 """Implementation of platform-specific functionality.
00018 
00019 For each function or class described in `tornado.platform.interface`,
00020 the appropriate platform-specific implementation exists in this module.
00021 Most code that needs access to this functionality should do e.g.::
00022 
00023     from tornado.platform.auto import set_close_exec
00024 """
00025 
00026 from __future__ import absolute_import, division, print_function, with_statement
00027 
00028 import os
00029 
00030 if os.name == 'nt':
00031     from tornado.platform.common import Waker
00032     from tornado.platform.windows import set_close_exec
00033 elif 'APPENGINE_RUNTIME' in os.environ:
00034     from tornado.platform.common import Waker
00035     def set_close_exec(fd):
00036         pass
00037 else:
00038     from tornado.platform.posix import set_close_exec, Waker
00039 
00040 try:
00041     # monotime monkey-patches the time module to have a monotonic function
00042     # in versions of python before 3.3.
00043     import monotime
00044 except ImportError:
00045     pass
00046 try:
00047     from time import monotonic as monotonic_time
00048 except ImportError:
00049     monotonic_time = None


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Thu Jun 6 2019 21:51:50