Commit a788c7cfda9bed8aab83977cf4d576a62b945b50

Authored by Paulo Henrique Junqueira Amorim
1 parent f27a6f80

ENH: Removed unused module

Showing 1 changed file with 0 additions and 62 deletions   Show diff stats
invesalius/update.py
... ... @@ -1,62 +0,0 @@
1   -#!/usr/local/bin/python
2   -#--------------------------------------------------------------------------
3   -# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
4   -# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
5   -# Homepage: http://www.softwarepublico.gov.br
6   -# Contact: invesalius@cti.gov.br
7   -# License: GNU - GPL 2 (LICENSE.txt/LICENCA.txt)
8   -#--------------------------------------------------------------------------
9   -# Este programa e software livre; voce pode redistribui-lo e/ou
10   -# modifica-lo sob os termos da Licenca Publica Geral GNU, conforme
11   -# publicada pela Free Software Foundation; de acordo com a versao 2
12   -# da Licenca.
13   -#
14   -# Este programa eh distribuido na expectativa de ser util, mas SEM
15   -# QUALQUER GARANTIA; sem mesmo a garantia implicita de
16   -# COMERCIALIZACAO ou de ADEQUACAO A QUALQUER PROPOSITO EM
17   -# PARTICULAR. Consulte a Licenca Publica Geral GNU para obter mais
18   -# detalhes.
19   -#-------------------------------------------------------------------------
20   -
21   -
22   -import wx
23   -import urllib2
24   -import sys
25   -import platform
26   -import i18n
27   -
28   -
29   -if (len(sys.argv)>2):
30   - print "Usage: python update.py <language>"
31   - sys.exit()
32   -
33   -if (len(sys.argv)==1):
34   - print "No language specified. Assuming english (en)."
35   - lang = 'en'
36   -else:
37   - lang = sys.argv[1]
38   -
39   -print lang
40   -# Check if there is a language set (if session file exists
41   -_ = i18n.InstallLanguage(lang)
42   -
43   -print "Checking updates..."
44   -URL = "http://www.cti.gov.br/dt3d/invesalius/update/checkupdate_"+sys.platform+"_"+platform.architecture()[0]+".php"
45   -#URL = "http://home.ruppert.com.br/aaa.php"
46   -response = urllib2.urlopen(URL,timeout=5)
47   -last = response.readline().rstrip()
48   -url = response.readline().rstrip()
49   -if (last!="3.0 beta 3"):
50   - print " ...New update found!!! -> version:", last #, ", url=",url
51   - from time import sleep
52   - sleep(1)
53   - app=wx.App()
54   - msg=_("A new version of InVesalius is available. Do you want to open the download website now?")
55   - title=_("Invesalius Update")
56   - msgdlg = wx.MessageDialog(None,msg,title, wx.YES_NO | wx.ICON_INFORMATION)
57   - if (msgdlg.ShowModal()==wx.ID_YES):
58   - wx.LaunchDefaultBrowser(url)
59   - msgdlg.Destroy()
60   - app.MainLoop()
61   -
62   -