From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id E6FDE1396 for ; Wed, 10 Feb 2016 11:19:24 +0100 (CET) Received: by mail-wm0-f47.google.com with SMTP id g62so19894824wme.0 for ; Wed, 10 Feb 2016 02:19:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=qnmSnIUc7CMnlIw3xXiw4CNFi01B+hrbPOgwZuMM5e4=; b=ortu4PU9ApUr9s+Ow0mDk9+Mx6wpO0x6aeJz9OfyNU5+QeEnKG8rWJlBrsXaqh5J1M i/xuNbXKFZ39HUKbMv0DLrcyKWj4j5wwb/tcnjl5olN6jNkI9cfl1iGchzcWEDUdjOzn pfJSJOIZrYdbRI3kjGM8Mul24duA/392qWpN8cu5RrdW+sGdwY46h26+S51iMw/J6dbk 1ap1l/HpCsRpdJgQjmLpgQ3JSz7mZGHVjDMJmjOmw3PA8zl6my1EFdUY6N5XHTq/Jo3E H9iRfH4AVxeAxgjBWi3HCSmTAFbqSLVkYTRHHyqrWr0ctcusoHdat1ojY71OiDer8Ysf tYUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=qnmSnIUc7CMnlIw3xXiw4CNFi01B+hrbPOgwZuMM5e4=; b=BZJjMFcPJS4IyFFFvLpzAle/RM0Wi+GQ2737GDluMbD7FQocCYdFUnYyHRh4E8TKCO XOTslARPB3kSfCTNI2d4vnhi8ywTGPxC7klr6GiodJYeSGaNBl/TNcDJg79QokIS/TdC rZ6dPfCQi3PJjYrSh3SgZYXnWZxGuILB6FNVBhx31QaI8frkhDZIIl1+ntJw9kbkxrek m5VXOoAPRYbl+1+JKSgO4GG4d1NY5wOaKFUxxGNIQYA32exOctTFjOfA34o6xgkmccJB StyOXPHb/3+Dqjq3dJR3zJ7eJ2BCsYl/mW6Im6Ls/WYJNAnDlexvZQSVEAfZ5B1qWEjK rnIw== X-Gm-Message-State: AG10YOQimJ/NOT7CUSC187sTZcDmGv15s3B0tN2AR/RV96J4pD/3e7UJOxw96ez2l3mnDRGI X-Received: by 10.194.156.199 with SMTP id wg7mr45453296wjb.114.1455099564777; Wed, 10 Feb 2016 02:19:24 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id i2sm2224458wjx.42.2016.02.10.02.19.24 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Feb 2016 02:19:24 -0800 (PST) From: Thomas Monjalon To: harry.van.haaren@intel.com Date: Wed, 10 Feb 2016 11:17:59 +0100 Message-ID: <1783256.VunOTqGCns@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1455098706-23765-4-git-send-email-thomas.monjalon@6wind.com> References: <1455098706-23765-1-git-send-email-thomas.monjalon@6wind.com> <1455098706-23765-4-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: web@dpdk.org Subject: Re: [dpdk-web] [PATCH 3/3] local: open in a browser X-BeenThere: web@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: website maintenance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 10:19:25 -0000 As this mailing-list needs some animation, I reply to myself: 2016-02-10 11:05, Thomas Monjalon: > When starting the local server the URL is printed and automatically open > in the default browser. > A delay is introduced to wait server initialization and avoid an error > page in the browser. > > Signed-off-by: Thomas Monjalon [...] > +def open_browser(): > + subprocess.call(["xdg-open", url]) > + > +url = "http://localhost:%d" % port > +print(url) > +threading.Timer(1, open_browser).start() I don't like opening a client in the server script. I would prefer to put it in the Makefile: local: + (sleep 1 && xdg-open http://localhost:8000) & $(PYTHON2) scripts/serve_local.py