Sunday, November 28, 2010

Side-by-side file editing

A much requested feature has been the ability of view and edit more than one files in the editor simultaneously.  This feature has been implemented in version control and will be made available in the next release.

Here are some screenshots:

image

Notice that there are two sets of tabs and you can drag&drop tabs from one set to the other.

image

Two files can be displayed and edited either vertically or horizontally.

image

Here we have two files displayed vertically and for each file we have a second editor view displayed.

Wednesday, November 24, 2010

More portable than ever!

PyScripter 2.3.4 has sorted a couple of problems with portability:
  • It will now locate the Python help file in a more robust way to provide context sensitive help.
  • It will look for custom skins in the Skins subfolder of the directory in which the PyScripter executable is located and only if that directory is not found it will search the %APPDATA%\PyScripter\Skins directory.  So now you can carry custom skins with you.
So this version is more portable than ever!

Where on earth is pythonxx.dll? (3)

Starting from PyScripter 2.3.4, without the --PYTHONDLLPATH command-line option, PyScripter will only use registered Python versions.  So it will ignore loose pythonxx.dll found on the system path.  To use with non-registered Python versions you need to use the –PYTHONxx and –PYTHONDLLPATH command-line options.  See the FAQ at the PyScripter project site for more information.

PyScripter v2.3.4 released

PyScripter version 2.3.4 was released at http://pyscripter.googlecode.com.

New features:

  • Compatibility with Python 3.1.3rc, 3.2a4
  • Add watches by dragging and dropping text
  • Ctrl + Mouse scroll scrolls whole pages in print preview
  • Search for custom skins first in the Skins subdirectory of the Exe file if it exists

Issues addressed:

The full history can be found at http://code.google.com/p/pyscripter/wiki/History.

Friday, November 12, 2010

Code completion for PyQt4

There was a question at the PyScripter newsgroup about how to setup code completion for PyQt4.  Have a look at the answer given there, since it may also be applicable to code completion of other packages that use extension modules.

Sunday, October 31, 2010

Where on earth is pythonxx.dll? (2)

The problem with the way PyScripter searches for the python dll is that, when used without any command-line arguments, it will try to load some loose python dll found on the system path that was placed there by an installed application, even if this dll is not related to a properly installed python version.  (See step 3 in the previous post).  This typically will result in unpredictable errors after starting PyScripter, since python will not be able to find the module libraries.

As an example, this might happen when you have installed python version 2.5 but, somehow a loose python26.dll can be found on the system path.

I am thinking of dropping step 3 in the algorithm described in the previous post and only try to load registered python versions when PyScripter is invoked without any command-line parameters or with just the –PYTHONxx flag.  This means that if you want to use PyScripter with an unregistered version of Python you would have to use both the –PYTHONxx and the –PYTHONDLLPATH parameters.  Any thoughts?

Where on earth is pythonxx.dll?

Most python users have multiple python versions installed.  In addition various other software packages install custom versions of python often placing pythonxx.dll on the windows system path as defined by the environment variable %PATH%.  It is worth explaining how PyScripter locates the python dll, since the issue pops up regularly in the newsgroup and submitted bug reports.

There are two types of Python installation:

  1. All users installation
    Python creates registry entries with installation info at HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.x and puts places the python dll in c:\Windows\System32.
  2. Single user installation
    Python creates registry entries with installation info at HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\2.x and does not put the dll in c:\Windows\System32.

PyScripter, without any command line flags looks at the registry to find the latest version of Python and then for an all user installation tries to load the relevant Python dll from the system path. For a single user installation tries to load the DLL from the Install path that is in the registry.

In more detail PyScripter does the following:

Currently PyScripter knows of versions 3.2, 3.1, 3.0, 2.7...2.3. Below, system path refers to the Windows path (environment variable) and x.x refers to the version number.

Repeat for versions 3.2 down to 2.3:

  1. Look at the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\x.x (All users).  If key is found assume the dll is in the system path and try to load it.
  2. If the previous key does not exist it look at  HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\x.x (Single user) and try to load the Python DLL from the path specified in the registry.
  3. If there is no info in the registry try to load the DLL from the system path to cater for unregistered Python versions.
  4. If Python DLL was loaded successfully then break

When PyScripter is used with a --PYTHONxx flag then it does the above but searching only for the specific version. The Registry lookup does not take place when Python is used with the --PYTHONDLLPATH. Instead PyScripter tries to load the Python dll from the specified path.  The --PYTHONDLLPATH flag should be used with the --PYTHONxx flag. See http://pyscripter.googlepages.com/portablepython for an example of using PyScripter with portable Python. 

The %PYTHONHOME% environment variable is not used by PyScripter directly but by Python to find the installed libraries. See the Python documentation for its use.