# height = 400
rownames = 'c("' + '","'.join(rownames) + '")'
colnames = 'c("' + '","'.join(colnames) + '")'
+
if not intxt :
#FIXME
txt = """
nbcl = len(title)
nbwords = len(words)
txt = barplot(tableout, words, title, self.Source.parent.RscriptsPath['Rgraph'], tmpgraph)
+ #print 'ATTENTION TEST R'
+ #txt = """
+ #sink('/Users/pierre/Desktop/qdfqsdfqsdfqsdf.txt')
+ #Sys.getlocale()
+ #sink()
+ #"""
tmpscript = tempfile.mktemp(dir=self.Source.parent.TEMPDIR)
file = open(tmpscript,'w')
file.write(txt)
- ou laisser IRamuteq les installer automatiquement en cliquant sur VALIDER .
Les bibliothèques seront téléchargées depuis le site miroir de R %s.
""" % (txt, self.pref.get('iramuteq','rmirror'))
- dial = wx.MessageDialog(self, msg, u"Installation incomplète", wx.OK | wx.CANCEL | wx.NO_DEFAULT | wx.ICON_WARNING)
+ dial = wx.MessageDialog(self, msg, u"Installation incomplète", wx.OK | wx.CANCEL | wx.ICON_WARNING)
dial.CenterOnParent()
val = dial.ShowModal()
if val == wx.ID_OK :
class PrefUCECarac(wx.Dialog):
def __init__(self, parent, *args, **kwds):
kwds['style'] = wx.DEFAULT_DIALOG_STYLE
- kwds['title'] = u"UCE caractéristiques"
+ kwds['title'] = u"Segments de texte caractéristiques"
wx.Dialog.__init__(self, *args, **kwds)
self.parent = parent
first = wx.BoxSizer(wx.VERTICAL)
sizer = wx.FlexGridSizer(0,2,0,0)
self.label_type = wx.StaticText(self, -1, u"Score de classement")
sizer.Add(self.label_type, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
- self.radio_type = wx.RadioBox(self, -1, u"", choices=[u'absolu (somme des chi2 des formes marquées de l\'UCE)', u'relatif (moyenne des chi2 des formes marquées de l\'UCE)'], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
+ self.radio_type = wx.RadioBox(self, -1, u"", choices=[u'absolu (somme des chi2 des formes marquées du segment)', u'relatif (moyenne des chi2 des formes marquées du segment)'], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
sizer.Add(self.radio_type, 0, wx.ALIGN_RIGHT, 5)
- self.txt_eff = wx.StaticText(self, -1, u"Nombre d\'UCE maximum")
+ self.txt_eff = wx.StaticText(self, -1, u"Nombre maximum de segments de texte")
sizer.Add(self.txt_eff, 0, wx.ALIGN_CENTRE, 5)
self.spin_eff = wx.SpinCtrl(self, -1, '', size = (100, 30), min = 1, max = 100000, initial = 50)
+ self.spin_eff.SetValue(50)
sizer.Add(self.spin_eff, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
first.Add(sizer, 0, wx.ALL, 5)
btnsizer = wx.StdDialogButtonSizer()
if sys.platform == 'darwin' :
try :
macversion = platform.mac_ver()[0].split('.')
- print macversion
if int(macversion[1]) < 5 :
needX11 = True
else :
needX11 = False
rpath = rpath.replace('\\','\\\\')
+ env = os.environ.copy()
+ if sys.platform == 'darwin' and 'LC_ALL' not in env:
+ env['LC_ALL'] = 'en_US.UTF-8'
if not graph :
if wait :
if sys.platform == 'win32':
error = call(["%s" % rpath, "--vanilla","--slave","-f", "%s" % rcode])
else :
- error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"])
+ error = call([rpath, '--slave', "--vanilla", "-f %s" % rcode, "--encoding=UTF-8"], env = env)
return error
else :
if sys.platform == 'win32':
pid = Popen(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode])
else :
- pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE)
+ pid = Popen([rpath, '--slave', "--vanilla", "-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE, env = env)
return pid
else :
if wait :
error = call(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode])
elif sys.platform == 'darwin' and needX11:
os.environ['DISPLAY'] = ':0.0'
- error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"])
+ error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], env = env)
else :
- error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"])
+ error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], env = env)
return error
else :
if sys.platform == 'win32':
pid = Popen(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode])
elif sys.platform == 'darwin' and needX11:
os.environ['DISPLAY'] = ':0.0'
- pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE)
+ pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE, env = env)
else :
- pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE)
+ pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE, env = env)
return pid
def check_Rresult(parent, pid) :
##########################################################
#encodage
if sys.platform == 'darwin' :
- sys.setdefaultencoding('utf-8')
- wx.SetDefaultPyEncoding('utf-8')
+ sys.setdefaultencoding('UTF-8')
+ wx.SetDefaultPyEncoding('UTF-8')
else :
sys.setdefaultencoding(locale.getpreferredencoding())
+
#chemin de l'application
-try :
- AppliPath = sys._MEIPASS
-except :
- AppliPath = os.path.abspath(os.path.dirname(os.path.realpath(sys.argv[0])))
+AppliPath = os.path.abspath(os.path.dirname(os.path.realpath(sys.argv[0])))
#chemin des images
ImagePath = os.path.join(AppliPath, 'images')
#configuration generale
OPTIONS = {'argv_emulation': True,
'emulate_shell_environment': True,
'iconfile':('images/iraicone.icns'),
- 'optimize': 1}
+ 'optimize': 2}
setup(
app=APP,