Re: [PyKDE] ANN: Packages for Eric, the Python IDE
Hola: El Mié 27 Nov 2002 19:39, Detlev Offenbach tecleó: > Do you mean below the editor? That wouldn't save any space because > the space on the right is used by the filesystem browser and the Yup, but I think it is better to see the console output with more width, as Quanta and other IDEs do. > post) but I think that doesn't save much because it would get rid > of some distinguishing features of the syntax highlighter. You You can group them. Anyway, it would be fine to setup the height. Thanks you for your time :) Greetings, -- Víctor R. Ruiz | - Todos estos momentos se perderán, como http://infoastro.com/rvr | lágrimas en la lluvia. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Re: eric3 python-site files not found
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. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
[PyKDE] Re: eric3 python-site files not found
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. I solved this problem with the attached script: pycompile -vao will byte-compile the full python installation, thus requiring root privilege. This choke on a few files in the test tree, which seems to be expected, and on a few files, where it's not :-( BTW: does somebody knows a faster way to generate pyc and pyo files in one go? (I'm using a stupid system call to get it done) I will try to ensure a clean python build from SuSE in their next distrib. > Arno Bye, 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 # # 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 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): f, e = os.path.splitext(path) if e == '.py': out(1, "compiling %s" % (path)) py_compile.compile(path) if optimize: out(1, "compiling %s (opt)" % (path)) os.system("python -O %s %s" % (sys.argv[0], path)) else: out(1, "%s ignored" % (path)) if __name__ == '__main__': #global verbose, optimize try: optlist, args = getopt.getopt(sys.argv[1:], "aorv") except getopt.error, msg: usage(1, msg) all = 0 optimize = 0 recursive = 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 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)
Re: [PyKDE] ANN: Packages for Eric, the Python IDE
Hi Pete, > Wow, this eric thing is great! > Thank you. > Any idea if folders in a project is in the works? > > -Pete It is already there. They are just not shown as a folder in the project browser. The display is a flat one. However, if you add a file to a subdirectory of your project directory, the subdir is created and the file placed there. In the browser it is shown like "subdir/file.py". In addition to that eric will search for new files in these subdirectories upon opening a project (if this feature is enabled). Maybe I'll change the display to show the folders as a tree. Detlev -- Detlev Offenbach [EMAIL PROTECTED] ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] ANN: Packages for Eric, the Python IDE
Wow, this eric thing is great! Any idea if folders in a project is in the works? -Pete On November 26, 2002 01:25 pm, Ricardo Javier Cardenes Medina wrote: > I've uploaded packages for Eric. "eric" only contains the wrappers (eric3, > qtunittest, helpviewer), and depends on another package (python2.2-eric), > which actually installs all the modules. > > I'll probably end up providing a conflicting "python2.1-eric" package, > because I don't see the benefits of having both installed at the same > time. If someone really wants this (both packages at same time), please, > let me know why :-), and I'll try to provide it. > > ___ > PyKDE mailing list[EMAIL PROTECTED] > http://mats.gmd.de/mailman/listinfo/pykde ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] ANN: Packages for Eric, the Python IDE
Hallo Victor, thanks for your comments. > Hola: > > El Mié 27 Nov 2002 04:18, [EMAIL PROTECTED] tecleó: > > I am having some weirdness with the editor itself, but I'm not sure > > if it's me or it :-) > > I would suggest some tips for eric: > > - Developers: test it in a 1024 screen. Too much things for so > little space! That is a general problem with IDEs. That's why you can hide certain windows. > - The console would better placed at the bottom, not at the right Do you mean below the editor? That wouldn't save any space because the space on the right is used by the filesystem browser and the variables viewer as well. And these really need the available space. Maybe you can send me a sketch of a layout you recon is more suitable. > - The default fonts are too big The default fonts are the ones of qscintilla. I could add a button to change all the fonts of qscintilla simultaneously (see later post) but I think that doesn't save much because it would get rid of some distinguishing features of the syntax highlighter. You would have to go through the fonts again to finetune them. Setting up all the fonts and the other config stuff is a one time job done after the first installation. From then on it's read from the config file. I will try to keep the config file format, so that it can be reused after an upgrade. > - I can't change all the fonts (console and line numbering, for > example) Console and non qscintilla fonts are the ones configured for your system (i.e. through KDE). The editor fonts are configurable. Unfortunately qscintilla doesn't allow to change the line number style at the moment. I will forward this request to Phil. > - It doesn't execute the scripts in their original path when opening > a single file Yep, there will be a fix in the next release. Maybe a more advanced later on. Detlev -- Detlev Offenbach [EMAIL PROTECTED] ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] ANN: Packages for Eric, the Python IDE
On Wednesday 27 November 2002 17:19, Gordon Tyler wrote: > Víctor R. Ruiz wrote: > > - The default fonts are too big > > This was a prolem for me too. I found it quite annoying to change all > the fonts to something else like Courier New because I had to > individually change every different font style (Comment, Numbers, etc.). > It would be nice if there was a "Change All Styles Font" button where I > could select one font to use for _all_ the styles. Implying, you're using eric3 on some unix derivate, try using an editor with search and replace in [Scintilla] section of ~/.eric3/eric3rc. Been there, done that, now it fits me needs. Note: you cannot use eric3 itself for that task. > Ciao, > Gordon Hans-Peter ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
[PyKDE] [PATCH] eric3 remembers geometry
Hi Detlef, what do you think about the attached patch. Is it good enough for inclusion? My first eric source contact was a pleasure (as it took me less then 45 min to finish it and writing this mail :) Works-for-me'ly y'rs, Hans-Peter P.S.: diff complains about unterminated last line in both modified files. If they're created with eric3, could you fix this? --- eric/Preferences.py.orig 2002-11-27 18:05:30.0 +0100 +++ eric/Preferences.py 2002-11-27 18:32:19.0 +0100 @@ -73,10 +73,16 @@ # defaults for system settings sysDefaults = { "StringEncoding" : "latin-1" } + +# defaults for geometry +geometryDefaults = { +"MainGeometry" : [0,0,0,0], +"MainSplitter" : [0,0,0,0,0] +} def readPreferences(prefClass = Prefs): """ Module function to read the preferences and transfer them into the central store. @@ -152,11 +158,21 @@ # read the entries for system settings prefClass.sysPrefs = {} prefClass.sysPrefs["StringEncoding"], ok = \ prefClass.settings.readEntry("/eric3/System/StringEncoding", prefClass.sysDefaults["StringEncoding"]) - + +# read the entries for the display geometry +prefClass.geometryPrefs = {} +for key in prefClass.geometryDefaults.keys(): +v, ok = prefClass.settings.readEntry("/eric3/Geometry/" + key) +if ok: +prefClass.geometryPrefs[key] = eval(str(v)) +else: +prefClass.geometryPrefs[key] = prefClass.geometryDefaults[key] + + def savePreferences(prefClass = Prefs): """ Module function to write the preferences from the central store. """ # write the entries for the variables display @@ -201,10 +217,15 @@ # write the entries for the system settings prefClass.settings.writeEntry("/eric3/System/StringEncoding", prefClass.sysPrefs["StringEncoding"]) +# write the entries for the display geometry +for key in prefClass.geometryPrefs.keys(): +prefClass.settings.writeEntry("/eric3/Geometry/" + key, +str(prefClass.geometryPrefs[key])) + def readToolbarSettings(mw, tbs, prefClass = Prefs): """ Module function to read the toolbar settings from the central store and set the toolbars accordingly. """ @@ -381,6 +402,18 @@ """ Module function to store the various system settings. """ prefClass.sysPrefs[key] = value -initPreferences() \ Kein Zeilenumbruch am Dateiende. +def getGeometry(key, prefClass = Prefs): +""" +Module function to retrieve the display geometry. +""" +return prefClass.geometryPrefs[key] + +def setGeometry(key, value, prefClass = Prefs): +""" +Module function to store the display geometry. +""" +prefClass.geometryPrefs[key] = value + +initPreferences() --- eric/UserInterface.py.orig 2002-11-27 18:19:34.0 +0100 +++ eric/UserInterface.py 2002-11-27 18:31:09.0 +0100 @@ -63,13 +63,18 @@ """ def __init__(self): QMainWindow.__init__(self) -self.resize(qApp.desktop().size()) -self.setIcon(IconEric) +g = Preferences.getGeometry("MainGeometry") +if g == [0,0,0,0]: +self.resize(qApp.desktop().size()) +else: +self.move(g[0], g[1]) +self.resize(g[2], g[3]) +self.setIcon(IconEric) self.setCaption(Program) self.setCentralWidget(QWidget(self)) appWindowLayout = QHBoxLayout(self.centralWidget(),0,6) @@ -178,14 +183,19 @@ self.stderrTab.append) self.connect(self, PYSIGNAL('preferencesChanged'), self.viewmanager.handlePreferencesChanged) # Set the sizes of the splitters -width = self.width() -height = self.height() -hSizes = [int(0.21*width), int(0.49*width), int(0.3*width)] -vSizes = [int(0.8*height), int(0.2*height)] +g = Preferences.getGeometry("MainSplitter") +if g == [0,0,0,0,0]: +width = self.width() +height = self.height() +hSizes = [int(0.21*width), int(0.49*width), int(0.3*width)] +vSizes = [int(0.8*height), int(0.2*height)] +else: +hSizes = g[:3] +vSizes = g[3:] self.hSplitter.setSizes(hSizes) self.vSplitter.setSizes(vSizes) # Generate the unittest dialog self.unittestDialog = UnittestDialog(None, 1, self) @@ -772,8 +782,14 @@ def shutdown(self): if not self.viewmanager.closeViewManager(): return 0 if not self.project.closeProject(): return 0 +s = self.geometry() +p = self.frameGeometry() +Preferences.setGeometry("MainGeometry", [p.x(),p.y(),s.width(),s.height()]) +h = self.hSplitter.sizes() +v = self.vSplitter.sizes() +Preferenc
Re: [PyKDE] ANN: Packages for Eric, the Python IDE
Víctor R. Ruiz wrote: - The default fonts are too big This was a prolem for me too. I found it quite annoying to change all the fonts to something else like Courier New because I had to individually change every different font style (Comment, Numbers, etc.). It would be nice if there was a "Change All Styles Font" button where I could select one font to use for _all_ the styles. Ciao, Gordon ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde