I was wondering if it's possible to automatically load a file when DrPython starts.
Specifically, I'd like to automatically load the most recently opened file into the editor when DrPython starts.
Is this possible ?
I am a DrPython neophyte and would appreciate some assistance. Thanks.
yes there is a plugin, I use it everyday! ;)
I hope it still works.
It remembers also the last editing position.
I personally use the (my little modified) at:
Thanks for the response.
I tried the 'Sessions-1.0.9.zip' plugin on Fedora 5 (wxPython-22.214.171.124-1.fc5.i386.rpm - unicode with python 2.4.2), but received errors.
I then 'borrowed' your SessionsLight.py script, created a SessionsLight.idx file containing the single-line string 'SessionsLight', zipped both SessionsLight.py and SessionsLight.idx into a single package (SessionsLight.zip), and then added this plugin through the relevant DrPython menu items.
cool, I'm glad it works for you.
(Also that I hear it works on linux and unicode)
I'm looking for a plugin maintainer or so.
If you are interested... ;)
Anyway I'm happy, that there is some movement in the project again.
Currently I try to resolve more important bugs with unicode and encoding
stuff. I do not like it, but that's certainly a priority (especially with other encodings
as german umlauts).
I have noticed on my todo the sessions1.0.9 is not working.
If I cannot track it down:
What errors did you receive?
I removed the SessionsLight plugin and re-installed Sessions-1.0.9.zip.
The following errrors occur on Fedora 5 if I activate the 'Options | Plugin Preferences | Sessions' dialog and select the items 'AutoSave Arguments' and 'AutoSave Folding States':
Error 1. Occurs at program shutdown (error is shown twice) -
Error Writing To: /root/.drpython/plugins/Sessions.DefaultSession.dsf
Traceback (most recent call last):
File "/root/.drpython/plugins/Sessions.py", line 588, in SaveSession
for filename in farray:
NameError: global name 'farray' is not defined
Error 2. Occurs at program start-up (error is shown once) -
The File Has Been Modified Since Last Session Save.
Error Loading Folding Data For: /root/Desktop/myscript.pyw
(Error 2 is somewhat odd as I always save the file myscript.pyw before closing DrPython.)
The above errors are not seen if I unselect the items 'AutoSave Arguments' and 'AutoSave Folding States' from the 'Options | Plugin Preferences | Sessions' dialog.
I hope the above helps.
Perhaps you'll allow me to offer my services at some point in the future if my schedule becomes less hectic and I become slightly more familiar with (wx)python and DrPython.
Lastly, I have noticed that DrPython closes rather cleanly and quickly on Fedora 5, whereas it takes several seconds to close on XP while it clears the SourceBrowser listbox (may take up to 5 seconds). If I 'manually' hide the SourceBrowser panel by pressing F8 and then attempt a shutdown, DrPython closes instantly on XP.
A similar annoyance was present with Delphi and attempts to update/clear its listview control, which could be overcome using '.beginupdate/.endupdate' methods or hiding the control to prevent time blockage resulting from having to refresh/repaint the control as it was being updated/cleared.
Perhaps one idea to overcome the delay in closure of DrPython on XP is to programmatically hide the SourceBrowser panel immediately before the application attempts a shutdown.
You are invited to contribute to our project. :)
As the message before, I giv you a more deatailed response
in the next days.
PS: (not only for you): I'm not a native english speaker,
please forgive my expression or phrases mistakes. :)
Thanks for the invitation. I'd like to contribute when time allows, as I think DrPython is an excellent editor.
I agree with your remarks in an earlier post concerning the need for more screenshots etc. to encourage people to use the program. Though most programmers correctly focus on the functionality of a program, the appearance of the program is not a trivial aspect of a software package.
To this end, and without wishing to diminish the valuable effort of previous contributors, I think some of the toolbar images on the interface of DrPython could do with a facelift (at the very least modify the few that need a transparent background, e.g. the 'Run' button image has a white background that should be transparent; the same is true of the 'Set Arguments', 'Import All' and 'End' button images). Something the DrPython team could consider.
Ah yes, I remember, even Daniel worried about
the not "the beautifulst" icons. ;)
Functional buttons, but not the prettiest.
I might put together a small set of images (16X, 24X and 48X) for the main toolbar when I have time, and submit them to the DrPython team for consideration.
That would be cool.
For my daily work I use my plugin «myProject».
It is inspired in «Sessions» but it works more like a project (we can use a folder with several files)
I don't post here the code because it will «jammed».
If wanted I can mail it...
Hello AB, yes thanks for offering, I'm interested,
I "collect" all what has something to do with DrPython. ;)
Log in to post a comment.