Re: [PyKDE] Re: eric3 python-site files not found
Am Samstag, 30. November 2002 02:18 schrieb Hans-Peter Jansen: On Friday 29 November 2002 22:03, Arno Paehler wrote: Hi Detlev, I now tried Hans-Peter's script and the problem goes away. Maybe SuSE need to revise the way they build their rpm. Before I start bugging some people at SuSE, I would like to understand the problem. Phil? As stated before, I see some importance to get this fixed before their next release. I will easily detect this when traffic in suse-beta ML arises again... In the meantime, we already know, how to fix this ;-) Jonathan: I will update sf.net release notes soon... There is another message that I get but that doesn't seem to affect eric3's operation. I just include it here for completeness. Arno - paehler@linux eric3 eric: no translation file 'qt_C'found. Using default. eric: no translation file 'qscintilla_C'found. Using default. eric: no translation file 'eric3_C'found. Using default. Please report to [EMAIL PROTECTED]. Well, this is related to your locale setting and somewhat expected here. Maybe Detlef should handle this special case, as it doesn't make much sense to search for C locale translations in the first place. Correct. This will be fixed in the next release. Detlev -- Detlev Offenbach [EMAIL PROTECTED] ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Re: eric3 python-site files not found
Am Donnerstag, 28. November 2002 00:26 schrieb Hans-Peter Jansen: Hi Arno, what about subscribing PyKDE? Pretty low traffic ML. On Tuesday 26 November 2002 12:47, you wrote: Hi, when single-stepping through some of my python files with eric3 I get an error dialog with the message The file /var/tmp/python-2.2.1-build/usr/lib/python2.2/sre.py could not be opened. I am using python-2.2.1-45 from SuSE 8.1. I also have the rpm python-nothreads-2.2.1-45 installed, not sure whether that maytters. The same python files run fine outside of eric3. The filename in the message looks like a leftover from a build. The problem seems to be related to the way, how eric resolves the path of the source (using the path provided in the *.py{c,o} files). This clashes with the way, SuSE built their python package, which leads to these strange messages from eric. The problem is not related to eric3 as eric3 does not do any special path resolving. It relies purely on the Python mechanisms. As Hans-Peter as indicated it is a problem related to SuSE 8.1. Simply recompiling the python files by performing the following steps. cd /usr/lib/python2.2 python compileall.py -f . or use Hans-Peters script. Detlev -- Detlev Offenbach [EMAIL PROTECTED] ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Re: eric3 python-site files not found
Hi Detlev, I now tried Hans-Peter's script and the problem goes away. Maybe SuSE need to revise the way they build their rpm. There is another message that I get but that doesn't seem to affect eric3's operation. I just include it here for completeness. Arno - paehler@linux eric3 eric: no translation file 'qt_C'found. Using default. eric: no translation file 'qscintilla_C'found. Using default. eric: no translation file 'eric3_C'found. Using default. Please report to [EMAIL PROTECTED]. - On Friday 29 November 2002 10:21, Detlev Offenbach wrote: Am Donnerstag, 28. November 2002 00:26 schrieb Hans-Peter Jansen: Hi Arno, what about subscribing PyKDE? Pretty low traffic ML. On Tuesday 26 November 2002 12:47, you wrote: Hi, when single-stepping through some of my python files with eric3 I get an error dialog with the message The file /var/tmp/python-2.2.1-build/usr/lib/python2.2/sre.py could not be opened. I am using python-2.2.1-45 from SuSE 8.1. I also have the rpm python-nothreads-2.2.1-45 installed, not sure whether that maytters. The same python files run fine outside of eric3. The filename in the message looks like a leftover from a build. The problem seems to be related to the way, how eric resolves the path of the source (using the path provided in the *.py{c,o} files). This clashes with the way, SuSE built their python package, which leads to these strange messages from eric. The problem is not related to eric3 as eric3 does not do any special path resolving. It relies purely on the Python mechanisms. As Hans-Peter as indicated it is a problem related to SuSE 8.1. Simply recompiling the python files by performing the following steps. cd /usr/lib/python2.2 python compileall.py -f . or use Hans-Peters script. Detlev ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Re: eric3 python-site files not found
On Friday 29 November 2002 22:03, Arno Paehler wrote: Hi Detlev, I now tried Hans-Peter's script and the problem goes away. Maybe SuSE need to revise the way they build their rpm. Before I start bugging some people at SuSE, I would like to understand the problem. Phil? As stated before, I see some importance to get this fixed before their next release. I will easily detect this when traffic in suse-beta ML arises again... In the meantime, we already know, how to fix this ;-) Jonathan: I will update sf.net release notes soon... There is another message that I get but that doesn't seem to affect eric3's operation. I just include it here for completeness. Arno - paehler@linux eric3 eric: no translation file 'qt_C'found. Using default. eric: no translation file 'qscintilla_C'found. Using default. eric: no translation file 'eric3_C'found. Using default. Please report to [EMAIL PROTECTED]. Well, this is related to your locale setting and somewhat expected here. Maybe Detlef should handle this special case, as it doesn't make much sense to search for C locale translations in the first place. BTW, Try LC_CTYPE=de_DE@euro eric3 to enable the german translation. (I expect you to be a native german speaker, even if it appears, that you're sitting on the other side of the globe ;-) [...] Hans-Peter ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Re: eric3 python-site files not found
Hi Ricardo, I am aware of compileall.py, but it doesn't generate both flavors in one hitch, does it? Which flavor it generates seems to depend on the state of __debug__. Maybe it's enough to modify that, I will check that soonish. On Thursday 28 November 2002 01:21, Ricardo Javier Cardenes Medina wrote: On Thu, Nov 28, 2002 at 12:26:00AM +0100, Hans-Peter Jansen wrote: pycompile -vao Mmmh... Check for /usr/lib/python2.X/compileall.py. That script does the same and I think it's on the standard Python distribution. Thanks, Hans-Peter ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Re: eric3 python-site files not found
Hi Arno, Hi Arno, what about subscribing PyKDE? Pretty low traffic ML. On Tuesday 26 November 2002 12:47, you wrote: Hi, when single-stepping through some of my python files with eric3 I get an error dialog with the message The file /var/tmp/python-2.2.1-build/usr/lib/python2.2/sre.py could not be opened. I am using python-2.2.1-45 from SuSE 8.1. I also have the rpm python-nothreads-2.2.1-45 installed, not sure whether that maytters. The same python files run fine outside of eric3. The filename in the message looks like a leftover from a build. I am using SuSE 8.1 as well and haven't seen the described behaviour so far. Would it be possible for you, to send me one of your scripts that fails to run. The only difference I can see from your description is, that I don't have the python-nothreads-2.2.1-45 package installed. It could be possible, that your Python tries to execute a script compiled/optimized with one version with the other one. At the moment I don't have any other clue. The problem seems to be related to the way, how eric resolves the path of the source (using the path provided in the *.py{c,o} files). This clashes with the way, SuSE built their python package, which leads to these strange messages from eric. I solved this problem with the attached script: Hans-Peter, what do you mean by that. I am not aware of any special path resolving in eric (but maybe that's deep in the old code that I haven't touched). Detlev -- Detlev Offenbach [EMAIL PROTECTED] ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Re: eric3 python-site files not found
On Thursday 28 November 2002 21:22, Detlev Offenbach wrote: Hi Arno, Hi Arno, what about subscribing PyKDE? Pretty low traffic ML. On Tuesday 26 November 2002 12:47, you wrote: Hi, when single-stepping through some of my python files with eric3 I get an error dialog with the message The file /var/tmp/python-2.2.1-build/usr/lib/python2.2/sre.py could not be opened. I am using python-2.2.1-45 from SuSE 8.1. I also have the rpm python-nothreads-2.2.1-45 installed, not sure whether that maytters. The same python files run fine outside of eric3. The filename in the message looks like a leftover from a build. I am using SuSE 8.1 as well and haven't seen the described behaviour so far. Would it be possible for you, to send me one of your scripts that fails to run. The only difference I can see from your description is, that I don't have the python-nothreads-2.2.1-45 package installed. It could be possible, that your Python tries to execute a script compiled/optimized with one version with the other one. At the moment I don't have any other clue. The problem seems to be related to the way, how eric resolves the path of the source (using the path provided in the *.py{c,o} files). This clashes with the way, SuSE built their python package, which leads to these strange messages from eric. I solved this problem with the attached script: Hans-Peter, what do you mean by that. I am not aware of any special path resolving in eric (but maybe that's deep in the old code that I haven't touched). Detlev, please try this: strings -f /usr/lib/python2.2/*.py[co] | grep /var/tmp/ I bet, you will find a lot of matches. Try single stepping through one of these, and you should see. Attached is a significantly speeded up version of my compile script. (works with a pipe and two, not n+1 python processes) Detlev Hans-Peter #! /usr/bin/env python usage: %s [-arv] [dirs/files] ... byte-compiles python files/dirs -a compile all files of current python installation -o optimized compile, too -r recursive behaviour -v verbose level (cumulative) dirs/files: to compile # (c)reated by Hans-Peter Jansen, LISA GmbH, Berlin # # Licence: GPL http://www.gnu.org/licenses/gpl.html # # 2002-11-27hpinitial version # 2002-11-28hppipe for optimized compile # # TODO: # - testing # # vim:set et ts=4 sw=4: import sys, os import getopt import glob import py_compile argv0 = os.path.basename(sys.argv[0]) optimize = 0 verbose = 0 optpipe = None def out(lvl, arg): if lvl verbose: return err(arg, sys.stdout) def err(arg, ch = sys.stderr): if arg: ch.write(arg) if arg[-1] != \n: ch.write(\n) else: ch.write(\n) ch.flush() def exit(ret=0, arg=None): if arg: out(0, %s: %s % (argv0, arg)) sys.exit(ret) def usage(ret=0, arg=None): if arg: out(0, %s: %s % (argv0, arg)) out(0, __doc__ % (argv0)) sys.exit(ret) def pycompile(path, recursive = 0, depth = 0): if os.path.isdir(path): for p in glob.glob(os.path.join(path, *)): if depth == 0 or recursive: pycompile(p, recursive, depth + 1) elif os.path.isfile(path): if path[-3:] == '.py': out(1, compiling %s % (path)) py_compile.compile(path) if optimize: out(1, compiling %s (opt) % (path)) optpipe.write(%s\n % path) optpipe.flush() else: out(1, %s ignored % (path)) if __name__ == '__main__': #global verbose, optimize try: optlist, args = getopt.getopt(sys.argv[1:], aorvO) except getopt.error, msg: usage(1, msg) all = 0 optimize = 0 recursive = 0 optproc = 0 for opt, par in optlist: if opt == '-a': all = 1 elif opt == '-o': optimize = 1 elif opt == '-r': recursive = 1 elif opt == '-v': verbose += 1 elif opt == '-O': optproc = 1 if optimize: # create a pipe to a slave process for optimized compile optpipe, stdout = os.popen2(python -O %s -O % (sys.argv[0])) elif optproc: # handle optimized compile here while 1: l = sys.stdin.readline() if not l: sys.exit(0) py_compile.compile(l[:-1]) if all: pyFullVers = sys.version.split()[0] vl = pyFullVers.split(.) pyVers = vl[0] + . + vl[1] pycompile(os.path.join(sys.prefix, lib/python + pyVers), 1) else: for p in args: pycompile(p, recursive) if optpipe: optpipe.close()