Re: python27.exe vs python2.7.exe ...

2010-09-14 Thread Trent Mick

On 10-09-14 2:52 PM, James Mills wrote:

On Wed, Sep 15, 2010 at 7:25 AM, Sridhar Ratnakumar
  wrote:

Thoughts?


I've never been a Windows developer (probably never will be), but I
have one thought:

Why has ActivePython not been doing this all along ?


Hind sight is 20/20 is all I can say. :)

When I added support for "pythonXY.exe" instead of "pythonX.Y.exe" I was 
trying to add an out-of-the-box equivalent for what I saw some core 
developers doing with their own batch scripts: py20.bat, py21.bat, etc.  
I didn't think to provide equivalence to the Unix shortcuts. Also, this 
was a looong time ago (back when python 1.5, 1.6 and 2.0 were still 
relevant) so it could be there there *weren't* many of the typical (now) 
Linux "pythonX.Y" installed executables.



Trent

--
Trent Mick
ActiveState
--
http://mail.python.org/mailman/listinfo/python-list


Re: Where is the help function defined?

2010-06-22 Thread Trent Mick

On 10-06-21 10:57 AM, Emile van Sebille wrote:

On 6/21/2010 10:17 AM Peng Yu said...

help(help) gives me the following explanation.





I then looked at pydoc site. But I don't see an entry on help(). How
to figure out where help() (or a function in general) is defined?


ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on
Python 2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> dir(help)
['__call__', '__class__', '__delattr__', '__dict__', '__doc__',
'__getattribute__', '__hash__', '__init__', '__module__', '__new__',
'__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__',
'__weakref__']
 >>> help.__module__
'site'
 >>> import site
 >>> dir (site)
['_Helper', '_Printer', '__builtin__', '__builtins__', '__doc__',
'__file__', '__name__', '_init_pathinfo', '_test', 'abs__file__',
'addbuilddir', 'addpackage', 'addsitedir', 'addsitepackages',
'aliasmbcs', 'execsitecustomize', 'main', 'makepath', 'os', 'removedup
paths', 'setBEGINLIBPATH', 'setcopyright', 'setencoding', 'sethelper',
'setquit', 'sys']
 >>> site.__file__
'C:\\Python24\\lib\\site.pyc'
 >>>


"site.py" (at least in the Python trunk) has this:


def sethelper():
__builtin__.help = _Helper()



Trent

--
Trent Mick
http://www.activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


ANN: Komodo 6.0.0b1 -- adds Python 3 support

2010-06-11 Thread Trent Mick

Hello all,

We are pleased to tell you that Komodo IDE and Komodo Edit 6.0.0 Beta 1
were released today. If you're using 6.0.0 Alpha 2 then you can use
Komodo's auto-update mechanism.  Otherwise, you can get Beta 1 at:

  http://downloads.activestate.com/Komodo/releases/6.0.0b1/

For Pythonistas the most significant recent changes are the addition of 
Python 3 code intelligence support (i.e. autocomplete, calltips, Go To 
Definition, sections list, code browser)!


Komodo 5 (the current production version) already supported background 
syntax checking and debugging for Python 3. This beta release finally 
rounds out Komodo's language support for Python 3.



Test Framework Survey
=

We're running a survey on what Test Automation Frameworks people use 
(both in Python and not). We'd appreciate it if you would take the time 
to fill that out: only 4 questions. We'll post results from the survey 
on our blog (http://www.activestate.com/blog) next month. (We'll be 
giving away some t-shirts, too!)


  http://surveymonkey.com/s/june2010as

Thanks!


What else is in Komodo 6.0b1?
=


Other significant changes in Komodo 6.0.0b1 are:

 * New integrated toolbox
 * all your tools will now belong to one pane
 * faster loading and firing
 * tools are now standalone JSON files, that can be
   easily copied and exported
 * more features are planned
 * in the "renovations are underway in order to serve you
   better" department, tools in projects currently do not work.
   This should be fixed in the nightlies fairly soon.
   The toolbox main menu is also not operational.
 * UI improvements
 * goto-line is now an inline panel
 * child dialogs appear on same screen as Komodo window
 * better-looking icons
 * some menu rearrangements
 * Places File Manager
 * one-click access to all parent directories
 * it's now easier to move to recently visited directories
 * publishing (IDE only)
 * now works over slower connections
 * show diffs between local and remote files
 * numerous UI improvements
 * Rx toolkit (IDE only)
 * now supports JavaScript

For a more detailed overview, check out the Komodo 6 descriptive
features page:

 http://community.activestate.com/komodo-60-features

As well as new features, Komodo 6 comes with a whole lot of enhancements
and bug fixes. See the "Release Notes" section in Komodo's internal help
viewer for the full list of changes.

Please try it out and give us your feedback:

  emailhttp://listserv.activestate.com/mailman/listinfo/komodo-beta
  bugs http://bugs.activestate.com/enter_bug.cgi?product=Komodo
  forumhttp://community.activestate.com/products/Komodo


Cheers,
Trent

--
Trent Mick
Product Manager, Komodo and Python
ActiveState, The Dynamic Language Experts
http://www.activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActiveState using different MS runtime files than official Python release? (was Re: Movable Python or ActivePython)

2010-05-06 Thread Trent Mick

On 10-05-05 5:30 PM, pyt...@bdurham.com wrote:

Hi Trent,

On 10-05-05 12:04 PM, pyt...@bdurham.com wrote:

I just took a look at the ActiveStatre 2.6.5.12 release (zip file
version) and noticed that this file does not include the MSVCR90.DLL run
time file - it includes MFC*.DLL files instead (and a different manifest
file as well).

Can anyone explain why the ActiveState release uses different MS Visual
C runtime files than the official Python Foundation's release of Python?



It doesn't. We use the same MSVC version as the python.org builds.

Note that "MFC*.dll" files (IIRC, it has been a while) are
redistributable DLLs used by the included PyWin32 extensions that have
Python bindings for the Microsoft Foundation Classes GUI APIs.


Yes, you are correct about the MFC*.dll's being shipped as part of the
Py2Win32 extensions.

But I don't see the MSVCR90.DLL in your ZIP release. I do see a
MSVCR71.DLL.


That is probably a bug in the ZIP package (the MSI is by far the primary 
package for Windows so gets more attention).


I've started a bug for this:
http://bugs.activestate.com/show_bug.cgi?id=86794

Thanks,
Trent

--
Trent Mick
trentm at activestate.com
http://trentm.com/blog/
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActiveState using different MS runtime files than official Python release? (was Re: Movable Python or ActivePython)

2010-05-05 Thread Trent Mick

On 10-05-05 12:04 PM, pyt...@bdurham.com wrote:

I just took a look at the ActiveStatre 2.6.5.12 release (zip file
version) and noticed that this file does not include the MSVCR90.DLL run
time file - it includes MFC*.DLL files instead (and a different manifest
file as well).

Can anyone explain why the ActiveState release uses different MS Visual
C runtime files than the official Python Foundation's release of Python?


It doesn't. We use the same MSVC version as the python.org builds.

Note that "MFC*.dll" files (IIRC, it has been a while) are 
redistributable DLLs used by the included PyWin32 extensions that have 
Python bindings for the Microsoft Foundation Classes GUI APIs.


Trent

--
Trent Mick
trentm at activestate.com
http://trentm.com/blog/
--
http://mail.python.org/mailman/listinfo/python-list


Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Trent Mick

However, given what I've now learned about the current situation wrt.
versions of Python, where Python 3.x is effectively a new language, and
where apparently ActiveState has no installer for that, I'm rewriting to use
the "official" distribution.

...
ActiveState does have Python 3 installers. They've had them almost
since the day it was released. It's just not the default because many
of the libraries people use haven't been ported yet.

https://www.activestate.com/activepython/downloads/


Also:
http://www.activestate.com/activepython/python3/



Trent

--
Trent Mick
trentm at activestate.com
http://trentm.com/blog/
--
http://mail.python.org/mailman/listinfo/python-list


Re: python library call equivalent to `which' command

2009-06-29 Thread Trent Mick

destroy wrote:

Hi,
  I'm looking for a Python library function that provides the same
functionality as the `which' command--namely, search the $PATH
variable for a given string and see if it exists anywhere within. I
currently examine the output from `which' itself, but I would like
something more portable. I looked through the `os' and `os.path'
modules but I didn't find anything.


http://code.google.com/p/which/


Trent

--
Trent Mick
trentm at activestate.com
http://trentm.com/blog/
--
http://mail.python.org/mailman/listinfo/python-list


Re: "The system cannot execute the specified program."

2009-06-26 Thread Trent Mick

Tim Slattery wrote:

That's what it is. They give you a choice of MSI or AS. The AS choice
is a zip file that you unzip, then run the bat file on the top level.
There's no indication that it's "not intended for wide use".


Granted not much, other than it isn't listed in the main download tables:
  http://www.activestate.com/activepython/downloads/
and not discussed in the install notes:
  http://docs.activestate.com/activepython/2.6/installnotes.html

Cheers,
Trent

--
Trent Mick
trentm at activestate.com
http://trentm.com/blog/
--
http://mail.python.org/mailman/listinfo/python-list


Re: "The system cannot execute the specified program."

2009-06-26 Thread Trent Mick

Tim Slattery wrote:

Tim Slattery  wrote:


Our office has a copy of Python 3.0 installed on a network share
device. When I try to run it I get this message: "The system cannot
execute the specified program."


I should add that before I knew about our shared installation, I
downloaded the AS distribution of Python 2.6 from ActiveState. Their
install procedure is a *.bat file that calls Python to put everything
in the right place. When the bat file tries to invoke Python, I get
the same message.



I'm jumping in mid-thread here, so apologies if I've missed something. 
Just want to clarify something: the main AS distribution of Python 
(ActivePython) for Windows is an MSI.


There is sometimes a .zip file with an install.bat -- but that isn't 
really intended for wide use. Is that what you are referring to here?



Cheers,
Trent

--
Trent Mick
trentm at activestate.com
http://trentm.com/blog/
--
http://mail.python.org/mailman/listinfo/python-list


Re: Tools for web applications

2009-04-30 Thread Trent Mick

Scott David Daniels wrote:

Marco Mariani wrote:
What you call "code completion" cannot work in many cases with dynamic 
languages. Nobody knows which methods are available to an object until 
the program is running I must admit that I've never used 
completion of anything while developing. I routinely it do with the 
IPython shell, and I would suffer if I didn't have it in postgres, but 
not while editing python.


As Scott indicates, one can often do a fairly good job. I'm definitely 
not a Java guy, but I've heard that Java generics (don't ask me to 
identify one of them! :) can cause similar pains for Java 
autocomplete/calltips as some dynamic language patterns can.



You'd be amazed at how much ActiveState's Python _can_ and _does_
guess/infer about available methods.  It is pretty fancy (even for
an old stick-in-the-mud "Lave my keyboard alone" guy like me.


Do you mean Komodo?
http://www.activestate.com/komodo/

Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActiveState Komodo Edit?

2009-04-27 Thread Trent Mick

If you make line numbers visible (View -> View Line Numbers) then
you can do what you want in the line numbers gutter.


I am using the free editor-only Komodo Edit. Apparently that does not
work here. 


I believe it was a recent change. What version are you using? You could 
try the latest nightly build:

  http://downloads.activestate.com/Komodo/nightly/

Cheers,
Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActiveState Komodo Edit?

2009-04-27 Thread Trent Mick

John Doe wrote:

Another question...
There is a region on the left margin to the left of the code and to


BTW, we call those regions "gutters" of the editing area.


the right of the outlining area, in between the code and the
outlining area. It looks like an area used to select lines. But
dragging the pointer down that area does nothing apparent. Isn't
that supposed to select lines of text? Maybe I have colors set
wrong, but selected text does show up when selected other ways. Or 
maybe that area is nonfunctional, left over from the IDE?


If you make line numbers visible (View -> View Line Numbers) then you 
can do what you want in the line numbers gutter.


Cheers,
Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Help with wxPython program :.: return 1?

2009-04-06 Thread Trent Mick

Dennis Lee Bieber wrote:

I don't know what Komodo is coded in, but if it is using wx, you may
be failing from having two "mainloop" processes... (same problem as
trying to run a Tkinter application from inside IDLE, and probably
trying to run a win32gui application from PythonWin)


No, Komodo is not a wx app.

Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActivePython or Python from Python.org

2009-03-02 Thread Trent Mick

Rey Bango wrote:

Hi everyone. I noticed that ActiveState has their own variation of
Python and was curious if there's a benefit to choosing their version
over the version offered via Python.org.

Could someone lend some insight?


Here is some reasoning I wrote a while back:

http://mail.python.org/pipermail/python-list/2007-July/447987.html


Cheers,
Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActivePython 2.6.1.1 and 3.0.0.0 released!

2008-12-13 Thread Trent Mick

Kay Schluehr wrote:

On 13 Dez., 00:16, Trent Mick  wrote:


Note that currently PyWin32 is not included in ActivePython 3.0.


Is there any activity in this direction?


The PyWin32 CVS tree is getting checkins from Mark Hammond and Roger 
Upole with a py3k tag. I'm not sure how close they are currently.


Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


ActivePython 2.6.1.1 and 3.0.0.0 released!

2008-12-12 Thread Trent Mick
I'm happy to announce that ActivePython 2.6.1.1 and ActivePython 3.0.0.0 
are now available.


Details and download links for 2.6 here:
  http://www.activestate.com/Products/activepython/feature_list.mhtml

Details and download links for 3.0 here:
  http://www.activestate.com/Products/activepython/python3.mhtml

All ActivePython downloads (e.g. for older releases) are available here:
  http://downloads.activestate.com/ActivePython/


ActivePython 3.0.0.0 is the first release of ActivePython for Python 3. 
ActivePython 2.6.1.1 is a patch release based on Python 2.6.1.



What is ActivePython?
-

ActivePython is ActiveState's binary distribution of Python. Builds for
Windows, Mac OS X, Linux, HP-UX and AIX are made freely available.

ActivePython includes the Python core and the many core extensions: zlib
and bzip2 for data compression, the Berkeley DB (bsddb) and SQLite
(sqlite3) database libraries, OpenSSL bindings for HTTPS support, the
Tix GUI widgets for Tkinter, ElementTree for XML processing, ctypes (on
supported platforms) for low-level library access, and others.

The Windows distribution ships with PyWin32 -- a suite of Windows tools
developed by Mark Hammond, including bindings to the Win32 API and
Windows COM. Note that currently PyWin32 is not included in ActivePython 
3.0. See this page for full details:

  http://docs.activestate.com/activepython/2.6/whatsincluded.html
  http://docs.activestate.com/activepython/3.0/whatsincluded.html

As well, ActivePython ships with a wealth of documentation for both new
and experienced Python programmers. In addition to the core Python docs,
ActivePython includes the "What's New in Python" series, "Dive into
Python", the Python FAQs & HOWTOs, and the Python Enhancement Proposals
(PEPs).

An online version of the docs can be found here:
http://docs.activestate.com/activepython/2.6/welcome.html

We would welcome any and all feedback to:
activepython-feedb...@activestate.com.com

Please file bugs against ActivePython at:
http://bugs.activestate.com/query.cgi?set_product=ActivePython



On what platforms does ActivePython run?


ActivePython includes installers for the following platforms:

- Windows/x86
- Mac OS X
- Linux/x86
- Linux/x86_64 ("x86_64" is also known as "AMD64")
- Solaris/SPARC
- Solaris/SPARC (64-bit)
- Solaris/x86
- HP-UX/PA-RISC
- AIX/PowerPC


Extra Bits
--

ActivePython releases also include the following:

- ActivePython26.chm & ActivePython30.chm: An MS compiled help
  collection of the full ActivePython documentation set. Linux users of
  applications such as xCHM might find this useful. This package is
  installed by default on Windows.

Extra bits are available from:
http://downloads.activestate.com/ActivePython/etc/


Thanks, and enjoy!

Trent, Python Tech Lead

--
Trent Mick
http://planet.activestate.com/
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Debugging in Python

2008-12-01 Thread Trent Mick

Scott David Daniels wrote:

Stef Mientki wrote:

  I'm not completely satisfied with even the "best" debuggers,
most of the good ones are too difficult,
so I want to wrap rpdb2 and
don't want to miss any great features ;-)


I think ActiveState has a free 21-day trial, so you could check it out
yourself if you are willing to spend the concentrated time to check it
out.  


That is correct. Also the Python debugging docs are here, if that might 
help:

 http://docs.activestate.com/komodo/5.0/debugpython.html


Their license terms are reasonable (the license is attached to _you_,
not a particular machine you run it on, as I remember.


Also correct: with a Komodo IDE license you can use Komodo on any 
machine that you use.



Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: RELEASED Python 3.0rc3

2008-11-24 Thread Trent Mick

And 2.6 is in final release? So when ActiveState speaks of 2.6.0.0
they mean a final release?


Yes. The first three parts of the ActivePython version are the same as 
the core Python version on which it is based.




So, if the IDLE from ActiveState comes up and says 2.6 (indicating
final release), shouldn't the copywrite message also say 2.6
instead of 2.6rc1 as shown here?

Python 2.6rc1 (r26rc1:66438, Sep 13 2008, 09:20:38) [MSC v.1500 32
bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.


This is what I get when I run IDLE with ActivePython 2.6.0.0 installed:

-
Python 2.6 (r26:66714, Nov 11 2008, 10:21:19) [MSC v.1500 32 bit 
(Intel)] on win32

Type "copyright", "credits" or "license()" for more information.
-

I ran it like this:

  C:\Python26> pythonw.exe Lib\idelib\idle.pyw


I believe there is a problem with your install. My guess is that your 
ActivePython install is using an older python26.dll sitting around 
somewhere.


Is there a python26.dll somewhere in your "C:\Python26" directory, or 
wherever you installed ActivePython 2.6?




Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Installation on Vista (Was: ANN: ActivePython 2.6.0.0 is now available)

2008-11-17 Thread Trent Mick

Mensanator wrote:

What about Vista? Do you need to use the Administrator account to
install it?

My currently understanding is that the ActivePython installer will
prompt for administrator privileges if required. I know that if the
current user is a member of the administrators *group* (different from
being the "Administrator" *user*), that this is sufficient to install
and use ActivePython.


I'll have to try that, as it is NOT the case with the Windows
installer
from Python.org. Admin privelleges are NOT sufficient if you want IDLE
to work. You have to use the Administrator account (which is disabled
by default on Vista). If you have a way around that, then great.


I believe that IDLE ran just fine when installed as a user in the admin 
group.



Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: ActivePython 2.6.0.0 is now available

2008-11-17 Thread Trent Mick

Mensanator wrote:

I'm happy to announce that ActivePython 2.6.0.0 is now
available for download from:
 http://www.activestate.com/Products/activepython/
...
- Windows/x86


What about Vista? Do you need to use the Administrator account to
install it?


My currently understanding is that the ActivePython installer will 
prompt for administrator privileges if required. I know that if the 
current user is a member of the administrators *group* (different from 
being the "Administrator" *user*), that this is sufficient to install 
and use ActivePython.


I've started this bug:
  http://bugs.activestate.com/show_bug.cgi?id=80974
to test installation as a user that is not a member of the admin group 
and to update the ActivePython installation docs with that info.


I'd appreciate comments on your experiences, esp. if it looks like 
something is going awry with the ActivePython installer.


Sincerely,
Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


ANN: ActivePython 2.6.0.0 is now available

2008-11-14 Thread Trent Mick

I'm happy to announce that ActivePython 2.6.0.0 is now
available for download from:
 http://www.activestate.com/Products/activepython/

ActivePython 2.6.0.0 is based on Python 2.6.0.


What is ActivePython?
-

ActivePython is ActiveState's binary distribution of Python. Builds for
Windows, Mac OS X, Linux, HP-UX and AIX are made freely available.

ActivePython includes the Python core and the many core extensions:
zlib and bzip2 for data compression, the SQLite (sqlite3) database
libraries, OpenSSL bindings for HTTPS support, the Tix GUI widgets for
Tkinter, ElementTree for XML processing, ctypes (on supported platforms)
for low-level library access, and others. The Windows distribution ships
with PyWin32 -- a suite of Windows tools developed by Mark Hammond,
including bindings to the Win32 API and Windows COM. See this page for
full details:
  http://docs.activestate.com/activepython/2.6/whatsincluded.html

As well, ActivePython ships with a wealth of documentation for both new
and experienced Python programmers. In addition to the core Python docs,
ActivePython includes the full "What's New in Python" series, "Dive into
Python", the Python FAQs & HOWTOs, and the Python Enhancement Proposals
(PEPs).

An online version of the docs can be found here:
 http://docs.activestate.com/activepython/2.6/welcome.html

We would welcome any and all feedback to:
 [EMAIL PROTECTED]

Please file bugs against ActivePython at:
 http://bugs.activestate.com/query.cgi?product=ActivePython


On what platforms does ActivePython run?


ActivePython includes installers for the following platforms:

- Windows/x86
- Mac OS X
- Linux/x86
- Solaris/SPARC
- Solaris/SPARC 64-bit
- Solaris/x86
- Linux/x86_64 ("x86_64" is also known as "AMD64")
- HP-UX/PA-RISC
- AIX/PowerPC


Extra Bits
--

ActivePython releases also include the following:

- ActivePython26.chm: An MS compiled help collection
   of the full ActivePython documentation set. Linux users of
   applications such as xCHM might find this useful. This package is
   installed by default on Windows.

Extra bits are available from:
 http://downloads.activestate.com/ActivePython/etc/


Apologies for the delay. We were crazy-busy getting the Komodo 5.0
release out. Check it out:
 http://www.activestate.com/products/komodo/

Thanks, and enjoy!

Trent

p.s. We hope to have ActivePython 3.0 builds out fairly soon.

--
Trent Mick
Python Tech Lead
trentm at activestate.com

--
http://mail.python.org/mailman/listinfo/python-list


Re: urllib fails to connect

2008-08-20 Thread Trent Mick

jlist wrote:

I found out why. I set a proxy in IE and I didn't know
ActiveState Python use IE proxy!


I'm running ActiveState Python 2.5 on Windows XP. It used
to work fine. Today however I get (10061, 'Connection refused')
for any site I try with urllib.urlopen().


Perhaps IE's proxy settings are effectively setting the Windows system 
networking proxy settings?


Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActiveState Python v2.5 doesn't come with Tkinter or Tk installed.

2008-08-14 Thread Trent Mick

Dudeja, Rajat wrote:

So, now I've finally started using Eclipse and PyDev as an IDE for my
GUI Application. I just wrote some sample programs as an hands on.

Now I would like to take up Tkinter. I'm using Active State Python
version 2.5 and found that there is not Tkinter and Tk module in it.

To use Tkinter do I actually require Tk installed on my machine? Please
suggest and where can I find both these modules?


As was mentioned by others, ActivePython *does* include Tkinter/Tk/Tix 
support in all builds. One exception is that the Tkinter in ActivePython 
**on Mac OS X-only** depends on a separate install of either ActiveTcl 
or TclTkAqua to provide the Tk framework.


Cheers,
Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActiveState Code (the new Python Cookbook) has been launched

2008-07-28 Thread Trent Mick

Nick Craig-Wood wrote:

Trent Mick <[EMAIL PROTECTED]> wrote:
 I happy to announce that ActiveState Code has been taken out of beta. 
 This is the new site replacing the ASPN Cookbooks -- in particular the 
 Python Cookbook.


http://code.activestate.com/


Looks great and much faster than the old site!


Thanks!


Mind telling us how it is implemented?  I'm guessing python/django by
the url and the fact that you have python stuff on your home pages but
I could be wrong!


Yup, it is a Django-based site -- a pleasure to work with, that. Using 
django-tagging, django-template-utils & universal feedparser (for 
hooking in Atom content for News section on home page), django-voting, 
python-markdown2 (for rendering comments, discussion/descriptions), 
recaptcha-client (for feedback when not logged in), pygments (for syntax 
coloring).


I've just submitted the site to http://www.djangosites.org/

I hope to do some blog posts about some parts of the site soon and 
release the small re-usable "feedback" app I've put together for getting 
feedback on the site.


Cheers,
Trent


--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: How to figure out if the platform is 32bit or 64bit?

2008-07-28 Thread Trent Mick

Manuel Vazquez Acosta wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Just test for maxint value:

from sys import maxint
if maxint >> 33:
print "more than 32 bits" # probably 64
else:
print "32 bits"


I believe that was already suggested in this thread. That test will just 
tell you if the Python *build* is 32-bit or 64-bit. If the answer is 
32-bit, then that doesn't tell you if this is a 32-bit Python running on 
a 64-bit OS.


Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: How to figure out if the platform is 32bit or 64bit?

2008-07-25 Thread Trent Mick

norseman wrote:


 > > I need to know if I'm running on 32bit or 64bit ... so far I haven't
 > > come up with how to get this info via python. sys.platform returns
 > > what python was built on ... but not what the current system is.
 > >
 > > I thought platform.uname() or just platform.processor() would have
 > > done it, but python returns an empty string on windows. Any ideas?


If just for Windows I believe you can use the "PROCESSOR_ARCHITECTURE" 
environment variable -- at least on NT-based Windows versions.


Values are x86 (32-bit), IA64 (64-bit) and AMD64 (64-bit).

Here is a "platinfo.py" module that might help if you need to do this 
for other platforms:


http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/util/platinfo.py


Cheers,
Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Building a Python app with Mozilla

2008-07-14 Thread Trent Mick

Brian Quinlan wrote:
Most application logic in Komodo is implemented in Python, using the 
PyXPCOM bindings. The UI is implemented using XUL and JavaScript. The 
editor is Scintilla (C++).


../Komodo Edit.app/Contents/MacOS % find . -name "*.py" | xargs wc
...
...
126392  456858 4949602 total

This doesn't include the python code in the Python libraries themselves.


An interesting breakdown here:
  http://www.ohloh.net/projects/10861/analyses/latest

happybrowndog wrote:
> Is that why Komodo is so damned slow

Probably not, no. Pinpointing the reasons for slowness is often a lot 
more complicated. Particular slow points in any app/module -- especially 
pathologically slow things -- are more often algoritmic than a function 
of the language used. Komodo's use of Python is perhaps partially 
responsible for a slower startup time than might otherwise be possible 
-- but otherwise my experience in Komodo perf work has been algorithmic 
issues. Also, if Komodo hadn't been using Python for application logic 
since day one we probably wouldn't be much further than Notepad right 
now. :)


Cheers,
Trent (komodo developer)

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActiveState Code: the new Python Cookbook site

2008-07-11 Thread Trent Mick

Peter Otten wrote:

Thin Myrna wrote:


The old cookbook offered choices by category. Did you drop that feature?


Looks like categories have become tags:

http://code.activestate.com/recipes/tags/


Yes, that is correct. I should document the tag names to category 
mapping that I've used (mostly a straightforward "remove spaces and 
capitalization" thing).


My hope is that allowing free form tagging and (importantly) multiple 
tags will allow for more interesting and useful grouping.


However, there is value in there being good suggestions of common tags 
when adding tags. I need to add that to the recipe add form:


http://code.activestate.com/recipes/add/


Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: ActiveState Code: the new Python Cookbook site

2008-07-10 Thread Trent Mick

Stef Mientki wrote:

one small remark,
If I want to browse 200 recipes, at 10 per page  
... please make something like 100 available per page,
are internet is fast enough nowadays.


Touche. Done:

  http://code.activestate.com/recipes/?paginate_by=100

Cheers,
Trent

--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Does Python 2.5 include or not include SQLite engine?

2008-04-22 Thread Trent Mick
Whether a Python installation includes the SQLite 3 bindings typically 
depends on:


1. Python version: core support for the SQLite 3 bindings (i.e. the 
"sqlite3" module) was added in Python 2.5. Earlier versions of Python 
may also have a 3rd-party package/module that adds SQLite bindings, of 
course.


2. The Python distro: The binary Python 2.5 installers from python.org 
(for Windows and Mac OS X [^1]) and ActiveState, i.e. ActivePython, (for 
Windows, Mac OS X, Linux, Solaris, HP-UX and AIX) include the "sqlite3" 
module as part of the installer. I don't know about other Python 
distributions.


3. Platform: Commonly on Linux one will get Python from the Linux 
distro's own packaging utility (e.g., apt-get, rpm, synaptic, yum, etc.) 
Typically the Linux distros will break up a Python installation into 
multiple packages. So an installation of, say, the "python2.5" package 
will often not have the "sqlite3" module. To get it you would have to 
install the separate "python2.5-sqlite" package. (Note: the names of 
these packages vary with Linux distro and version of that distro.)




Cheers,
Trent

[1]: I could be wrong about whether the Mac OS X binary installer for 
Python 2.5 from python.org includes the "sqlite3" module -- I haven't 
checked -- but I presume it does.



Banibrata Dutta wrote:
Doesn't this depend on the source / distro ? My Python is from the 
ActivePython distro, while I am not sure (since I've just about started 
playing with it), I haven't seen SQLite included ... possible that I 
missed it.


On 4/22/08, [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>* 
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:


While reading feedback to my post "Does Python 2.5.2's embedded SQLite
support full text searching?" I noticed that there appears to be some
confusion regarding whether Python 2.5 includes the SQLite engine.

My Windows 2.5.2 binary download includes SQLite.

But other posters claim otherwise, re: Linux releases of Python 2.5?

I thought one of the major features of Python 2.5 was its embedded
SQLite engine.

Thoughts?



--
Trent Mick
trentm at activestate.com
--
http://mail.python.org/mailman/listinfo/python-list


ANN: ActivePython 2.5.2.2 and 2.4.5.14 are now available

2008-04-09 Thread Trent Mick
I'm happy to announce that ActivePython 2.5.2.2 and 2.4.5.14 are now
available for download from:
 http://www.activestate.com/products/activepython/

These are patch releases that update ActivePython to core Python 2.5.2
and 2.4.5.


What is ActivePython?
-

ActivePython is ActiveState's binary distribution of Python. Builds for
Windows, Mac OS X, Linux, HP-UX and AIX are made freely available.

ActivePython includes the Python core and the many core extensions:
zlib and bzip2 for data compression, the Berkeley DB (bsddb) and
SQLite (sqlite3, ActivePython 2.5 only) database libraries, OpenSSL
bindings for HTTPS support, the Tix GUI widgets for Tkinter,
ElementTree for XML processing (ActivePython 2.5 only), ctypes (on
supported platforms, ActivePython 2.5 only) for low-level library
access, and others. The Windows distribution ships with PyWin32 -- a
suite of Windows tools developed by Mark Hammond, including bindings
to the Win32 API and Windows COM. See this page for full details:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/whatsincluded.html

As well, ActivePython ships with a wealth of documentation for both new
and experienced Python programmers. In addition to the core Python docs,
ActivePython includes the "What's New in Python" series, "Dive into
Python", the Python FAQs & HOWTOs, and the Python Enhancement Proposals
(PEPs).

An online version of the docs can be found here:
 http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/welcome.html
 http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/welcome.html

We would welcome any and all feedback to:
 [EMAIL PROTECTED]

Please file bugs against ActivePython at:
 http://bugs.activestate.com/query.cgi?product=ActivePython


On what platforms does ActivePython run?


ActivePython includes installers for the following platforms:

- Windows/x86
- Mac OS X
- Linux/x86
- Solaris/SPARC
- Solaris/x86
- Windows/x64 ("x64" is also known as "AMD64")
- Linux/x86_64 ("x86_64" is also known as "AMD64")
- HP-UX/PA-RISC
- AIX/PowerPC


Extra Bits
--

ActivePython releases also include the following:

- ActivePython24.chm, ActivePython25.chm: An MS compiled help collection
   of the full ActivePython documentation set. Linux users of
   applications such as xCHM might find this useful. This package is
   installed by default on Windows.

Extra bits are available from:
 http://downloads.activestate.com/ActivePython/etc/


Apologies for the delay. I was crazy-busy getting the Komodo 4.3 release
out. Check it out:
 http://www.activestate.com/products/komodo/

Thanks, and enjoy!

Trent, Python Tech Lead

--
Trent Mick
trentm at activestate.com



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Module not found in script that was found in command-line interpreter. Possible Path issue?

2008-04-03 Thread Trent Mick
Jacob Davis wrote:
> I just installed the MySQLdb module and I have been able to get it to 
> run in my command line interpreter. 
> 
> I am running Mac Leopard, and Python 2.5.
> 
>  I have tested importing and actually connecting and using a MySQL 
> database, although it issues some warning:
> 
> SnakeBite:MySQL-python-1.2.2 Snake$ python
> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) 
> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import MySQLdb
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg/_mysql.py:3:
>  
> UserWarning: Module _mysql was already imported from 

 From that message it looks like this "python" is /usr/local/bin/python 
(i.e. a separate installation than Apple's system python at 
/usr/bin/python and /System/Library/Frameworks/Python.framework).

You can tell for sure by doing:

   $ which python

> However, while writing a .py script (with Komodo Edit) I try to simply 
> import the module and the in-Komodo interpreter returns an error:
> Traceback (most recent call last):
>   File 
> "/Users/Snake/Documents/NPS/Thesis/Source_Code/Genetics/mysql_connect_test.py",
>  
> line 11, in 
> import MySQLdb
> ImportError: No module named MySQLdb

I suspect that this is because your run of Komodo Edit doesn't have 
"/usr/local/bin" on its PATH and is using "/usr/bin/python" instead of 
the one you typically use on the command line.

You can configure Komodo to know about /usr/local/bin by adding a "PATH" 
setting in the "Environment" prefs panel. Arguably Komodo should just 
add /usr/local/bin to its runtime PATH by default, but unfortunately it 
currently doesn't. Komodo doesn't pick up your normal bash shell 
environment because of problems trying to get that information in general.

Please let me know (or on the komodo-discuss list [^1] or Komodo bug 
database [^2]) if you have any problems getting that going.

Cheers,
Trent

[1]: http://listserv.activestate.com/mailman/listinfo/Komodo-discuss
[2]: http://bugs.activestate.com/query.cgi?product=Komodo

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: system32 directory

2008-03-06 Thread Trent Mick
> I was aiming to figure out if the standard modules shipped with Python 
> could do this already before I started using 3rd party libraries. Thanks.

You could also manage it with the ctypes module, if you consider that 
standard: it is in the python.org and ActivePython distros as of Python 2.5.

Cheers,
Trent

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Puzzled by "is"

2007-08-10 Thread Trent Mick
Dick Moores wrote:
> At 06:13 PM 8/9/2007, Ben Finney wrote:
>> It's important to also realise that the language is *deliberately*
>> non-committal on whether any given value will have this behaviour;
>> that is, it's entirely left to the language implementation which
>> optimisation trade-offs to make, and the language user (that's you and
>> I) should *not* expect any particular behaviour to hold between
>> different implementations.
> 
> I'm not clear on the meaning of "implementations" 
> here.  Would 2.5 for Windows, Mac, Linux all be 
> different implementations? Would Iron Python be another? ActivePython?

(Note that I'm jumping into this without having read the thread, so 
apologies if I didn't grasp the question in its proper context.)

Separate Python "implementations" generally refers to a separate source 
code base for that Python build. According to that definition, current 
examples of Python implementations are: CPython (from python.org, 
C-based), Jython (Java-based), Stackless Python (I'm not that familiar 
to how much of the CPython source code, if any, Stackless borrows), 
IronPython (.NET/C#-based), possibly PyPy (Python-based, I'm not that 
familiar with it). Also eventually interesting might be the recently 
announced IronMonkey (http://wiki.mozilla.org/Tamarin:IronMonkey).

Windows, Mac, Linux, etc. installations/builds/installers of a 
particular implementation would be different platform *builds* (my 
language).

ActivePython is a separate (from python.org's) *distribution* of CPython 
-- i.e. the sample implementation as CPython (same source code). This is 
similar, in some respects, to SuSE, Debian, RedHat, Ubuntu, etc. being 
different distributions of Linux.


Trent

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ActivePython

2007-07-04 Thread Trent Mick
Frank Swarbrick wrote:
> Why might one choose to use ActivePython instead of using the free CPython?

Expanding on what Alex already said, there are a few reasons:

1. On Windows, ActivePython also includes the PyWin32 [1] extensions 
which otherwise you'd have to install separately over a python.org install.

2. ActivePython includes ready-to-install packages for more platforms 
(some of which the python.org distros also cover, of course):
 * Windows/x86 and Windows/x64,
 * Mac OS X (Universal build),
 * Linux/x86 and Linux/x86_64,
 * Solaris SPARC and x86,
 * HP-UX, and
 * AIX.
For some of these platforms (e.g. Linux), a fair amount of work has been 
done to ensure you can use all of the core extensions (e.g. Tkinter, 
bsddb, bzip2, etc.) out of the box without running into dependency 
issues. ActivePython's installer on the Un*x platforms also makes it 
easy to install either in a shared location or in a user-specific location.

3. ActivePython includes a number of extra documentation sets that may 
prove useful to some. E.g. "Dive Into Python", a non-programmer's 
tutorial for Python, the Python HOWTOs, a snapshot of the Python PEPs, 
the Python FAQs, back copies of Andrew Kuchling's excellent "What's New 
in Python"



Some sometimes mentioned, but untrue reasons to avoid ActivePython:

- It doesn't include OpenSSL bindings.
   As of ActivePython 2.5.0.0, full SSL bindings are included.

- It isn't free.
   See my answer to Steve, below.

- It isn't compatible with python.org's Python distro.
   It is. If there is a case where this isn't the case, it is a serious bug.


Some more details here:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/whatsincluded.html


To answer some questions from others on this thread:

tleeuwenburg wrote:
 > Well, Komodo is a nice enough IDE, so you might choose to use
 > ActivePython for integration reasons, and maybe it's a little easier
 > on Windows.
 >
 > However, I would have thought that if you were planning to distribute
 > an application, you would want to choose CPython for maximum
 > interoperability with external packages.

Note that Komodo in no way, "prefers" ActivePython over a python.org 
installation. One of the primary requirements of ActivePython is to 
fully binary compatible with a python.org build of the same version -- 
if it isn't, it is a serious bug. As well, with Komodo we aren't *at 
all* interested in locking people in to our language distros. (BTW: I 
also work on Komodo.)


 > The ActiveState web page doesn't
 > really talk about their reasons very much.

As to reasons for ActivePython: ActiveState believes in the dynamic 
languages (all of the developers here are very passionate about that) 
and we are both happy to and view it as in our best interests to do what 
we can to ensure that the dynamic language communities are vibrant and 
competitive with the more corporate-backed languages and technologies.

Of course, it isn't pure altruism, but more of a symbiosis. ActiveState 
provides for-pay contracts for Perl, Python and Tcl distributions for 
things like specific support and builds (for example, some companies are 
happy to pay for the leg-work for an up-to-date Python installer for an 
old version of HP-UX that supports their C++ extensions).

Generally, any patches that we've worked on for these kinds of things 
are provided back to the language cores so that everyone benefits. As 
well, these contracts allow us to maintain a large number of build and 
test machines for the for-pay and free Active* distros -- and to buy 
food for developers such as myself.


Steve Holden wrote:
 > ...the last time I looked the ActivePython distribution
 > doesn't allow redistribution at all (i.e. it's not technically open
 > source).

Steve is correct that ActivePython isn't open source. It is free (as in 
beer), meaning that it is completely free for you to download, install 
and use on as many machines as you want.

As to redistribution: Yes, it is technically correct that you cannot 
fully redistribute ActivePython without our permission. However, 
ActivePython's license expressly *does* allow you to use the "freezing" 
utilities such as "py2exe" and "py2app" -- so you have no worries there. 
  For fully embedding Python in an application, in my experience [2] 
you'll want to be building your own Python anyway.


Sincerely,
Trent
Python Tech Lead at ActiveState
also, a Komodo developer


[1] PyWin32 is primarily a set of extensions that provide Python 
bindings to much of the Windows API and to Windows COM. It also includes 
an editor/IDE called PythonWin. <http://sourceforge.net/projects/pywin32/>

[2] Komodo embeds its own Python build for doing a lot of the core 
logic. A custom Python build is generally necessary to avoid 
cross-talking between Komodo's Python and other possible Pythons on the 
system.


-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: what is the PythonWin

2007-07-03 Thread Trent Mick
Dennis Lee Bieber wrote:
>   PythonWin is (or was) part of the win32 extension library for
> Python. It is a separate download -- unless you downloaded the
> ActiveState Windows build of Python. The ActiveState build includes the
> win32 libraries and "PythonWin" (but lacks a few of the, otherwise
> standard, encryption stuff -- which can be copied from a comparable
> [version-wise] python.org release).

Note that it is no longer true that ActivePython does not include the 
standard encryption stuff (namely OpenSSL support for the socket module 
and the hashlib libraries). As of ActivePython 2.5.0.0 full SSL support 
is available.

Cheers,
Trent

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: preferred windows text editor?

2007-05-09 Thread Trent Mick
[EMAIL PROTECTED] wrote:
> I like IDLE but it seems to stop working after the first few times and
> I would then re-install it and it would work a few times more.
> ActivePython was cool but I could not find a version of it that used
> Python 2.5 (as far as I can see, it only uses 2.4)

ActivePython is the distribution of Python. The distro includes PyWin32 
(a bunch o' Windows stuff for Python). Part of that stuff is "Pythonwin" 
-- the editor that you are probably referring to.

There is an ActivePython 2.5.1 now:
http://www.activestate.com/products/activepython/

You should give Komodo Edit a try too:
http://www.activestate.com/products/komodo_edit/


Cheers,
Trent

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: ActivePython 2.5.1.1 is now available

2007-05-04 Thread Trent Mick
I'm happy to announce that ActivePython 2.5.1.1 is now available for
download from:
 http://www.activestate.com/products/activepython/

This is a patch release that updates ActivePython to core Python 2.5.1.
This release also fixes a couple problems with running pydoc from the
command line on Windows. See the release notes for full details:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/relnotes.html


What is ActivePython?
-

ActivePython is ActiveState's binary distribution of Python. Builds for
Windows, Mac OS X, Linux, HP-UX and AIX are made freely available.

ActivePython includes the Python core and the many core extensions: zlib
and bzip2 for data compression, the Berkeley DB (bsddb) and SQLite
(sqlite3) database libraries, OpenSSL bindings for HTTPS support, the
Tix GUI widgets for Tkinter, ElementTree for XML processing, ctypes (on
supported platforms) for low-level library access, and others. The
Windows distribution ships with PyWin32 -- a suite of Windows tools
developed by Mark Hammond, including bindings to the Win32 API and
Windows COM. See this page for full details:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/whatsincluded.html

As well, ActivePython ships with a wealth of documentation for both new
and experienced Python programmers. In addition to the core Python docs,
ActivePython includes the "What's New in Python" series, "Dive into
Python", the Python FAQs & HOWTOs, and the Python Enhancement Proposals
(PEPs).

An online version of the docs can be found here:
 http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/welcome.html

We would welcome any and all feedback to:
 [EMAIL PROTECTED]

Please file bugs against ActivePython at:
 http://bugs.activestate.com/query.cgi?set_product=ActivePython


On what platforms does ActivePython run?


ActivePython includes installers for the following platforms:

- Windows/x86
- Mac OS X
- Linux/x86
- Solaris/SPARC
- Solaris/x86
- Windows/x64 ("x64" is also known as "AMD64")
- Linux/x86_64 ("x86_64" is also known as "AMD64")
- HP-UX/PA-RISC
- AIX/PowerPC


Extra Bits
--

ActivePython releases also include the following:

- ActivePython25.chm: An MS compiled help collection of the full
   ActivePython documentation set. Linux users of applications such as
   xCHM might find this useful. This package is installed by default on
   Windows.

Extra bits are available from:
 http://downloads.activestate.com/ActivePython/etc/


Thanks, and enjoy!

Trent, Python Tech Lead

--
Trent Mick
trentm at activestate.com


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Support SSL for Solaris 10

2007-04-05 Thread Trent Mick
campos wrote:
> Last time I installed Python 2.5 by default, it didn't support SSL.
> When I tried to use HTTPS, the following error occured:
> AttributeError: 'module' object has no attribute 'ssl'

The ActivePython 2.5 builds for Solaris on SPARC (the "solaris8-sparc" 
build) supports OpenSSL. Note that the Solaris on *x86* ActivePython 
build does not because there were build errors for that extension that 
haven't yet been resolved.

http://www.activestate.com/products/activepython/

Cheers,
Trent

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Where to find pywin32/win32all for Python 1.5.2?

2007-04-03 Thread Trent Mick
Jack wrote:
> I searched around but could not find win32all source or binaries for earlier 
> versions of Python. Don't ask me why but I have to use Python 1.5.2 in this 
> project :) The sourceforget page only has latest versions. ActiveState does 
> not even have 1.5.2 for download. Is it still available somewhere? Thanks! 

Python 1.5.2 was release way before ActiveState started doing 
ActivePython, so no luck there. :(

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: ActivePython 2.5.0.0 is now available

2007-03-15 Thread Trent Mick
[EMAIL PROTECTED] wrote:
> 
> is ctypes supported on ActivePython for Windows x64?
> 

No.
http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/whatsincluded.html

My understanding (from http://www.python.org/sf/1545507) is that ctypes isn't 
yet ported to Windows/AMD64.  That may have changed though.

Trent

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: ActivePython 2.5.0.0 is now available

2007-03-13 Thread Trent Mick
Yes.

Wensui Liu wrote:
> Is it free of charge?
> 
> On 3/13/07, Trent Mick <[EMAIL PROTECTED]> wrote:
>>...
>> ActivePython is ActiveState's binary distribution of Python. Builds for
>> Windows, Mac OS X, Linux, HP-UX and AIX are made freely available.
>>...

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ActivePython 2.5.0.0 is now available

2007-03-13 Thread Trent Mick
Bror Johansson wrote:
> I did notice the download earlier today and I have installed it on five 
> Windows-machines (two WinXPPro and three Win2K) and have found one 
> consistent error.
> 
> Whenever I try Help->Python Manuals from PythonWin I get this errormessage:
> 
> "Internal error in help file processing :(2, 
> 'ShellExecute', 'Det går inte att hitta filen.')
> 
> The last few words are swedish (the machine I'm using right here is arunning 
> a swedish WinXP) and has this meaning: "It's not possible to find the file".
> 
> Is there a remedy for this problem?

http://bugs.activestate.com/show_bug.cgi?id=68029

I don't currently have a work around for it. I should be able to fix this for 
the next release (but don't have a date for that yet). You could CC yourself 
to that bug report to get a notification for when it is fixed, if you like.

Thanks,
Trent

-- 
Trent Mick
trentm at activestate.com
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: ActivePython 2.5.0.0 is now available

2007-03-13 Thread Trent Mick
I'm happy to announce that ActivePython 2.5.0.0 is now available for download
from:
 http://www.activestate.com/products/activepython/

This is the first release of ActivePython for Python version 2.5. Apologies
for the long delay between core Python 2.5 and this release. The good news is
that part of the reason for this delay was to finally get approval to include
crypto in ActivePython, hence:

Changes in this release include:
- Full OpenSSL support (finally!)
- Update to Python 2.5 (duh)
- [Mac OS X] Universal build (finally!)
- [Windows] Update to PyWin32 build 210
- All the new standard extensions: SQLite, ctypes, ElementTree
- [Linux] Rationalized the build names.
- [Mac OS X] A sane uninstall script

See the release notes for full details:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/relnotes.html


What is ActivePython?
-

ActivePython is ActiveState's binary distribution of Python. Builds for
Windows, Mac OS X, Linux, HP-UX and AIX are made freely available.

ActivePython includes the Python core and the many core extensions: zlib and
bzip2 for data compression, the Berkeley DB (bsddb) and SQLite (sqlite3)
database libraries, the Tix GUI widgets for Tkinter, ElementTree for XML
processing, ctypes (on supported platforms) for low-level library access, and
others. The Windows distribution ships with PyWin32 -- a suite of Windows
tools developed by Mark Hammond, including bindings to the Win32 API and
Windows COM. See this page for full details:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/whatsincluded.html

As well, ActivePython ships with a wealth of documentation for both new and
experienced Python programmers. In addition to the core Python docs,
ActivePython includes the "What's New in Python" series, "Dive into Python",
the Python FAQs & HOWTOs, and the Python Enhancement Proposals (PEPs).

An online version of the docs can be found here:
 http://aspn.activestate.com/ASPN/docs/ActivePython/2.5/welcome.html

We would welcome any and all feedback to:
 [EMAIL PROTECTED]

Please file bugs against ActivePython at:
 http://bugs.activestate.com/query.cgi?set_product=ActivePython


On what platforms does ActivePython run?


ActivePython includes installers for the following platforms:

- AIX/PowerPC
- HP-UX/PA-RISC
- Linux/x86
- Linux/x86_64: "x86_64" is also known as "AMD64"
- Solaris/SPARC
- Solaris/x86
- Mac OS X
- Windows/x64: "x64" is also known as "AMD64"
- Windows/x86


Extra Bits
--

ActivePython releases also include the following:

- ActivePython25.chm: An MS compiled help collection of the full
   ActivePython documentation set. Linux users of applications such as
   xCHM might find this useful. This package is installed by default on
   Windows.

Extra bits are available from:
 http://downloads.activestate.com/ActivePython/etc/


Thanks, and enjoy!

Trent, Python Tech Lead

--
Trent Mick
trentm at activestate.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for amd64 and x86 on Windows

2007-03-12 Thread Trent Mick
Hengel, Simon wrote:
> Hello List,
> I need the amd64 and the x86 version of Python installed on one Windows 
> machine. Is there a way to do this? (I think I read about it somewhere, but 
> now I can't find it anymore)

Bit of a hack but you could install the MSI ActivePython package for one and 
the "AS Package" (*) ActivePython package for the other.

http://downloads.activestate.com/ActivePython/windows/2.4/
ActivePython-2.4.3.12-win32-x86.msi
ActivePython-2.4.3.12-win64-x64-nopywin32.zip

(*) "AS Package" is simple "zip file plus an install script" installer that 
ActivePython includes in addition to the usual (and preferred MSI installer).

Trent

p.s. ActivePython 2.5 builds will be out this week.

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: nokia s60 python code debugging with komodo

2007-03-09 Thread Trent Mick
[EMAIL PROTECTED] wrote:
> anyway I can setup and debug nokia s60 python in komodo ( a python IDE
> )?

Apoloies for the crazy-late reply. We tried to get Python debugging working on 
Nokia phones a while back but couldn't get far because the socket 
implementation of the Nokia Python port wasn't up to snuff.

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyxpcom

2006-11-29 Thread Trent Mick
hg wrote:
> Trent Mick wrote:
>>> My need is as follows: I have developed an activex component to access a
>>> smart card on the client side / do some web site logon.
>>>
>>> Are xpcom / pyxpcom advanced/stable enough for such an implementation
>>> under Linux / Windows ?
>> You mean to provide the equivalent functionality for Firefox that your
>> activex component does for IE? Yes, xpcom and pyxpcom are quite stable,
>> however putting together a Firefox extension that gets PyXPCOM itself up
>> and running in a client's Firefox install will be quite challenging.
>>
>> Trent
>>
> Exactly ... are you saying I need to distribute Firefox compiled
> differently in order to achieve that ?

No. But you'll have to get comfortable building your own Firefox and then 
building the PyXPCOM extension and then packaging the built PyXPCOM bits that 
a normal Firefox install does not have already into a Firefox extension. This 
would also mean packaging up parts of a Python build and possible needing to 
have a custom Python build to (1) get shared library loading to work correct 
and (2) ensure there isn't crosstalk between the python that PyXPCOM uses and 
possibly other Python installations on the target machine.

> This is less a python issue clearly if that is the case: would I have
> the same issues to resolve if I were to write the module in C++ ?

A little, yes: I believe you'd need a Firefox build in a development tree to 
build a vanilla C++ XPCOM component. However, I am not sure of that.

Mostly, no: You wouldn't need to worry about all the PyXPCOM/Python 
build/install issues.


Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyxpcom

2006-11-28 Thread Trent Mick
> My need is as follows: I have developed an activex component to access a
> smart card on the client side / do some web site logon.
> 
> Are xpcom / pyxpcom advanced/stable enough for such an implementation
> under Linux / Windows ?

You mean to provide the equivalent functionality for Firefox that your activex 
component does for IE? Yes, xpcom and pyxpcom are quite stable, however 
putting together a Firefox extension that gets PyXPCOM itself up and running 
in a client's Firefox install will be quite challenging.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyxpcom

2006-11-28 Thread Trent Mick
hg wrote:
> Hi,
> 
> Can one tell me what the status of this project is ?. I did google ...
> but not much out there.

PyXPCOM source is in the main Mozilla CVS tree. It is being maintained by Mark 
Hammond (the original developer of the extension). There isn't a lot of 
activity on it, I think, because:
1. Mark did such a good job of implementing it the first time around that it 
needs very little work :)
2. It is very high learning curve to get into playing with PyXPCOM because 
there are no conveniently packaged builds of PyXPCOM for current (or any) 
versions of Firefox or Mozilla.

Interestingly, Mark is currently working *full* support for Python in the 
Mozilla code base, i.e. being able to use Python anywhere you can currently 
use JavaScript (in 

Re: Active State and Komodo...

2006-11-27 Thread Trent Mick
Steve Thompson wrote:
> Hello all,
> 
> I was wondering the differnced there were betwee Active State's python and
> the open source version of python. 

Here is the best answer to that:
http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/e8291fcb1418e80/16f39060f654402f?rnum=1&hl=en&q=ActivePython+trent&_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2Fe8291fcb1418e80%2F98c87a6a5dc8f3c0%3Ftvc%3D1%26q%3DActivePython+trent%26hl%3Den%26#doc_b6f732ab2c8434ef
http://tinyurl.com/y7r47q


> Would I have to unistall my opend souce
> python? 

No. As BartlebyScrivener wrote you shouldn't do that. You can easily install 
ActivePython side-by-side with another Python install on Linux.


 > Additonally, how does Active State's Komodo IDE vs. the eric3 IDE
> unler SuSE Linux v. 10.i?
> 
> Addionally, is the eric IDE (version 3) an acceptible IDE or are there
> more easy and more productive IDE's for perl?

*I* like Komodo, but then I am biased because I am one of its developers. :)
I presume you meant Python instead of Perl there, but if not, Komodo does 
support Perl as well as Python (and PHP, JavaScript, Ruby, Tcl and XSLT too).

This is a pretty good review of Python IDEs (although note that most, if not 
all, of the IDEs reviewed there will have advanced a few versions).

http://spyced.blogspot.com/2005/09/review-of-6-python-ides.html


Komodo 4 is currently under public beta (Komodo 4 beta 1 is out now and beta 2 
should be released later this week). Try it out:

http://www.activestate.com/products/komodo/beta.plex#features


Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: uninstall and Windows file associations

2006-11-02 Thread Trent Mick
Roger Miller wrote:
> When I installed Python 2.5 (on Windows XP) I left 2.4 in place "just
> in case". Today I decided to remove it. However after doing so (from
> the control panel) I found that Windows no longer knows about the
> Python file types and associations. Is this behavior expected, or was
> there something wrong with my installation? Is there a way to restore
> the file associations, short of reinstalling 2.5 or manually editing
> them?

ActivePython handles that case by providing a "Repair" functionality in the 
installer. I'm not sure if the python.org Windows installer has that 
functionality (it probably does). Just try invoking the .msi file again.

And, as Neil said, you can just reinstall.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-19 Thread Trent Mick
Christopher Taylor wrote:
> RHEL comes with Python2.3 installed.  A program I need to install
> requires Python2.4

ActivePython has a 2.4 build for Linux/x86_64:

http://www.activestate.com/Products/ActivePython/

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python 2.5 & sqlite3

2006-10-12 Thread Trent Mick
> if it doesn't, it wouldn't be the first time they'd (by accident or on 
> purpose) left things out.  

Other than SSL, do you have examples?

 > trust me, it'd cause a lot less confusion if
> ActivePython was a true superset of the python.org distribution.

For every extension except SSL support (*) it is.

(*) Still working on export-control legals for that. I was hoping to 
have that ready for ActivePython 2.5. But that doesn't look like it will 
happen on time. And now I've missed getting ActivePython 2.5 out soon 
after Python 2.5 because I'm focussed on Komodo 4.0 for now.

For others, unfortunately ActivePython 2.5 will probably not be ready 
until mid-November.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Active Python versions

2006-06-19 Thread Trent Mick
Tom Del Rosso wrote:
> [EMAIL PROTECTED] <[EMAIL PROTECTED]> typed
> in news://[EMAIL PROTECTED],
> 
>> Maybe the OP is refering to PythonWin editor (as compared to IDLE)
>> which is in ActiveState's release but not in the Python.org release...
>> makes for a very different subject, and hopefully for very different
>> answer direction.
> 
> Yes.  I just wanted to know which programming environment is prefered by
> regular users, maybe even one that I haven't heard of yet.

Ah, the PythonWin IDE/Editor is part of PyWin32 -- which is included as 
a standard part of ActivePython. IDLE is also included in ActivePython, 
BTW. ActivePython just doesn't setup a shortcut in the Start Menu for 
it. You could add your own.

As jean-marc suggests, you might want to search the python-list archives 
for peoples opinions on Python IDEs and editors. Also check out:

http://wiki.python.org/moin/IntegratedDevelopmentEnvironments
http://wiki.python.org/moin/PythonEditors

ActiveState has a Python IDE called Komodo
http://www.activestate.com/Products/Komodo/
which I work on (so I'm biased :).

Trent

-- 
Trent Mick
[EMAIL PROTECTED]

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Active Python versions

2006-06-19 Thread Trent Mick
Tom Del Rosso wrote:
> Can I ask you about alternative environments?  How do Active Python and IDLE
> from python.org compare?  

Both ActivePython and the Python installers from python.org install 
IDLE. They should not differ at all (AFAIK).

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Active Python versions

2006-06-19 Thread Trent Mick
Tom Del Rosso wrote:
> Why is the Windows msi install file for ActivePython-2.4.3.12 only 15MB
> whereas the older msi file for ActivePython-2.4.2.10 was 19MB?
> 
> BTW, is that the prefered Python environment?

Are you sure you are comparing the right packages? By my count:

ActivePython-2.4.2.10-win32-x86.msi 19,053 KB
ActivePython-2.4.3.12-win32-x86.msi 19,237 KB

Note that the Windows *64-bit* builds are smaller (around 15MB) because 
they do not include PyWin32.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Using Komodo 3.5 - Setting breakpoints in multiple *.py files

2006-06-19 Thread Trent Mick
jeem wrote:
> I am using ActiveState Komodo 3.5 to work on a large python 2.4
> application with an extensive UI...  I am attempting to debug the
> application and am setting breakpoints in 4 different *.py files..
> Breakpoints in the main file are working OK, but any breakpoints in
> imported files are not... The three imported files are open in Komodo
> and are in the same local directory as the main file (in the
> python24/Lib/site-packages tree)... The code sections I am trying to
> debug are invoked by some UI events...  When I start the debugging
> section and navigate to the features I am trying to debug, the
> breakpoint are ignored...  I can execute a "Break now" command and the
> IDE is smart enough to find and display imported *.py resources... but
> normal breakpoints are ignored...

It works for me in a trivial example:

C:\trentm\tmp\foo>cat foo.py

print "hi from foo"
import bar
bar.bar()
print "bye from foo"

C:\trentm\tmp\foo>cat bar.py

def bar():
 print "hi from bar.bar()"
 print "bye from bar.bar()"

I set breakpoints on the "import bar" line in foo.py and on the 'print 
"hi...' line in "bar.py". Started debugging "foo.py" and the debugger 
breaks on both breakpoints.

If you step into the "import" statements in your debug session, are the 
imported modules the ones you expect? I.e. in my example the breakpoint 
would not have worked if "bar.py" had been imported from another 
location on my sys.path.


Note: this might be better discussed on the komodo-discuss mailing list.
(http://listserv.activestate.com/mailman/mysubs)

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: ActivePython 2.4.3.12 is now available (bugfix for Windows)

2006-04-12 Thread Trent Mick

I'm happy to announce that ActivePython 2.4.3.12 builds for Windows are
now available for free download from:
http://www.ActiveState.com/Products/ActivePython/

This is a bug fix release to for one Windows issue:
- Fix a bug that results in ".pyo" and ".pyc" being placed on the
  PATHEXT environment variable before ".py" for clean installs. Bug
  33311. This can cause surprises for command-line usage for Python
  scripts when not specifying the ".py" extension. The new installer
  will fix PATHEXT on machines that hit this bug. See this thread for
  more details:
  http://tinyurl.com/poyhp

If you use ActivePython on any other platform, 2.4.3.11 is still the
latest build.


What is ActivePython?
-

ActivePython is ActiveState's quality-assured binary distribution of
Python. Builds for AIX, HP-UX, Linux, Mac OS X, Solaris, and Windows 
are made freely available.

ActivePython includes the Python core and core extensions (zlib 1.2.3,
bzip2 1.0.3, bsddb 4.2.52.NC, Tk 8.4.12, and Tix 8.1.4) and is fully
compatible with other Python distributions of the same version.

ActivePython also includes a wealth of Python documentation, including:
- the core Python docs;
- Andrew Kuchling's "What's New in Python" series;
- the Non-Programmer's Tutorial for Python;
- Mark Pilgrim's excellent "Dive into Python"; and
- a snapshot of the Python FAQs, HOWTOs, and PEPs.

An online version of the docs can be found here:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/welcome.html

We would welcome any and all feedback to:
[EMAIL PROTECTED]

Please file bugs against ActivePython at:
http://bugs.ActiveState.com/ActivePython


On what platforms does ActivePython run?


ActivePython now includes installers for the following ten platforms:

- AIX/PowerPC
- HP-UX/PA-RISC
- Linux/x86
- Linux/x86_64: "x86_64" is also known as "AMD64"
- Solaris/SPARC
- Solaris/x86
- Mac OS X/PowerPC
- Mac OS X/x86
- Windows/x64: "x64" is also known as "AMD64"
- Windows/x86


Extra Bits
--

ActivePython releases also include the following packages:

- Windows "debug" package: Debug-built binaries for ActivePython
  users building debug versions of their binary Python extensions.
- ActivePython24.chm: An MS compiled help collection of the full
  ActivePython documentation set. Linux users of applications such as
  xCHM might find this useful. This package is installed by default on
  Windows.

These packages are available from:
ftp://ftp.activestate.com/ActivePython/etc/


Thanks, and enjoy!

Trent, Python Tech Lead

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can't pass command-line arguments

2006-04-11 Thread Trent Mick
> You're welcome, and thanks for following this through.  I still have 
> machines around that have PATHEXT=.pyc;.py;... and will now remove .pyc 
> from all of them.  It would probably be nice to trace this back to the 
> origin, find whether there was a good rationale for it being that way in 
> the first place, and either update a FAQ somewhere or get the problem 
> fixed once and for all.
> 
> I don't think the standard install messes with PATHEXT, so my bet is on 
> ActiveState right now.  Can anyone confirm?  Trent, if you're reading 
> this and it is from ActiveState's distribution, do you know where that 
> PATHEXT=.pyc;.py choice came from and whether it might have been an 
> ill-advised decision that should be undone?

Yes, I can confirm as well. This is a bug in ActivePython.  Definitely
not an intended decision. That is: having .pyc (and/or .pyo) before .py
(and/or .pyw) on PATHEXT is definitely a bug.  The ActivePython MSI just
added the .pyc, .pyo, .py and .pyw extensions to PATHEXT *backwards*. My
apologies for not having caught this.

http://bugs.activestate.com/ActivePython/show_bug.cgi?id=33311

As to whether to have .pyc (ditto .pyo) on PATHEXT at all: ActivePython
has been doing so since time immemorial. I think that ActivePython
should stop doing that (as implied by Duncan) unless someone can suggest
a reason why to keep it. The only use case would be for calling a Python
script on Windows without specifying the extension *and* for which there
is ONLY a .pyc or .pyo. That seems to unlikely (or uncommon) a scenario
to justify it.

I'll get a new ActivePython for Windows out soon to take .pyo and .pyc
off of PATHEXT.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to write a python program to export the help document to a file?

2006-04-10 Thread Trent Mick
[boyeestudio wrote]
> How to write a python program to export the help document to a file?
> for example:
>I need the os document,I use:
> >>>import os
> >>>help(os)
> then it will show me all about os.But I need it redirect to a file.
> How to do that?

    $ pydoc os > os.txt

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: ActivePython 2.4.3.11 is now available

2006-04-06 Thread Trent Mick
I'm happy to announce that ActivePython 2.4.3.11 is now available for free
download from:
http://www.ActiveState.com/Products/ActivePython/

This release is a maintenance/update release for existing platforms.

Changes in this release include:
- [Windows] Update to recent PyWin32 (build 208.1+)
- Update to bzip2 1.0.3 (from 1.0.2) [bug 45239]
- Update to Python 2.4.3
- [Windows] Fix a bug where the PyWin32 docs Table of Contents did not appear
  in the ActivePython CHM.
- [Mac OS X] Fix errors in the build number in the Python.framework
  Info.plist and version.plist.


ActivePython on Mac OS X


Currently ActivePython provides separate Intel and PowerPC builds for Mac OS
X rather than one universal build. Note that in the relatively near future
ActivePython will switch to a universal build.


What is ActivePython?
-

ActivePython is ActiveState's quality-assured binary distribution of
Python. Builds for AIX, HP-UX, Linux, Mac OS X, Solaris, and Windows 
are made freely available.

ActivePython includes the Python core and core extensions (zlib 1.2.3,
bzip2 1.0.3, bsddb 4.2.52.NC, Tk 8.4.12, and Tix 8.1.4) and is fully
compatible with other Python distributions of the same version.

ActivePython also includes a wealth of Python documentation, including:
- the core Python docs;
- Andrew Kuchling's "What's New in Python" series;
- the Non-Programmer's Tutorial for Python;
- Mark Pilgrim's excellent "Dive into Python"; and
- a snapshot of the Python FAQs, HOWTOs, and PEPs.

An online version of the docs can be found here:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/welcome.html

We would welcome any and all feedback to:
[EMAIL PROTECTED]

Please file bugs against ActivePython at:
http://bugs.ActiveState.com/ActivePython


On what platforms does ActivePython run?


ActivePython now includes installers for the following ten platforms:

- AIX/PowerPC
- HP-UX/PA-RISC
- Linux/x86
- Linux/x86_64: "x86_64" is also known as "AMD64"
- Solaris/SPARC
- Solaris/x86
- Mac OS X/PowerPC
- Mac OS X/x86
- Windows/x64: "x64" is also known as "AMD64"
- Windows/x86


Extra Bits
--

ActivePython releases also include the following packages:

- Windows "debug" package: Debug-built binaries for ActivePython
  users building debug versions of their binary Python extensions.
- ActivePython24.chm: An MS compiled help collection of the full
  ActivePython documentation set. Linux users of applications such as
  xCHM might find this useful. This package is installed by default on
  Windows.

These packages are available from:
    ftp://ftp.activestate.com/ActivePython/etc/


Thanks, and enjoy!

Trent, Python Tech Lead

--
Trent Mick
TrentM at ActiveState.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Exception handling....dumb question?

2006-03-31 Thread Trent Mick
[kbperry wrote]
> In Python,
> When using the default except (like following)
> 
> try:
> some code that might blow up
> 
> except:
> print "some error message"


>>> try:
... 1/0
... except:
... import traceback
... traceback.print_exc()
...
Traceback (most recent call last):
  File "", line 2, in ?
ZeroDivisionError: integer division or modulo by zero


Or, if you are using the logging module:

>>> import logging
>>> log = logging.getLogger("myscript")
>>> logging.basicConfig()
>>>
>>> try:
... 1/0
... except:
... log.exception("whoa!")
...
ERROR:myscript:whoa!
Traceback (most recent call last):
  File "", line 2, in ?
ZeroDivisionError: integer division or modulo by zero


Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python crashes in Komodo

2006-03-12 Thread Trent Mick
[swisscheese wrote]
> Using the Komodo IDE under XP I often get "python.exe has encountered a
> problem and needs to close". Running python direct on the same app
> gives a list index out of bounds error. Any ideas how to get Komodo to
> give the proper error?

Jim,
Have you logged a bug in our bug tracker?
http://bugs.activestate.com/Komodo/enter_bug.cgi
My apologies if you have and we haven't had a chance to get to it.

Note that we'd need specific details to have a chance at knowing what
the problem was. Komodo version. Python version. An example Python
script showing the crash would be invaluable. What OS are you on. Etc.
etc.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: lighter weight options to Python's logging package?

2006-03-10 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> We use the standard logging package and frequently bump into performance
> issues with it (we log a lot of information).  When that happens, we then go
> through our code and dump a bunch of logging calls we think we can live
> without.  This invariably causes problems because we get overzealous and
> delete something we needed and are then unable to do some bit of post-mortem
> debugging until we add back in the missing logging and cut another release.
> 
> Before I consider writing something from scratch, is there something lighter
> weight "floating around" out there already?

Do you have any profile information for where in the logging package the
time is being spent? I don't know how much of a perf issue it is for
you. Perhaps tweaking your usage of the logging package (perhaps using
custom Loggers, Filters, outputters, etc.) could be made "good enough".

Trent


-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how about adding ping's uuid module to the standard lib ?

2006-03-07 Thread Trent Mick
[Fredrik Lundh wrote]
> see subject and http://python.org/sf/1368955
> 
> comments ?

+1, once it has been vetted a bit (as is being done on the tracker)

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Activestate python installation

2006-02-20 Thread Trent Mick
[Chris Smith wrote]
> >>>>> "mik3" == mik3  <[EMAIL PROTECTED]> writes:
> 
> mik3> hi this is a question regarding installing Activestate
> mik3> python whenever i try to install the latest Activestate
> mik3> Python on WinXP SP2, it gives me error saying "The wizard
> mik3> was interrupted before Activestate 2.4.2 could be completely
> mik3> installed. Your system has not been modified ."  any
> mik3> ideas why this is going on?  thanks
> 
> Administrator?
> Writeable drive?
> Is there an install log file you could locate?

As "David" mentioned on activepython@listserv.activestate.com, could
this be due to an anti-virus program aborting the install on you?

You could generate an install log to see if that yields some clues:

http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/installnotes.html#install_logging

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Komodo - Will it Lock Me In?

2006-02-17 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> Hi Everybody,
> 
> If I were to use Komodo to write in Python, would it add a lot of goo to my 
> code such that I would not be able to switch to another IDE without having to 
> claw my way out of a tarpit first?

Nope. Komodo adds no goo to your code (TM).
TM's my name, not a trademark on "Komodo adds no goo to your code" --
but I'm thinking about it. :)

Perhaps you are thinking of some of the C/C++ IDEs (like Visual Studio
on Windows and Xcode on the Mac) that will help you setup of projects
using their build systems that sometimes imply a number of standard
files. Komodo doesn't mandate a build system.

> Any other thoughts on Komodo? I am considering it because I am hoping to find 
> a solution to the install-packages-until-you-go-blind aspect of Python. 
> Setting up a serious, cross-platform, gui development environment is quite a 
> struggle for a newbie.

Not sure about the "install-packages-until-you-go-blind" thing. Komodo
doesn't help you install packages into your Python implementation. Nor
does Komodo have front-ends to py2app or py2exe for wrapping up Python
code into standalone executables.

GUI development, however. Komodo's GUI Builder is intended to be a GUI
designer for simple Tkinter-based UIs. It does mandate a certain style
for your *GUI* code, but I believe that all GUI designers need to do
this.

Because I work on Komodo I am biased, so won't give you an opinion on it
relative to other tools out there.

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ActivePython & SSL

2006-01-25 Thread Trent Mick
[Fuzzyman wrote]
> Hello all,
> 
> In the past I've used the ActivePython distribution for windows.
> Particularly their chm help manual is excellent.
> 
> I have heard that the ActivePython distribution *doesn't* include SSL
> support compiled in for windows.
> 
> Can anyone confirm or deny this rumour for me ?

That is correct. More details here:

http://mail.python.org/pipermail/python-list/2005-December/315754.html
...
- As Neil pointed out, ActivePython does not currently have SSL bindings
  (the _ssl module) that python.org's Python builds do. We are currently
  going through the legal hurdles so that we can include those. I expect
  that by or before the Python 2.5 timeframe we'll have _ssl in
  ActivePython.
...

Sincerely,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: ActivePython 2.4.2.10 is now available

2006-01-24 Thread Trent Mick
I'm happy to announce that ActivePython 2.4.2.10 is now available for free
download from:
http://www.ActiveState.com/Products/ActivePython/

This release is a maintenance/update release for existing platforms and adds
support for three new ones: Mac OS X/x86, Windows/x64 and Linux/x86_64.  See
below for a full list of supported platforms.

Changes in this release include:
- Add early support for Mac OS X for Intel platform (macosx-x86).
  Please see the "Mac OS X for Intel" section below for details.
- Upgrade to PyWin32 build 207 on Windows/x86
- Upgrade Tkinter to Tcl/Tk 8.4.12
- Support for Windows/x64 (win64-x64). Note that PyWin32 has not been ported
  to 64-bit Windows so this build does not include PyWin32.
- Support for Linux/x86_64 (linux-x86_64)
- Fixed a problem on Mac OS X/PowerPC that unintentionally created a
  dependency on Fink (fink.sourceforge.net) for the "bz2" and "curses"
  extensions. (Thanks, Bob!)
- The Windows "debug libraries" package now allows installation into
  non-ActivePython Python installations of the same version. This was
  requested by Dave Abrahams for the Boost folks (http://tinyurl.com/898zw).
- Changed Intel 32-bit architecture platform name from "ix86" to "x86",
  changing package names for some ActivePython builds.


Mac OS X for Intel
--

This is the first release of ActivePython for Mac OS X/Intel. It should be
considered an early release. This build is not a universal build and there
are a number of known issues:

http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/relnotes.html#KI_macosx

I suspect that ultimately a universal Python build is the right answer, but 
details and issues around that should be discussed on the Python Mac mailing
list:
pythonmac-sig@python.org


What is ActivePython?
-

ActivePython is ActiveState's quality-assured binary distribution of
Python. Builds for AIX, HP-UX, Linux, Mac OS X, Solaris, and Windows 
are made freely available.

ActivePython includes the Python core and core extensions (zlib 1.2.3,
bzip2 1.0.2, bsddb 4.2.52, Tk 8.4.12, and Tix 8.1.4) and is fully
compatible with other Python distributions of the same version.

ActivePython also includes a wealth of Python documentation, including:
- the core Python docs;
- Andrew Kuchling's "What's New in Python" series;
- the Non-Programmer's Tutorial for Python;
- Mark Pilgrim's excellent "Dive into Python"; and
- a snapshot of the Python FAQs, HOWTOs, and PEPs.

An online version of the docs can be found here:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/welcome.html

We would welcome any and all feedback to:
[EMAIL PROTECTED]

Please file bugs against ActivePython at:
http://bugs.ActiveState.com/ActivePython


On what platforms does ActivePython run?


ActivePython now includes installers for the following ten platforms:

- AIX/PowerPC
- HP-UX/PA-RISC
- Linux/x86
- (new) Linux/x86_64: "x86_64" is also known as "AMD64"
- Solaris/SPARC
- Solaris/x86
- Mac OS X/PowerPC
- (new) Mac OS X/x86:
- (new) Windows/x64: "x64" is also known as "AMD64"
- Windows/x86


Extra Bits
--

ActivePython releases also include the following packages:

- Windows "debug" package: Debug-built binaries for ActivePython
  users building debug versions of their binary Python extensions.
- ActivePython24.chm: An MS compiled help collection of the full
  ActivePython documentation set. Linux users of applications such as
  xCHM might find this useful. This package is installed by default on
  Windows.

These packages are available from:
ftp://ftp.activestate.com/ActivePython/etc/


Thanks, and enjoy!

Trent, Python Tech Lead

--
Trent Mick
TrentM at ActiveState.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: return values of os.system() on win32

2006-01-13 Thread Trent Mick
[rbt wrote]
> This is a corner case. I'm trying to detect if the py script is running 
> on a 'special' version of windows. I can't go into the details about 
> what makes it unique. Python installs and runs, but the windows API 
> isn't as complete as a normal Windows install... among other things, it 
> doesn't have a winver.exe file, or if it does, it's crippled... this 
> causes os.system('winver') to return a 1... while it returns 0 on 
> Windows XP, etc.

If you just want to check if winver.exe exists you could just try
os.path.exists("path\\to\\winver.exe") if you know where to expect it
(likely "C:\Windows\system32") or you could use which.py:

>>> import which
>>> which.which("winver.exe")
'C:\\WINDOWS\\system32\\winver.exe'
>>> which.which("nothere")
Traceback (most recent call last):
  File "", line 1, in ?
  File "C:\Python24\which.py", line 248, in which
raise WhichError("Could not find '%s' on the path." % command)
which.WhichError: Could not find 'nothere' on the path.

http://trentm.com/projects/which/

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


modifying DLL string table programatically (Was: Win32 Binary-only for 2.3.x?)

2006-01-09 Thread Trent Mick
[Thomas Heller wrote]
> py2exe also does something like this in the copy of pythonXY.dll that it
> creates, to avoid the resulting exe pulling in sys.path entries from the
> registry.

Do you have a quick pointer to the code that does this? I wasn't easily
able to automate doing this with COM code last time I tried.


Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Pywin32 source code?

2006-01-09 Thread Trent Mick
[sam wrote]
> Has anyone been able to access the source code for Pywin32 at
> sourceforge? I have been able to use TortouseCVS to access other CVS
> projects,but with the Pywin32 cvs site, I can not log in.

Note that I had the same issue trying to "cvs login" to buildbot's CVS
(also on sf.net) the other day. The problem went away after a day or so.
Likely some maintenance issue with the particular box at sf.net that
happened to be hosting this one. 

http://sourceforge.net/mailarchive/forum.php?thread_id=9388321&forum_id=32301

You could make a maintenance request on SF (or whatever they call it),
or give it a little bit of time to see if it fixes itself.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Win32 Binary-only for 2.3.x?

2006-01-09 Thread Trent Mick
[Fuzzyman wrote]
> Out of interest, doesn't the Python binary use the registry (and
> environment variables) for building sys.path ?

Yes, good point...

> 
> Won't you still have conflicting path issues if you use an alternative
> binary with an existing 'normal' install ?

...but it is possible to effectively disable the use of the registry by
a given pythonXY.dll -- if you know how to edit the String Table of the
DLL. Basically there is a string entry in that table that is used as
part of the registry path for registry usage.

Here is how I do it:
- open MS Visual C++ 6 (I'm sure you can do all this with VS.NET, I
  just haven't done it.)
- Ctrl+O for the open file dialog
- Files of type: Executable files (.exe;.dll;.ocx)
- Open as:   Resources
- browse to and open pythonXY.dll
- In the string table there is an entry with Value=1000 and Caption=X.Y
  (i.e. "2.3" for python23.dll, "2.4" for python24.dll, etc.). That
  "X.Y" string is what determines that part of the registry lookup path
  for:
HKLM/Software/Python/PythonCore/X.Y/PythonPath
- You could change the "Caption" value to "FuzzyWuzzyWuzzaBear" to
  effectively disable usage of the registry for sys.path building by
  that pythonXY.dll.

Cheers,
Trent


-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Win32 Binary-only for 2.3.x?

2006-01-04 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> So, I give.  Can someone point me to somewhere where there is a pile of
> Python 2.3 EXE and DLLs that I can happily dump somewhere on my system
> without having to install?  

ftp://ftp.activestate.com/ActivePython/windows/2.3/ActivePython-2.3.5-236-win32-ix86.zip


> In case it matters, this is for a WAMP-like
> project I'm developing that includes a working Trac installation.

I'm not sure it applies to your situation, but you cannot redistribute
ActivePython.
http://www.activestate.com/Products/ActivePython/license_agreement.plex

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Komodo IDE: '__file__' is not defined when debugging

2006-01-03 Thread Trent Mick
[fortepianissimo wrote]
> This is a question to all of you who use Komodo IDE for development:
> when I tried to debug my script which uses __file__ to get the absolute
> path to the file, Komodo complained that the variable is not defined.
> 
> Anyway to work around this? (without changing the code)
> 
> Or if I need to change the code, how do I achieve the same thing I
> wanted? Thanks in advance!

The problem is that when you run your script under the debugger (same
thing with pdb.py) __file__ isn't set automatically because running a
Python script with Python's execfile() (which is what Komodo debugger
does) works slightly differently that what Python's main() does to run a
Python script. One of the differences is the setting of __file__.

(Side note: I'm not sure if this should be a Python bug or not. The
intention of under what conditions  __file__ should be set are not clear
from the Python docs. From a quick poke I think it may be possible that
__file__ not getting set via execfile() is a bug that was introduced
with pythonrun.c changes when nested scopes were added a while back).

We've started a bug for this on Komodo:
http://bugs.activestate.com/Komodo/show_bug.cgi?id=43703

...and Shane just fixed it. I.e. Subsequent releases of Komodo will have
this fixed: __file__ will be set in the main module.

Until that release, workarounds:
1. get the main script path from sys.argv[0]; or
2. apply the patch (to .../dbgp/client.py in your Komodo install) that
   Shane attached to that bug to your Komodo installation.

Thanks for mentioning the bug.

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Changing a shell's current directory with python

2005-12-20 Thread Trent Mick
[Peter Hansen wrote]
> Andy B. wrote:
> > I've got a python utility that I want to change my shell's current
> > directory based on criteria it finds.  I've scoured google and the
> > python cookbook and can't seem to figure out if this is even possible.
> >  So far, all my attempts have changed the current python session only.
> >  Am I going to have to wrap this in a shell script?
> 
> As you've heard, you can't get there from here.  In fact, even just 
> wrapping with a shell script likely won't be enough, unless you are 
> willing to "source" the script every time you run it.  The only way I 
> know of (and I'd be happy to hear alternatives) to do this in a 
> _transparent_ manner is to combine an alias (which uses "source" for 
> you) with a wrapper script _and_ to have that wrapper script read from 
> some place (stdout or a temporary file or ?) to which the Python script 
> can communicate the desired new environment variables and/or current 
> directory.

I do basically this with a script I have (http://trentm.com/projects/go)
for doing exactly what Andy requested: changing directories.

On Un*x you setup a shell function (like an alias),
which calls the Python script go.py,
which writes a shell script that changes the directory,
which gets 'source'd by the shell function.

function go () 
{ 
go_is_on_path="`\which go`";
if test -e "$go_is_on_path"; then
export GO_SHELL_SCRIPT=$HOME/.__tmp_go.sh;
python `\which go` $*;
if [ -f $GO_SHELL_SCRIPT ]; then
source $GO_SHELL_SCRIPT;
fi;
    else
    echo "ERROR: could not find 'go' on your PATH";
fi
}

On Windows 'go' does the same thing with a batch file.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python IDE (was: PythonWin troubleshooting)

2005-12-20 Thread Trent Mick
[chuck wrote]
> What is Komodo written in?

Komodo is based on the Mozilla framework, so in many ways it is similar
to Firefox and Thunderbird. Komodo also includes PyXPCOM -- Python
bindings to Mozilla's XPCOM (cross-platform component object model)
system for componentizing parts of the framework -- so that we can
develop core Komodo logic in Python. As with any Mozilla-based app, the
UI is written in XUL (XML-based UI Language) and JavaScript. Where it
makes sense Komodo includes bits written in Perl and Tcl (also have some
PHP extension C code): for code browsing and debugging. So, Komodo is
written in: XML, JavaScript, C++, Python, CSS, C, Perl, and Tcl.

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Difference between ActivePython and Python.org

2005-12-14 Thread Trent Mick
[S.Chang wrote]
> Anyone knows the difference(s) between the Python binaries from 
> ActiveState and Python.org?

The responses to this thread so far gave most of the differences. In
summary:

- On Windows, ActivePython includes the PyWin32 extensions.
- ActivePython rolls the core Python docs and a bunch of extra doc bits
  into one package, as detailed here:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/about.html
- We have binary installers for more platforms:
win32-x86
linux-x86
macosx-powerpc
solaris-sparc
solaris-x86
hpux-parisc
aix-powerpc
  (And we'll likely have a few more in the future, in particular
  macosx-x86 and perhaps some newer 64-bit platforms.)
- As Neil pointed out, ActivePython does not currently have SSL bindings
  (the _ssl module) that python.org's Python builds do. We are currently
  going through the legal hurdles so that we can include those. I expect
  that by or before the Python 2.5 timeframe we'll have _ssl in
  ActivePython.
- ActivePython is free, but is not open source so, as Steve mentioned,
  you need permission if you want to *re-distribute* ActivePython.
  However, *using* ActivePython is still completely free and using tools
  like py2exe and py2app to wrap up your scripts and distribute those is
  fine.
- ActivePython provides a Windows "debug" package: a zip of the
  debug-build libs that you can install into your Python install
  (python.org installs to as of the next release[1]). This can be useful
  for some people building debug builds of Python extensions.

One of the important things is how ActivePython is NOT different:
ActivePython should be fully binary compatible with python.org builds.
This is to ensure that 3rd-party extensions built for and tested on one
will just work on the other.


[BartlebyScrivener wrote]
> The ActiveState version lags behind for a month or two in versions,

That is occassionaly true, yes, but not always. ActivePython 2.4.2 was,
I believe, a few weeks behind. 2.4.0 was released within a day or two. 


[Neil Hodgson wrote]
> It would be helpful if the ActivePython "What's Included" page listed
> which parts of the python.org distribution are not included.

Good point. I'll update those docs now for the next release.


Cheers,
Trent (the ActivePython dude at ActiveState)

[1] Distributing the Python Windows debug build libs. 
http://mail.python.org/pipermail/python-dev/2005-November/057896.html
http://mail.python.org/pipermail/python-dev/2005-December/058446.html

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Documentation suggestions

2005-12-09 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> 
> Trent> Nah, the Try Ruby thing is mostly faking it (I believe) rather
> Trent> than running an actually Ruby interactive session ("bastion'ed"
> Trent> or not).
> 
> I don't think so.  I tried typing some stuff at the prompt that it wasn't
> asking for, like "x = [1,2,3]" followed by "x * 5" when it was asking me to
> type "2 + 6".  It evaluated both properly as far as I could tell.  

Yah. My guess at what he is doing (and the way I'd probably do this for
Python) is to compile each statement, only allow certain constructs
(like assigning to a variable, defining literals, basic operator usage,
maybe some control flow statements -- although I didn't get that far)
and then execute those.

> OTOH, it
> hung when I entered "def fib(n)".  Never got to the next prompt.  

Punted on continued/multi-line statements maybe?

> Looking at
> the Javascript, it appears to be some sort of Ajaxian thing...

Yup.


Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Documentation suggestions

2005-12-08 Thread Trent Mick
[Mike Meyer wrote]
> "BartlebyScrivener" <[EMAIL PROTECTED]> writes:
> > Too bad there
> > isn't something like what Ruby does with the "Try Ruby In Your Browser"
> > thing, which is a very effective marketing tool (although obviously I
> > chose Python).
> >
> > http://tryruby.hobix.com/
> 
> I've seen things like this for other language as well. Doing it in
> for Python isn't all that hard.
> 
> The question is how do you keep the system that the Python code is
> actually running on safe? Ruby may have a real bastion mode, but
> Python doesn't.

Nah, the Try Ruby thing is mostly faking it (I believe) rather than
running an actually Ruby interactive session ("bastion'ed" or not).

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can't find socket.ssl() on win32

2005-12-07 Thread Trent Mick
> > i'm running this under ActiveState version 2.2.2, but i have also tried 
> > under ActiveState version 2.3 anyone have any ideas?

[Richard Brodie wrote]
> ActiveState don't ship crypto stuff because they don't want to jump
> through the legal hoops. You can add it in or use a regular build. 

Slight modification there: ...because we are currently jumping through
the legal hoops...

But, yes, you are correct that ActivePython does not currently include
the _ssl extension because of crypto export restriction legal rules.
We've had a breakthrough here though (yeah!) and I'm hopeful that in the
not too distant future I'll be able to include SSL in ActivePython (and
other products I work on here at ActiveState).

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse best/good or bad IDE for Python?

2005-12-06 Thread Trent Mick
[Paul Boddie wrote]
> Shouldn't you have something nice to say about Komodo instead, however?
> ;-)

Yah, I was just reminding Aaron of his fine-print legal requirements to
evermore only be able to extol the virtues of Komodo. Muuuwahahaha! :)

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: windows installer problems

2005-12-06 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> Hi,
> I'm trying to install Python on Windows 2000 Server using remote
> desktop. I log as a user that is in administrators group. Instalator
> starts, I select default installation directory, on the next screen
> with parts to install I click just next. Than blicks screen with
> progress bar but it is immediately replaced with screen informing that
> installation failed. But there's no information why or what is wrong.
> On remote connection I use 16 colors - can it be the problem?

You can turn on logging when installing an MSI:

http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/installnotes.html#install_logging

The same instructions will work for the python.org MSI as well.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: extract python install info from registry

2005-12-06 Thread Trent Mick
[Laszlo Zsolt Nagy wrote]
> rbt wrote:
> 
> >On windows xp, is there an easy way to extract the information that 
> >Python added to the registry as it was installed?
> >  
> >
> Using regedit.exe, look at the registry keys and values under
> 
> HKEY_LOCAL_MACHINE\Software\Python
> 
> If you need to know how to read the registry from Python: please install 
> the python win32 extensions (or use ActivePython).

Actually you don't need the PyWin32 extensions to read the Windows
registry since the _winreg module was added to the Python core.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Eclipse best/good or bad IDE for Python?

2005-12-05 Thread Trent Mick
[John J. Lee wrote]
> I now find it difficult to mis-type variable names in Emacs, since I
> have F4 bound to dabbrev-expand.  I also do standard things like using
> query-replace when renaming.  Actually, something like dabbrev-expand
> is perhaps the one thing I would find indispensible switching to any
> other editor -- I wonder if Eclipse/PyDev has it?

Komodo has that too -- we call it "word completion".

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Moving to Win XP as a Python developer

2005-10-14 Thread Trent Mick
[Thomas Heller wrote]
> I have an elisp function bound to a key in XEmacs that starts cmd in the
> directory where the current buffer is.  IMO this is very convenient.  To
> access explorer from that command prompt (in the rare cases that I need
> it) I use 'start .'.

I kind of have the same thing with Dave's Quick Search Deskbar
(http://www.dqsd.net/) and my little "go" script
(http://trentm.com/projects/go/). The keystrokes to open a cmd.exe shell
in my "src" folder is down to:

# to focus in the Quick Search Deskbar textbox
go src

or to open Explorer in that dir:

go -o src 

or in another "tagged" dir:

go ~   # open in my home dir

DQSD is a fantastic tool for speeding up launching other things, too:
mainly Google searches.

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-13 Thread Trent Mick
[John J. Lee wrote]
> 4. There's a registry key for tab completion somewhere...

Search for "CompletionChar" and change it to 9.

http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/Windows/2000/server/reskit/en-us/regentry/34995.asp


Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: installer for amd64 build of python?

2005-10-13 Thread Trent Mick
[Brett Hoerner wrote]
> Thanks, looking at their site I can't find a Platform SDK for XP... am
> I looking for the Windows 2003 Server SDK...?  Seems counter-intuitive

Yes, I believe that is the one I am using. MS seems to aim for minimal
intuitive-factor with Platform SDK version naming.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: installer for amd64 build of python?

2005-10-13 Thread Trent Mick
[Brett Hoerner wrote]
> As an aside to this, are there any freely available C compilers for
> Windows that can compile 64-bit binaries?  I find nothing for Cygwin or
> MinGW...

Yes. The MS Platform SDK is free and includes a compiler that can target
x86, ia64 and x64 (the latter is what MS -- and Sun -- are calling
AMD64).

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to prevent logging warning?

2005-10-05 Thread Trent Mick
[Thomas Heller wrote]
> I'm about to add some logging calls to a library I have.  How can I
> prevent that the script that uses the library prints
> 'No handlers could be found for logger "comtypes.client"' when the
> script runs?
> 
> I would like to setup the logging so that there is no logging when
> nothing is configured, and no warning messages are printed.

This is probably a gross hack, but then I think one could argue that the
one-time "No handlers could be found for" warning is a misfeature -- at
least without a clean way to suppress it. I don't know the history of
that warning though:


-- mylib.py ---
import logging
log = logging.getLogger("mylib")
def func():
log.warn("don't go near the river")
log.error("I'm drowning!")
--


-- myscript.py ---
import sys
import logging
import mylib

if __name__ == "__main__":
if "-v" in sys.argv:
logging.basicConfig()
else:
logging.Logger.manager.emittedNoHandlerWarning = True
mylib.func()
--


$ python myscript.py

$ python myscript.py -v
WARNING:mylib:don't go near the river
ERROR:mylib:I'm drowning!


hackily yours,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Trent Mick
[Fuzzyman wrote]
> I had problems updating from activestate 2.4 to activestate 2.4.1
> 
> I think it was caused by not uninstalling the original. This does mean
> that even a *minor* version upgrade is a PITA. To do it cleanly all
> extension modules have to be uninstalled and re-installed.
> 
> *sigh*

As Steve said, uninstalling ActivePython 2.4 will leave your extensions
alone and then installing ActivePython 2.4.1 will install in the same
proper places so that all your extensions should just work.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Trent Mick
[Peter Hansen wrote]
> Couldn't it also happen if the first time someone did an "admin" install 
> which (I believe) puts the DLLs in the system folder, and the next time 
> did just a non-admin install which doesn't do that?  (Or am I 
> misunderstanding the conditions under which c:\windows\system32 has 
> files written to it?)

I suppose that is possible.  Martin, does python-2.4.2.msi install
python24.dll to the Python install dir for a "per-user" installation?

Note: I started this bug to track this and try to repro:
http://bugs.activestate.com/ActivePython/show_bug.cgi?id=41083

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: RELEASED Python 2.4.2 (final)

2005-09-29 Thread Trent Mick
[Bugs wrote]
> I downloaded the 2.4.2 Windows Binary Installer from python.org but when 
> I try to run python.exe I get the following in the console:
> 
> ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on
> Python 2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)] on 
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>  >>>
> 
> It says ActivePython 2.4.1 but I downloaded the 2.4.2 binary installer 
> from python.org and the python.exe executable I'm running is timestamped 
> 9/28/2005 12:41PM...  Any ideas what I'm doing wrong?

It is possible that the python.org installer didn't overwrite the
"python24.dll" in the system directory (C:\WINDOWS\system32). Try doing
this:

- manually delete C:\WINDOWS\system32\python24.dll
- run the "repair" functionality of the python.org installer (you can
  either do this from  "Start | Settings | Control Panel | Add/Remove
  Programs" or by just running the .msi file again

Then try running python again.

Trent


-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Finding where to store application data portably

2005-09-21 Thread Trent Mick
> > > I'm using pygame to write a game called Bombz which needs to save some
> > > data in a directory associated with it. In Unix/Linux I'd probably use
> > > "~/.bombz", in Windows something like
> > > "C:\Documents And Settings\\Applicacation Data\Bombz".
> > 
> > In Windows, you shouldn't hard-code the drive letter. I don't know how you
> > find out what the correct value is, but hard-coding it is just Bad.
> > 
>   XP Pro seems to take
> 
> >>> print os.environ["APPDATA"]
> C:\Documents and Settings\Dennis Lee Bieber\Application Data
> 
>   Though the more consistent might be to hit the registry:
> 
> HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
> Folders\AppData
> 
> and to confuse matters, there is also a "Local AppData" entry

It isn't just the drive letter you shouldn't hardcode. In different
locales the phrases "Documents and Settings" and "Application Data"
are often different. The canonical way to get this dir on Windows is by
using the SHGetFolderPath Windows API call with the CSIDL_APPDATA
constant:


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetfolderpath.asp

In Python code that is:

from win32com.shell import shellcon, shell
path = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)

Unfortunately that either means having the PyWin32 extensions installed
(which not all Python installations on Windows have) or building your
own small binary extension to make that call. Failing that, using the
registry location or the environment variable above might suffice
Note that on some older Windows flavours -- not sure exactly which --
the APPDATA env. var. might not be defined.

Also note that Windows app guidelines encourage you to have an
additional vendor/owner directory level before the app name. So:

%APPDATA%\\Bombz

I have a little working script that I use for this kind of stuff which
you are welcome too, if it helps. (attached)

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
# Copyright (c) 2005 ActiveState Corp.
# License: MIT
# Author:  Trent Mick ([EMAIL PROTECTED])

"""Cross-platform application utilities:

Utility Functions:
user_data_dir(...)  path to user-specific app data dir
site_data_dir(...)  path to all users shared app data dir
"""
#TODO:
# - Add cross-platform versions of other abstracted dir locations, like
#   a cache dir, prefs dir, something like bundle/Contents/SharedSupport
#   on OS X, etc.
#   
http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Concepts/UserPreferences.html
#   
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html
#   
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp
#

import sys
import os


class Error(Exception):
pass



def user_data_dir(appname, owner=None, version=None):
"""Return full path to the user-specific data dir for this application.

"appname" is the name of application.
"owner" (only required and used on Windows) is the name of the
owner or distributing body for this application. Typically
it is the owning company name.
"version" is an optional version path element to append to the
path. You might want to use this if you want multiple versions
of your app to be able to run independently. If used, this
would typically be ".".

Typical user data directories are:
Windows:C:\Documents and Settings\USER\Application 
Data\\
Mac OS X:   ~/Library/Application Support/
Unix:   ~/.
"""
if sys.platform.startswith("win"):
# Try to make this a unicode path because SHGetFolderPath does
# not return unicode strings when there is unicode data in the
# path.
if owner is None:
raise Error("must specify 'owner' on Windows")
from win32com.shell import shellcon, shell
path = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)
try:
path = unicode(path)
except UnicodeError:
pass
path = os.path.join(path, owner, appname)
elif sys.platform == 'darwin':
from Carbon import Folder, Folders
path = Folder.FSFindFolder(Folders.kUserDomain,
   Folders.kApplicationSupportFolderType,
   Folders.kDontCreateFolder)
path = os.path.join(path.FSRefMakePath(), appname)
else:
path = os.path.expanduser("~/." + a

Re: ddd or eclipse with mod_python

2005-09-15 Thread Trent Mick
[Sakcee wrote]
> Hi
> 
> I am using mod_python for web development, I am in need of some ide ,
> can i use ddd or eclipse with pydev with mod_python.
> 
> can these ide's handle requests from mod_python and run server side
> scripts 

You should be able to debug with Komodo(*):

Using the Python Remote Debugger

http://aspn.activestate.com/ASPN/docs/Komodo/3.1/komodo-doc-debugpython.html#Using_the_Python_Remote_Debugger

You can get a trial here:
www.activestate.com/Komodo/Trial

Cheers,
Trent

(*) Disclaimer: I work on Komodo.


-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: improvements for the logging package

2005-09-15 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> 
> >> Changed now in CVS.  When 2.4.2 is released it should be there.
> 
> Trent> Is this the same kind of thing as the (generally ill-regarded)
> Trent> change in Python 2.2.x (for some x != 0) that added:
> 
> No, I just backported the documentation bit that marked the keyword
> parameter change to basicConfig() as happening in 2.4.  I didn't change any
> code.

Duh. Sorry.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: improvements for the logging package

2005-09-14 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> >> It does, in the "in-development" version of the documentation. Sorry it
> >> was not in the 2.4 releases :-(
> 
> Thomas> Maybe it can be backported to 2.4.2 - is there still time for 
> that?
> 
> Changed now in CVS.  When 2.4.2 is released it should be there.

Is this the same kind of thing as the (generally ill-regarded) change in
Python 2.2.x (for some x != 0) that added:
True, False = 0, 1
I may have the details wrong.

Now there is a feature in 2.4.x that wasn't in 2.4.(x-1), which could
cause surprises. I.e. I write code that uses the new thing, test it with
my 2.4.2 install, think that is works with 2.4.* and say so when I
distribute it. 

Maybe that is okay.  Just asking here because I don't keep up with
Python changes -- or sentiment on how to handle this kind of thing --
well enough.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to upgrade to 2.4.1 on Mac OS X tiger

2005-09-09 Thread Trent Mick
[Mike Meyer wrote]
> stri ker <[EMAIL PROTECTED]> writes:
> > Has anyone here upgraded from 2.3 to 2.4 on Tiger?
> > If so how'd ya do it?
> 
> You don't. You install 2.4 in parallel with 2.3. You can do pretty
> much whatever you want with /usr/bin/python, /usr/local/bin/python,
> etc. - Tiger doesn't seem to use those. I don't remember if I replaced
> one or not, but don't touch anything else about the 2.3 installtion.
> 
> I installed the darwinports version of 2.4, and have been using it
> ever since for all my stuff.

There are also the following install options:

- ActivePython:
  http://www.activestate.com/Products/ActivePython/
  (disclaimer: I make this distro)

- MacPython:
  http://undefined.org/python/#python
  by Bob Ippolito

- fink (similar in spirit to the darwinports project) also has a Python
  I believe


Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: improvements for the logging package

2005-09-08 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> Trent> I thought PEP 8 said camelCase (or whatever it is called) was
> Trent> okay?
> 
> Hmmm...  In the section entitled "Naming Conventions" I see:
> 
> Function Names
> 
>   Function names should be lowercase, possibly with words separated by
>   underscores to improve readability.  mixedCase is allowed only in
>   contexts where that's already the prevailing style (e.g. threading.py),
>   to retain backwards compatibility.
> 
> Method Names and Instance Variables
> 
>   The story is largely the same as with functions: in general, use
>   lowercase with words separated by underscores as necessary to improve
>   readability.

I swear that has changed since I last read that. :)
...checking... Guess I haven't read it in about 2 years. This patch:

Sat Mar 20 06:42:29 2004 UTC (17 months, 2 weeks ago) by kbk 

Patch 919256
Clarify and standardize the format for names of modules,
functions, methods, and instance variables.

Consistent, I hope, with discussion on python-dev

http://mail.python.org/pipermail/python-dev/2004-March/043257.html

http://mail.python.org/pipermail/python-dev/2004-March/043259.html

Made this change:


http://cvs.sourceforge.net/viewcvs.py/python/python/nondist/peps/pep-0008.txt?r1=1.20&r2=1.21

 Function Names
 
-  Plain functions exported by a module can either use the CapWords
-  style or lowercase (or lower_case_with_underscores).  There is
-  no strong preference, but it seems that the CapWords style is
-  used for functions that provide major functionality
-  (e.g. nstools.WorldOpen()), while lowercase is used more for
-  "utility" functions (e.g. pathhack.kos_root()).
+  Function names should be lowercase, possibly with underscores to
+  improve readability.  mixedCase is allowed only in contexts where
+  that's already the prevailing style (e.g. threading.py), to retain
+  backwards compatibility.



> Since the logging package currently uses mixedCase it would appear it
> shouldn't revert to lower_case.  I'm thinking it should have probably used
> lower_case from the start though.  I see no real reason to have maintained
> compatibility with log4j.  Similarly, I think PyUnit (aka unittest) should
> probably have used lower_case method/function names.  After all, someone
> went to the trouble of PEP-8-ing the module name when PyUnit got sucked into
> the core.  Why not the internals as well?

Perhaps because of the timing.


> If I remember
> correctly, it was more-or-less written for inclusion in the core.

Yah. It was added before Guido more clearly stated that he thought
modules should have a successful life outside the core before being
accepted in the stdlib.

Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: improvements for the logging package

2005-09-07 Thread Trent Mick
[EMAIL PROTECTED] wrote]
> 
> >> - It's a package, but contrary to any other package I've ever seen,
> >>   most of its functionality is implemented in __init__.py.
> 
> Trent> I'm not defending the implementation, but does this cause any
> Trent> particular problems?
> 
> No, it just seems symptomatic of some potential organizational problems.

Fair enough. I'm all for having consistent and well structure code in
the stdlib.


> >> import logging
> >> logging.info('hello world')
> >> 
> >> ought to just work (implicitly add a stream handler connected to
> >> stderr to the root logger).
> 
> Trent> Maybe. Unless that causes troubles for real use. 
> 
> Maybe there's a bug then (or maybe the docs still need work).  When I
> executed (all of these examples were typed at an interactive prompt):
> 
> import logging
> logging.info('hello world')
> 
> I get no output.  Looking at the doc for the basicConfig() function, I see:
> 
> The functions debug(), info(), warning(), error() and critical() will
> call basicConfig() automatically if no handlers are defined for the root
> logger.
> 

Unfortunately your getting caught by the default logging level being
WARN, so that any log level below that is tossed.

import logging
logging.basicConfig()
logging.error("help!")
logging.warn("stay away from the river")
logging.info("nice sunset, eh?")

Running that generates:

ERROR:root:help!
WARNING:root:stay away from the river

> Trent> Having lazy configuration like this means that it can be a subtle
> Trent> thing for top-level application code to setup the proper logging
> Trent> configuration.
> 
> Again, based on my reading of the basicConfig doc, it seems like the logging
> package is supposed to already do that.

Sort of. I guess all it implies is that if application code wants
to do special log handler setup then it needs to make sure to work in
the case of basicConfig() having been called and not.

The configuration stuff is quite subtle. The docs need to give
good best practices for a could coverage of reasonable use cases.
Nothing catastrophic will happen with a weird logging configuration --
probably just more log messages that you'd want.


> It was probably the log4j roots that provided the non-PEP 8 naming.

Definitely.

> I suspect the naming could be improved while providing backward
> compatibility aliases and deprecating those names.

Do you mean naming like "makeLogRecord" etc? I thought PEP 8 said
camelCase (or whatever it is called) was okay?


Trent

-- 
Trent Mick
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


  1   2   >