Re: [Pythonmac-SIG] Loading Python on my Mac

2011-01-12 Thread skip

John I'm totally new to Python and having worked in a windows
John environment for years and now my personal pc of choice is a mac.

John Would someone be so kind as to walk me through installing python
John on a mac?

John I don't want to use the newest version because the class that I'm
John trying to get into uses 2.6 and 2.7 versions only.  So, I need
John that version installed so I can do homework assignments, etc.

Have you tried /usr/bin/python?  On Leopard (10.5.x) it is v 2.5.1.  If you
have Snow Leopard perhaps it's 2.6.something.

If that won't work for your needs, just download the Mac installer image for
2.7.1 appropriate to your version of OS X from this page:

http://python.org/download/releases/2.7.1/

Once installed, locate the file (probably in ~/Downloads or something
similar) and double-click it to install in the usual manner.  I normally
just build from source (and don't bother with the framework stuff), so just
to confirm my instructions, I tried it out:

* download
* open the disk image (double click, use the open command from a shell
  prompt, etc)
* open the corresponding volume which that mounts (named Python 2.7.1)
* double-click the Python.mpkg file to run the installer

The resulting binary is in

/usr/local/bin/python (non-framework version)
/usr/local/bin/pythonw (framework version)

I'm sure others more knowledgeable about Python-on-a-Mac will correct any
mistakes I've made.

-- 
Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] 2.7.1 build?

2010-11-29 Thread skip

Chris I say next to impossible, because I haven't found it yet, and
Chris I've been poking around the web site for a few minutes.

Drop the .0 and I think you've got it:

http://www.python.org/download/releases/2.7/

A minor inconsistency in the naming, but traditionally the first micro
release of a series doesn't include the .0.

-- 
Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Searchable digest for this list?

2010-11-11 Thread skip
Google?  Searching for:

site:mail.python.org Break on 
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()
 to debug.

yielded just two hits.

-- 
Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] XCode for OS X 10.5?

2010-06-25 Thread Skip Montanaro
Sorry to ask a non-Python question here, but I need this to get my laptop 
rebuilt
so I can do stuff again.  I lost the disk on my Macbook Pro which Apple kindly
replaced, however my backups were partially toast, so I had to reinstall OS X
from scratch.  (Luckily /Users was viable.  Whew!)  

I can't find a version of XCode which works with Mac OS X  10.5.  All Apple will
show me on their dev site is XCode 3.2 which requires Snow Leopard.  I can't
build a dang thing - no make or gcc for instance.

Any pointers appreciated.

Thanks,

Skip Montanaro


___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] [Python-Dev] Fwd: Broken link to download (Mac OS X)

2010-04-14 Thread skip

(Moving this response from python-dev to pythonmac-sig...)

Michael A build on my machine produces output similar to:

Michael Python build finished, but the necessary bits to build these 
modules 
Michael were not found:
Michael _bsddb dl gdbm
Michael imageoplinuxaudiodev  ossaudiodev
Michael readline   spwd   sunaudiodev
Michael To find the necessary bits, look in setup.py in detect_modules() 
for the 
Michael module's name.

Michael Failed to build these modules:
Michael _tkinter

Using /usr/bin/python (Apple's 2.5.1) as a reference I find that I am able
to import the following modules from the above lists:

imageop
readline
dl
_tkinter

Using the Enthought framework build (2.5.4) I can import:

bsddb
imageop
readline
dl
_tkinter

I don't have one of Ronald's framework builds handy, but the above suggests
several of those which failed to build for you should build.

I tried a framework build after doing the following:

* remove /opt/local and /usr/local from my set of environment variables
* rename /usr/local to /usr/local-
* comment out references to /sw and /opt/local in setup.py.

dl, _tkinter and imageop built for me.  You must be missing Tcl and Tk from
/Library/Frameworks to miss on _tkinter.  Not sure why the dl and imageop
modules failed for you.  otool -L suggests that the only dylib files
required are libgcc_s and libSystem, both in /usr/lib.  Are you missing some
header files perhaps?

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] Test message ... please ignore

2010-02-06 Thread skip

Testing a change to the footer.  You can ignore.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Whats the invalid syntax about

2009-05-31 Thread skip

 please suggest what could have gone wrong here why am i getting a
 syntax error

It's a quirk of the interactive interpreter.  To terminate a loop you need a
blank input line:

 some_list = [3,6,2,5]
 i = 1
 while i  3:
...   print some_list[i], ;
...   i = i + 1
... 
6 ;
2 ;
 print some_list[3]
5

-- 
Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/
America's vaunted free press notwithstanding, story ideas that expose
the unseemly side of actual or potential advertisers tend to fall by the
wayside.  Not quite sure why.  -- Jim Thornton
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Official 'right way' to create a universal build of Python?

2009-04-14 Thread skip

Mark Having done this, how do I package things up to transfer them to
Mark the iBook?  What files need to be transferred?

If this is a one-time thing I would use brute force and tar up the entire
source directory and put it over on your g4.

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Can't convert simple Python script to bundle with py2app

2008-12-01 Thread Skip Montanaro
  You're building a 2.7? what is that? I thought Python was going from 2.6 to
 3.0.

Building from Subversion trunk identifies itself as 2.7a0.  There will
be a number of
other 2.x versions released more-or-less in parallel with 3.y versions.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Can't convert simple Python script to bundle with py2app

2008-11-30 Thread skip

 Python (from Subversion trunk in this case) was configured using
 --enable-shared, but there is no libpython2.7.dylib to be found
 anywhere inside of the --prefix directory.  It does generate a
 libpython2.7.a file.  I'm not doing a framework build.  Do I need to?

Chris very likely, yes. Py2app was designed around the Framework
Chris build. In any case, it looks like you've got a static lib for the
Chris main python lib, and py2app with require a dynamic one.

Hmmm...  I just built a framework version.  I configured like so:

../configure --enable-framework='/Users/skip/Applications' \
 --enable-shared --prefix='/Users/skip/local' \
 CPPFLAGS='-I/Users/skip/local/include -I/opt/local/include' \
 LDFLAGS='-L/Users/skip/local/lib -L/opt/local/lib'

No .dylib file was created.  I ran make altinstall then checked in both
/Users/skip/Applications/Python.framework and in ~/local.  Still no Python
.dylib files.  Then I scoured the Makefile looking for promising targets to
try.  I tried making both sharedmods and sharedinstall.  Nothing.

Thinking the --enable-framework and --prefix flags might mess up configure
in some way I reconfigured without specifying --prefix. make clean.  make
sharedinstall.  Still no dylib files.

Any other ideas I might try?

I finally just submitted a bug report:

http://bugs.python.org/issue4472

Thanks,

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Building Python 2.3 on Mac OS X 10.5.5

2008-11-30 Thread skip
I'm trying to build Python 2.3 on my Mac (OS X 10.5.5) so I can use it
simply to test my lockfile package.  It configures fine and the basic make
step works, but the executable has some sort of problem with semaphore
operations:

% ./python.exe 
sem_init: Function not implemented
sem_wait: Bad file descriptor
sem_post: Bad file descriptor
sem_wait: Bad file descriptor
sem_post: Bad file descriptor
sem_init: Function not implemented
sem_trywait: Bad file descriptor
sem_wait: Bad file descriptor
sem_post: Bad file descriptor
sem_init: Function not implemented
... lots of similar messages ad nauseum ...
sem_post: Bad file descriptor
sem_init: Function not implemented
sem_trywait: Bad file descriptor
sem_wait: Bad file descriptor
sem_init: Function not implemented
sem_post: Bad file descriptor
Traceback (most recent call last):
  File /Users/skip/.python.py, line 21, in ?
from save_session import mark, save, load
  File /Users/skip/misc/python/save_session.py, line 21, in ?
raise ImportError(session save/restore requires readline module)
ImportError: session save/restore requires readline module
 

I compared the code related to sem_init between 2.3 and trunk but didn't see
anything which looked promising.  Any thoughts?

Thx,

-- 
Skip Montanaro - [EMAIL PROTECTED] - http://smontanaro.dyndns.org/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Can't convert simple Python script to bundle with py2app

2008-11-28 Thread skip

I have a trivial little script:

#!/usr/bin/env python

import os
import sys

os.execl(/Users/skip/local/bin/gnuclient, *sys.argv[1:])

which I want to convert to a .app bundle.  I downloaded and installed py2app
using easy_install, successfully ran py2applet to generate a setup.py file:


This is a setup.py script generated by py2applet

Usage:
python setup.py py2app


from setuptools import setup

APP = ['rungnucl.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True}

setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)

then ran python setup.py py2app  which gave me a traceback and dropped me
into pdb:

...
copying /Users/skip/local/lib/python2.7/lib-dynload/unicodedata.so - 
/Users/skip/tmp/dist/rungnucl.app/Contents/Resources/lib/python2.7/lib-dynload
copying /Users/skip/local/lib/python2.7/lib-dynload/zlib.so - 
/Users/skip/tmp/dist/rungnucl.app/Contents/Resources/lib/python2.7/lib-dynload
copying /Users/skip/local/bin/python - 
/Users/skip/tmp/dist/rungnucl.app/Contents/MacOS
Traceback (most recent call last):
  File 
/Users/skip/local/lib/python2.7/site-packages/py2app-0.3.6-py2.7.egg/py2app/build_app.py,
 line 548, in _run
self.run_normal()
  File 
/Users/skip/local/lib/python2.7/site-packages/py2app-0.3.6-py2.7.egg/py2app/build_app.py,
 line 619, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
  File 
/Users/skip/local/lib/python2.7/site-packages/py2app-0.3.6-py2.7.egg/py2app/build_app.py,
 line 723, in create_binaries
mm.mm.run_file(runtime)
  File build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py, line 65, 
in run_file
raise ValueError('%r does not exist' % (pathname,))
ValueError: '/Users/skip/local/lib/libpython2.7.dylib' does not exist
 
/Users/skip/tmp/build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py(65)run_file()
(Pdb) 

Python (from Subversion trunk in this case) was configured using
--enable-shared, but there is no libpython2.7.dylib to be found anywhere
inside of the --prefix directory.  It does generate a libpython2.7.a file.
I'm not doing a framework build.  Do I need to?

Thanks,

-- 
Skip Montanaro - [EMAIL PROTECTED] - http://smontanaro.dyndns.org/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] How to record audio from Python?

2008-09-04 Thread skip

Can I easily control audio record/playback from Python on my Mac?  I know
zip about audio recording or about Apple APIs via Python.  Pointers to
simple examples would be much appreciated.

Thanks,

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload

2008-04-24 Thread skip

Gary ./configure --prefix=/Users/gary/opt/py25 LDFLAGS=-L/opt/local/lib  
Gary OPT=-I/opt/local/include
Gary make
Gary make install

Gary (The LDFLAGS and OPT are there to get readline and zlib from Darwin  
Gary Ports in the Python.)

Gary I got some warnings about expat, but nothing serious during configure 
 
Gary and make.

Gary But oddly, /Users/gary/opt/py25/library/python2.5/lib-dynload was
Gary completely empty.  So, for instance, I couldn't do basic things
Gary like ``import math``.

Works for me.  I build a number of different versions on my Mac quite
frequently.  Just to make sure I wasn't fooling myself, I svn up'd my 2.5
branch, then reran

configure
make clean
make -j2
make altinstall

and then checked the lib-dynload timestamps.  They looked fine.

You can try running

make -n altinstall

and looking at the end of the output.  You should see something like this:


for i in X ; do \
  if test $i != X; then \
echo /usr/bin/install -c -m 555 $i 
/Users/skip/local/lib/python2.5/lib-dynload/`basename $i`; \
/usr/bin/install -c -m 555 $i 
/Users/skip/local/lib/python2.5/lib-dynload/`basename $i`; \
  fi; \
done

That install command is what populates your lib-dynloads directory.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload

2008-04-24 Thread skip

CHB [EMAIL PROTECTED] wrote:
 make altinstall

CHB maybe that's it -- I think the OP was running install rather than
CHB altinstall. What is altinstall supposed to do differently?

Nah...  The install target depends on the altinstall target.  All it does
beyond that is create a symlink called python and install the Python man
page.

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] locating Python.h

2008-04-04 Thread skip

Feat I've carefully read the section about building extensions, ...
Feat but this doesn't tell me how to locate the right Python header
Feat file...

Distutils takes care of that for you.  All you should need to do is

#include Python.h

in your source.  As you concluded, the correct one to use is the one which
corresponds to the Python executable you're using.  I believe distutils uses
sys.exec_prefix and the version of the running Pyhon to get a base directory
for the installation.  From there it's just a hop, skip and jump to the
installed Include directory which corresponds to that running executable.

For example, for my current python, 2.6, I installed it in ~/local.  That
gives me an include file directory of ~/local/include/python2.6.

-- 
Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] How to print unicode to OS-X Terminal.app

2008-02-13 Thread skip

Chris So how to I get Python to convert to utf-8 with a print
Chris statement, instead of ascii?

The print statement can't do it directly, but you can encode Unicode objects
using different charsets then print the result.  Try this:

 unicode(\xef, latin-1)
u'\xef'
 unicode(\xef, latin-1).encode(utf-8)
'\xc3\xaf'
 print unicode(\xef, latin-1).encode(utf-8)
ï

-- 
Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Having trouble building Python w/ Tcl/Tk on my new Macbook Pro

2008-02-09 Thread skip
I finally put my PowerBook G4 out to pasture and bought a MacBook Pro.  I
used SetupAssistant to transfer data from the old box to the new one.

I'm having trouble building any version of _tkinter (from svn 2.5, trunk
(2.6) or py3k) on my new box.  Today I decided to debug the problem a bit.
I'm getting this warning when linking _tkinter.so:

ld: warning in /Library/Frameworks//Tcl.framework/Tcl, file is not of 
required architecture
ld: warning in /Library/Frameworks//Tk.framework/Tk, file is not of 
required architecture

which suggests to me that those versions of Tcl and Tk are probably PPC
only.  (I suspect old AquaTk frameworks copied over by SetupAssistant.)
Looking in /Library/Frameworks I see

drwxr-xr-x   6 root   admin  204 Apr 29  2007 AquaTerm.framework
drwxr-xr-x   6 root   staff  204 Jan 26  2005 CamelBones.framework
drwxrwxr-x   5 root   admin  170 Aug  4  2007 FxPlug.framework
drwxr-xr-x  10 root   admin  340 Aug 15  2005 GMP.framework
drwxrwxr-x   8 root   admin  272 Jan 31 00:40 HPDeviceModel.framework
drwxrwxr-x   6 root   admin  204 Jan 31 00:40 HPPml.framework
drwxrwxr-x   7 root   admin  238 Jan 31 00:40 HPServicesInterface.framework
drwxrwxr-x   7 root   admin  238 Jan 31 00:40 HPSmartPrint.framework
drwxrwxrwx   6 skip   staff  204 Feb  8  2005 HaskellSupport.framework
drwxr-xr-x   9 ellen  wheel  306 Sep  6  2006 Mono.framework
drwxrwxr-x   5 root   admin  170 Aug  4  2007 PluginManager.framework
drwxrwxr-x   4 root   staff  136 Jun 20  2003 PrintMeSSL.framework
drwxrwxr-x   5 root   admin  170 Aug  4  2007 ProFX.framework
drwxrwxr-x   7 skip   admin  238 Apr 18  2007 Python.framework
drwxrwxr-x   6 root   admin  204 Jan 31  2005 SASL2.framework
drwx--   5 skip   admin  170 May  2  2004 SDL.framework
drwxrwxr-x@  6 root   admin  204 Sep 26  2005 StuffIt.framework
drwxrwxr-x@  5 root   admin  170 Sep 26  2005 StuffItSupport.framework
drwxr-xr-x  11 root   admin  374 May 14  2004 Tcl.framework
dr-xr-xr-x  11 root   staff  374 May 14  2004 Tk.framework
drwxrwxr-x@  6 root   admin  204 Jan 24  2002 XPrint2ModemCtrAPI.framework

There are a number of frameworks there which look suspiciously old.  How can
I tell which are PPC and which are Intel?  Is it okay to just remove the Tcl
 Tk frameworks?  (Renaming them caused the link to succeed.)  I noticed
much more recent versions in /System/Library/Frameworks.

Thanks,

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Having trouble building Python w/ Tcl/Tk on my new Macbook Pro

2008-02-09 Thread skip
Thanks Nicholas  Kevin for the hints about /Library and discovering the
PPC-ed-ness of files.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pystone numbers for different Macs...

2008-01-21 Thread skip
Daniel ... the benchmark wasn't written to take advantage of multi-core
Daniel machines--silly me I thought any good benchmark would be. 

A little bit of pystone history.  Python's pystone benchmark is a
translation of the Dhrystone benchmark, which was originally written in Ada
in the mid 80s, then translated to C.  I'm pretty sure Guido used the C
version as the basis for pystone.  There is no multithreading in Dhrystone,
so it's understandable that pystone is thread-free as well.

One value of a benchmark is its stability over time.  Since its addition to
Python in 1995 it has had just two bug fixes to the implementation.  You
could certainly fork pystone to create a version that did use multiple
threads, but you'd have to call it something else, pystone-t perhaps.  It
would be a different benchmark.

The only other changes of note to the benchmark are due to the speed of
modern CPUs.  The number of passes of the algorithm to run by default has
grown over the years as processor speeds have increased.  When first
included in Python in 1995 it ran 1000 passes of the main loop.  Today it
defaults to 50,000 to get reasonable runtimes on modern CPUs.  Even so, on
most current 2-3 GHz CPUs it will run in about a second, so it's probably
time to increase the number of passes again.

More detail about the Dhrystone benchmark, including a floating point
predecessor, the Whetstone benchmark, and a couple versions of the C source
you can build and run, are on Wikipedia:

http://en.wikipedia.org/wiki/Dhrystone

For the history of the pystone benchmark, UTSL:

http://svn.python.org/view/python/trunk/Lib/test/pystone.py

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pystone numbers for different Macs...

2008-01-20 Thread skip
Ronald What is interesting though is the difference between 32-bit and
Ronald 64-bit code:

Ronald Python 2.5.2a0 (60124)

Ronald 32-bit: 52083
Ronald 64-bit: 60871

Ronald 64-bit code is significantly faster here (all of this on a
Ronald MacBook Pro 2.33Ghz/3GByte)

Thanks.  Is that something available on the entire line of Core 2 Duo CPUs?
Is it something I can enable on my dual processor G5 or my G4 PowerBook?  If
so, let me know and I'll add more rows.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pystone numbers for different Macs...

2008-01-20 Thread skip
Daniel I am assuming the GIL is limiting threading and therefore I am
Daniel really running on one or two cores--hence the tangible
Daniel improvement is just CPU speed: from 2.33 GHz to 3.0 GHz and a
Daniel bit of the memory bandwidth increase as well.

The GIL doesn't enter into things here.  The pystones benchmark isn't
multithreaded so even if Python was free-threaded the pystones benchmark
wouldn't benefit from it.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pystone numbers for different Macs...

2008-01-20 Thread skip

Ian It would be interesting to see if that held up on ppc64. My guess
Ian is that it would benchmark slower in 64-bit mode than 32-bit mode
Ian on ppc.

I added a pystone entry to the table for my G5 with the Python 2.6a0
interpreter compiled with -fast -fPIC -fwrapv.  I saw a reasonable speedup
(35461 - 37313).

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pystone numbers for different Macs...

2008-01-20 Thread skip

Jack So: any other speculations as to why 2.66Ghz-3.0Ghz gives only a 1%  
Jack increase in pystones?

Maybe compilation flags.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Pystone numbers for different Macs...

2008-01-19 Thread skip

My Powerbook G4 is getting rather long-in-the-tooth.  It's display is
starting to act up, so I think I'm going to buy a new Mac something in the
fairly near future, but I'm not yet sure what.  To that end, I've started a
table of pystone numbers for Macs on the Python wiki:

http://wiki.python.org/moin/MacPython/MacModelPerformance

If you could help by adding some rows to the table, especially for current
MacBook, MacBook Pro or (in the near future, MacBook Air) models, I'd
appreciate it.

Thanks,

-- 
Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/

The major difference between Democrats and Republicans is that
Republicans don't know that Randy Newman's lyrics are full of sarcasm.
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] readline support for OS X Leopard

2007-10-22 Thread skip

Noah ... if someone has any easy fix to get readline to work, I would
Noah greatly appreciate it.

Just install GNU readline and point the build system at it.  For example, I
have MacPorts (http://www.macports.org/) installed in /opt/local.  GNU
readline is installed there, and my readline module is linked against that:

% otool -L ~/local/lib/python2.6/lib-dynload/readline.so 
/Users/skip/local/lib/python2.6/lib-dynload/readline.so:
/opt/local/lib/libreadline.5.2.dylib (compatibility version 5.0.0, 
current version 5.2.0)
/opt/local/lib/libncursesw.5.dylib (compatibility version 5.0.0, 
current version 5.0.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current 
version 93.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 88.1.10)

Configured like so:

./configure  --prefix=/Users/skip/local CPPFLAGS=-I/opt/local/include \
LDFLAGS=-L/opt/local/lib

I don't do framework builds, but if CPPFLAGS and LDFLAGS are set
appropriately those should work as well.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] ctypes and gestalt

2007-09-25 Thread skip

Bill The only use for the gestalt dependency is to check the version of
Bill OS X.

Bill I'd like to replace that with
...

Looks find to me.  I say check it in and let people (or buildbots) complain
if something breaks.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] How to generate C files in Mac/Modules?

2007-08-22 Thread skip

How are all the extension modules in Mac/Modules generated?  I'm trying to
remove PyArg_Parse() from the Python 3 C API.  They use PyArg_Parse
extensively.  If they were autogenerated I'd rather fix the generator
instead of editing each file by hand.

Thanks,

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Can someone help me reverse engineer this installer?

2007-07-03 Thread skip
A long time ago Sam Thorne created a Mac installer for SpamBayes.  It's
referenced here:

http://entrian.com/sbwiki/MacOSXPackage

and source is available here:

http://www.s-j-t.co.uk/SpamBayes/SpamBayesPkg%200.5.zip

The binary package here:

http://www.s-j-t.co.uk/SpamBayes/SpamBayesPackage.pkg.tgz

won't untar for me.  It complains about a lone zero block at 678.

I'd like to start generating Mac installer packages for the normal SpamBayes
distribution, but for that I need some help getting started (having never
done any Mac package creation before).  I sent email to the author asking
about how he created the one he did but haven't heard back from him (maybe
he's just on holiday).

Can one of the MacPython experts here deduce how the above package was
generated and suggest how to proceed?  I don't even know what the best
package creator is on the Mac for Python-based apps.

Thx,

Skip Montanaro

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] MacPython wiki moved to Python wiki - now it's your turn...

2007-03-30 Thread skip

Kevin I was just looking at the new MacPython pages at the Python
Kevin wiki--it appears nothing has been done with them since Skip moved
Kevin them over. I'm thinking this is a terrific opportunity to bring
Kevin them up to date: would anyone mind if I got started?  A lot of
Kevin this stuff doesn't appear to have been touched for three or four
Kevin years.

I say go for it.  You are correct in presuming the functional content has not
been improved.  The spammers have rediscovered it at its new home and
continue to play their silly games, but there are a group of us committed to
keeping the Python wiki cleaned up in that respect.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Roundup Issue Tracker

2007-02-28 Thread skip

Samuel Anyone on this list installed the python based roundup issue
Samuel tracker with framework python2.5?

Nope...

Samuel How did you use --prefix or --install_scripts with setup.py?

Something like

python setup.py install --prefix=/alter/na/tive/dir

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] MacPython wiki moved to Python wiki - now it's your turn...

2007-02-12 Thread skip

After much wailing and gnashing of teeth the past couple of days, I managed
to move (most of?) the content from the MacPython wiki to the main Python
wiki (*).  All pages were created as subpages of

http://wiki.python.or/moin/MacPython

The motivation for this rather hasty move was that the MacPython wiki was
running an ancient version of MoinMoin and got spammed heavily.  Because of
its age and vulnerability it was simply too hard to keep up with all the
wiki spammers.  So I moved everything.

I did very little to try and fix up link references.  Moin's subpage
references have always befuddled me, and many of the page references were
weirded out to begin with, so there you have it: royal link spaghetti.

This is where you come in.  You can do any number of things to try to
identify and fix problems:

* Visit http://wiki.python.org/moin/OrphanedPages and see if there are
  any MacPython/... pages which are orphaned (hint: there are quite a
  few).  Then see if you can find an incorrect link which should refer
  to the orphaned page.

* Visit the MacPython pages.  Just do a title search for MacPython to
  locate them.  Visit and clean up as appropriate.

* Everything got pushed down, even home pages.  One of three things can
  reasonably be done:
  1. Move a home page up if there isn't one at the top level.
  2. Replace an uplevel home page with the MacPython version if the
 latter is better.
  3. Merge the content from the MacPython version into the uplevel home
 page.
  Instead of performing #2 and #3 yourself, you might send an email to
  the person and ask them to do the merge/replace.  In any case, this
  operation is likely to require some link fiddling.

* There may also be non-homepage pages at the top level which should be
  merged with or replaced by (or replace) the MacPython version.
  VisualPython comes to mind.  Use your judgement

* There are lots of unprotected path references in the content,
  e.g. /System/Library sitting there looking like a link when it should
  probably be {{{/System/Library}}}.

* There may still be a bit of spam lurking in the pages.  I tried to
  eliminate all the crap, but I might have missed some.

* Many pages could use Category references.  There are lots of pages
  referring to scripting specific Mac applications, home pages and many
  code samples.  Adding CategoryMac or CategoryAppScript might be
  reasonable as well.

* Use your WikiImagination.  There are probably lots of other things
  that can be done.  I think the MacPython wiki had fallen into a bit of
  disrepair, even if you ignore the spam problem, so a little general
  TLC would probably help.

Skip

(*) Thank goodness for Emacs and Mozex...
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Any decision about the pythonmac.org wiki?

2007-02-11 Thread skip
Bob et al,

A few of us continue to try and push back the teeming hordes of spammers who
are wreaking havoc on the MacPython wiki.  Are you back in the US somewhere?
Any thoughts on a longer term solution?

One thought I had was simply to migrate the current state (after checking
and eliminating spam) to the regular Python wiki, renaming all pages to live
under http://wiki.python.org/moin/MacPython in the process.  The advantage
of that is that maintenance of the wiki software proper is lifted off your
shoulders.  The disadvantage is a loss of some control (e.g. no fancy
snake/apple icon). Would that work for you?

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Any decision about the pythonmac.org wiki?

2007-02-11 Thread skip

Bob I'm just waiting for someone to volunteer to do whatever it is that
Bob is to be done :) Moving it to python.org would probably be the
Bob option that requires least maintenance... I could set up a rewrite
Bob rule once it's moved.

I have a simple script to slurp the raw pages.  Can you stick in a redirect
or rewrite on your web server that maps all URLs which contain action=edit
to a static page that says the wiki is frozen or is undergoing maintenance?
I'll slurp, clean and map URLs as necessary, then install the result in the
proper place.

Thx,

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] So what can we do to clean up the wiki?

2006-12-30 Thread skip

I realize Bob's kind of hamstrung at the moment.  I set up my login to the
wiki to monitor all changes.  I went through and fixed what I could.
Without revert or DeletePage actions it's a bit tough.  In addition, when I
went to restore the FAQ and DrawBot content it told me too many links and
wouldn't let me replace the crap with the correct content!  I had to do them
in several edits...

If someone knows how to delete pages in that old version of Moin (SystemInfo
barfs with a MemoryError, so I can't tell how old it is), please search for
junk or spam in the text of all pages.  Many of the pages that are
returned should just be deleted.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Hello, and Wiki vandalism

2006-12-29 Thread skip

Uche http://pythonmac.org/wiki/FAQ

Uche The page was spammed/vandalized on the 18th.  I checked recent
Uche changes and a lot of pages got this treatment in mid-December,.
Uche I'm surprised they haven't been fixed, considering the importance
Uche of these pages.  I know it's probably just a lack of volunteer
Uche time but I also know MoinMoin has some serviceable anti-spam
Uche features.  I tried to fix the FAQ page myself reverting to the
Uche pre-spam version, but there seems to be some bug where preview
Uche shows the fixed version, but when I submit, it seems to be
Uche re-submitting the spam version.  Really strange.  Leaves me
Uche wondering what's the status of admin on the wiki.

I just set up a login.  I don't even get a revert link with I click the info
link.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pysqlite build problem

2006-10-16 Thread skip
 Ronald == Ronald Oussoren [EMAIL PROTECTED] writes:

Ronald On Oct 15, 2006, at 11:43 PM, [EMAIL PROTECTED] wrote:

 I'm trying to get pysqlite 2.3.2 built on my Mac (OSX 10.4.8, gcc-4.0,
 Python 2.4.4c1).  Sqlite built and installed into /usr/local just  
 fine.  I
 adjusted setup.cfg appropriately:
 
 [build_ext]
 define=
 include_dirs=/usr/local/include:/usr/include
 library_dirs=/usr/local/lib:/usr/lib
 libraries=sqlite3

Ronald Why do you add /usr/include and /usr/lib to include_dirs and
Ronald library_dirs? 

I didn't add them.  They were there by default.  I believe I tried taking
them out leaving just /usr/local/* and the results were worse.

I'll go back and give it another try when I have a chance.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Pysqlite build problem

2006-10-15 Thread skip
I'm trying to get pysqlite 2.3.2 built on my Mac (OSX 10.4.8, gcc-4.0,
Python 2.4.4c1).  Sqlite built and installed into /usr/local just fine.  I
adjusted setup.cfg appropriately:

[build_ext]
define=
include_dirs=/usr/local/include:/usr/include
library_dirs=/usr/local/lib:/usr/lib
libraries=sqlite3

and tried building:

running build
running build_py
creating build
creating build/lib.macosx-10.3-fat-2.4
creating build/lib.macosx-10.3-fat-2.4/pysqlite2
copying pysqlite2/__init__.py - build/lib.macosx-10.3-fat-2.4/pysqlite2
copying pysqlite2/dbapi2.py - build/lib.macosx-10.3-fat-2.4/pysqlite2
creating build/lib.macosx-10.3-fat-2.4/pysqlite2/test
copying pysqlite2/test/__init__.py - 
build/lib.macosx-10.3-fat-2.4/pysqlite2/test
copying pysqlite2/test/dbapi.py - 
build/lib.macosx-10.3-fat-2.4/pysqlite2/test
copying pysqlite2/test/factory.py - 
build/lib.macosx-10.3-fat-2.4/pysqlite2/test
copying pysqlite2/test/hooks.py - 
build/lib.macosx-10.3-fat-2.4/pysqlite2/test
copying pysqlite2/test/regression.py - 
build/lib.macosx-10.3-fat-2.4/pysqlite2/test
copying pysqlite2/test/transactions.py - 
build/lib.macosx-10.3-fat-2.4/pysqlite2/test
copying pysqlite2/test/types.py - 
build/lib.macosx-10.3-fat-2.4/pysqlite2/test
copying pysqlite2/test/userfunctions.py - 
build/lib.macosx-10.3-fat-2.4/pysqlite2/test
running build_ext
building 'pysqlite2._sqlite' extension
creating build/temp.macosx-10.3-fat-2.4
creating build/temp.macosx-10.3-fat-2.4/src
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd 
-fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=pysqlite2.dbapi2 
-I/usr/local/include -I/usr/include 
-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c 
src/module.c -o build/temp.macosx-10.3-fat-2.4/src/module.o
In file included from /usr/include/math.h:28,
 from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/pyport.h:94,
 from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:55,
 from src/connection.h:26,
 from src/module.c:24:
/usr/include/architecture/i386/math.h:439: warning: conflicting types for 
built-in function 'scalb'
In file included from /usr/include/math.h:26,
 from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/pyport.h:94,
 from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:55,
 from src/connection.h:26,
 from src/module.c:24:
/usr/include/architecture/ppc/math.h:477: warning: conflicting types for 
built-in function 'scalb'
In file included from /usr/include/wchar.h:112,
 from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/unicodeobject.h:118,
 from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:81,
 from src/connection.h:26In file included from 
/usr/include/wchar.h:112,
 from src/module.c:24:
,
 from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/unicodeobject.h:118/usr/include/stdarg.h:4:25:,
 from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:81 
,
 from src/connection.h:26error: ,
 from src/module.c:24:
stdarg.h: No such file or directory/usr/include/stdarg.h:4:25:
 error: stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccofOA40.out
error: command 'gcc' failed with exit status 1

It seems the compile is failing on the

#include_next stdarg.h

line in /usr/include/stdarg.h.  Running find against /usr indicates that
there are several 4.0 versions of stdarg.h:

/usr/include/gcc/darwin/3.3/stdarg.h
/usr/include/stdarg.h
/usr/lib/gcc/i686-apple-darwin8/4.0.0/include/stdarg.h
/usr/lib/gcc/i686-apple-darwin8/4.0.0/install-tools/include/stdarg.h
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/stdarg.h
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/install-tools/include/stdarg.h

I tried reinstalling XCode 2 from the install disk, but I still don't see a
gcc 4.0 version of stdarg.h.  /usr/bin/gcc is a symlink to /usr/bin/gcc-4.0.
Software Update says my machine is up-to-date.

I must be missing something, but what?

Thx,

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Pysqlite build problem

2006-10-15 Thread skip

skip I'm trying to get pysqlite 2.3.2 built on my Mac (OSX 10.4.8,
skip gcc-4.0, Python 2.4.4c1)
...
skip stdarg.h: No such file or directory/usr/include/stdarg.h:4:25:
skip  error: stdarg.h: No such file or directory

I updated setup.cfg to include /usr/lib/gcc/powerpc-apple-darwin8/4.0.0:

[build_ext]
define=

include_dirs=/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include:/usr/local/include:/usr/include

library_dirs=/usr/local/lib:/usr/lib/gcc/powerpc-apple-darwin8/4.0.0:/usr/lib
libraries=sqlite3

Pysqlite builds with that change and passes all its tests.  What does it
take to get gcc to consider that directory by default?

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Wiki suggestions

2006-09-24 Thread skip

Perry I'm curious if anyone on this list has either a suggestion for
Perry some Python based Wiki software or a pointer to a site that can
Perry help me in my search.

MoinMoin? http://moinmoin.wikiwikiweb.de/

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Mac Python is DEAD

2006-04-19 Thread skip
Bill But the NEWS section of python.org is totally disfunctional.
Bill Months go by without anyone bothering to add anything to it; I
Bill think the trouble is that no one knows what the add procedure
Bill is.

I tend to agree with you.  Given all the recent changes to the site,
including a completely new tool chain used to build it, details about
updating various bits like NEWS have been lost by many.

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Mac Python is DEAD

2006-04-19 Thread skip

Ronald It is annoying that www.python.org/download/mac doesn't mention
Ronald the universal installer.

It does now.  It will take a few minutes for the global build process to
update the website, but I checked in a minimal change to Subversion.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Fixing the documentation...

2006-04-19 Thread skip

Ronald I don't know who will do it, I do know that we won't get very
Ronald far by just talking about it ;-). Pick some part that you
Ronald consider broken and propose how this can be fixed. I do want to
Ronald fix as many bugs as possible for python 2.5, but that won't
Ronald happen by itself.

If you find something that needs fixing to the website and don't have
Subversion checkin privileges, feel free to send me ([EMAIL PROTECTED]) the
proposed change(s).  I tend to get behind reading Python mailing lists not
directly related to Python development, but if you send changes directly to
me I'll try and get to them within a few hours or a day.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Icons for universal build (was: Download page on www.python.org now updated)

2006-03-04 Thread skip

Brendan Python Documents:  http://twototango.blogs.com/PythonDocument.icns
Brendan Python Launcher:  http://twototango.blogs.com/PythonLauncher.icns
Brendan Idle: http://twototango.blogs.com/Idle.icns

Dumb question probably, but what reads/writes those files?

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Download page on www.python.org now updated

2006-03-02 Thread skip

 Surely better to act up front!  More snakes on the web page!

Ronald But Python isn't named after snakes ;-) ;-)

True enough, but I think even Guido has abandoned that argument.  Had it
been named Monty Python, Cleese or Cheeseshop you might have a leg to
stand on, but it's just Python.  Many people younger than 30 will not
understand the reference.  Most people outside North America and Europe
won't know what it means either.  I think you just have to accept that
snakes are going to be part of the package.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Download page on www.python.org now updated

2006-02-27 Thread skip

 Guido has just announced (at his PyCon keynote) that the new web site
 (see beta.python.org) is going live a week from tomorrow (or Sunday,
 March 5), and has requested help migrating the content.

Bill I see that the content on the downloads page is different on the
Bill beta site, and wrong w.r.t. MacPython.  Is that page (currently in
Bill rest format) going to be replaced with the page from the current
Bill web site (also wrong)?  Should I just fix it?

I just converted it yesterday.  Does this page

http://beta.python.org/download/mac/

still look wrong to you?  It's got the python-squeezing-the-apple icon for
me.  If that's not the case for you perhaps you just need to do a page
reload or empty your browser's cache (or your proxy server's cache).

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Download page on www.python.org now updated

2006-02-25 Thread skip

Russell I just checked and of course the old Macintosh content is
Russell present on the beta site (as well as an unfortunate item on the
Russell main download page indicating that only 2.3 is available for
Russell download on Mac OS X).

Yeah, I plan to take care of that as well, just haven't had the chance.  At
the moment I'm trying to get the pyramid stuff working.  Tim Parkin is
helping me via the net.  Once I've either gotten that taken care of (or
given up on it) I will update the content and check in the relevant files.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] How to fetch iCal todo description?

2006-02-12 Thread skip

has It's definitely there in 10.3 and 10.4, ...
...
hasProperties:
...
hasdescription Unicode -- The todo notes. *
...

Note when I looked (OSX 10.3.9, iCal 1.5.5).  I ran out and bought Tiger
last night.  It's there now...

Thanks,

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] ical.py loose in the wild

2006-02-12 Thread skip
My little iCal event/todo manipulator is loose and available from my Python
Bits page:

http://orca.mojam.com/~skip/python/

It allows you to add or print iCal events and todos from the command line.
You can also feed appropriately formatted email messages to it and turn them
into todos or events.

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] appscript introspection?

2006-02-11 Thread skip

ned 1. appscript supplies a help method for appscript objects.

has You can also render terminology to HTML file using the htmldoc
has module. Easiest way is via HTMLDictionary

Thanks for the excellent help.  They are just what I need...

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] How to fetch iCal todo description?

2006-02-11 Thread skip

I'm plugging away at my little ical appscript interface.  The help postings
were, well, helpful.  Thanks for those.

I'm stuck trying to figure out how to get the notes for a todo.  If I create
a todo via iCal and add a note to it, I don't see any property of the todo
instance that contains that note.  The HTMLDictionary output doesn't list
description or note as one of the properties of a todo item, yet it's
clearly there in iCal.  If I export my todos, I see a DESCRIPTION field in
the generated .ics file:

BEGIN:VCALENDAR

VERSION:2.0

X-WR-CALNAME:Home

...
BEGIN:VTODO

PRIORITY:0

DTSTAMP:20060211T195419Z

UID:D83B6B12-9B38-11DA-9E55-0003939F0506

SEQUENCE:6

STATUS:COMPLETED

DTSTART;TZID=America/Chicago:20060211T132904

SUMMARY:another release

COMPLETED:20060211T06Z

DESCRIPTION:This is a note for the todo...\nAnother line.

DUE;TZID=America/Chicago:20060221T00

END:VTODO

...
END:VCALENDAR


Any clue how I can fetch it via appscript?

Thx,

-- 
Skip Montanaro
http://www.musi-cal.com/
[EMAIL PROTECTED]
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] How to fetch iCal todo description?

2006-02-11 Thread skip

Paul On 2/11/06 3:19 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I'm stuck trying to figure out how to get the notes for a todo.

Paul Which OS are you in?

OSX 10.3.9 and iCal 1.5.5.

Paul In Panther, 'description' is missing from the AppleScript
Paul dictionary. In Tiger, it's there (plus other stuff and several bug
Paul fixes). Since appscript would be accessing the same attributes as
Paul AppleScript, that would be the explanation, if you're in OS
Paul 10.3.

I see.  I just saw your note from 2003:

http://lists.apple.com/archives/Applescript-users/2003/Nov/msg00673.html

and filed a bug report. :-}

Paul Upgrade to Tiger.

*sigh* Okay, maybe a Tiger upgrade would be worth it at this point.  (Is
10.5 in beta yet?)  I could really make use of basic iCal access without
having access to the GUI.  I rarely have my 'book at work, but am generally
ssh-ed into it.  Being able to add and display events  todos from the shell
would be very useful.

Paul The first version or two of all the iApps are crap from the
Paul scriptability angle. They seem to improve a lot with later
Paul versions: iCal in Tiger is pretty good, as is Address Book in
Paul Panther (and Tiger).

This is good news.

Paul Please always include which version of software and OS you're
Paul discussing.

My apologies.  It didn't occur to me that it would be a bug in iCal.  I
thought I was just doing something wrong (looking for the wrong property or
going about getting that bit of information the wrong way).

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] strange #!/usr/bin/pythonw behavior...

2006-02-10 Thread skip

 #!/usr/bin/pythonw

Bob Sounds like you're using OS X 10.3.  It shipped with pythonw as a  
Bob shell script, not an executable.  

Yes, thanks.  Shoulda thought to actually look at /usr/bin/pythonw...

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] strange #!/usr/bin/pythonw behavior...

2006-02-10 Thread skip

 #!/usr/bin/pythonw

Bob Sounds like you're using OS X 10.3.  It shipped with pythonw as a  
Bob shell script, not an executable.  

skip Yes, thanks.  Shoulda thought to actually look at
skip /usr/bin/pythonw...

Alas, explicitly specifying the long path didn't work either.  It bombs on
import of appscript:

Traceback (most recent call last):
  File /Users/skip/cmd/ical.py, line 11, in ?
from appscript import *
  File /Library/Python/2.3/appscript/__init__.py, line 16, in ?
from specifier import app, CommandError
  File /Library/Python/2.3/appscript/specifier.py, line 9, in ?
import aem
  File /Library/Python/2.3/aem/__init__.py, line 25, in ?
from send import *
  File /Library/Python/2.3/aem/send/__init__.py, line 103, in ?
raise RuntimeError, Can't send Apple events: no access to Window
Manager. (aem-based scripts must be run within a GUI process; e.g. use
'pythonw', not 'python', if running script in shell)
RuntimeError: Can't send Apple events: no access to Window
Manager. (aem-based scripts must be run within a GUI process; e.g. use
'pythonw', not 'python', if running script in shell)

even when run from a Terminal window.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] appscript introspection?

2006-02-10 Thread skip
I'm trying to drive iCal using appscript.  I can follow simple examples,
mostly like a parrot though.  This works, for example:

ev = app('iCal').calendars.filter(its.title==Home).events
events = zip(ev.start_date.get(), ev.end_date.get(), 
 ev.summary.get(), ev.description.get())

but I haven't found anywhere that lists all the attributes of an event, so I
can't tell what it has other than start_date, end_date, summary and
description.  If I don't have an example to use as a cheat sheet, how can I
tell how to add an alarm to an event?  Where can I find such information?

Thx,

-- 
Skip Montanaro
http://www.musi-cal.com/
[EMAIL PROTECTED]
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] strange #!/usr/bin/pythonw behavior...

2006-02-09 Thread skip

I want to manipulate iCal from the command line.  Thanks to appscript it
looks like I'll be able to do what I want.

I wrote a simple skeleton script:

#!/usr/bin/pythonw


%(prog)s - manipulate iCal


import sys
import os
import getopt

from appscript import *

... etc ...

I made it executable and tried executing it from the bash prompt in a
Terminal window.  No go.  The system treats it like a shell script and
passes it off to the Bourne shell.  Naturally, this doesn't go over too
well.  If I run it as /usr/bin/pythonw ical.py ... it works just fine.

Am I missing something?

Thx,

-- 
Skip Montanaro
http://www.musi-cal.com/
[EMAIL PROTECTED]
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Mac Intel Python status?

2006-01-27 Thread skip
s Apparently the readline library in MacOSX isn't really readline.
s It's a renamed libedit.  Not having encountered this deception
s before, Python's build procedure doesn't know to test the capability
s of readline.  I suggest you just comment out the readline checks in
s setup.py.

Piet libedit (editline) is a different library with a similar function
Piet as readline, but not compatible with it. It has a BSD license. It
Piet is often used instead of readline for non-GPL software.

True.  I believe it was written by Rich Salz several years ago.  Python used
to work with it, but eventually started using some readline functionality
which libedit doesn't provide.  I don't recall what that is.

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Mac Intel Python status?

2006-01-25 Thread skip

Kent What's the current status of any semi-official build of Python on
Kent Intel?  We actually need to build it without readline support,
Kent haven't been able to figure out how (configure --without-readline
Kent doesn't seem to do it).  It builds if we download Gnu readline and
Kent install it, but without that the build fails.

Apparently the readline library in MacOSX isn't really readline.  It's a
renamed libedit.  Not having encountered this deception before, Python's
build procedure doesn't know to test the capability of readline.  I suggest
you just comment out the readline checks in setup.py.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Database (SQL prefered) access on MacPython

2005-12-02 Thread skip

Benjamin I asked earlier and ODBC seems to be mostly out on the
Benjamin MacPython front.  What methods do you folks use for accessing
Benjamin an database (SQL based database prefered) via macpython?

I've used both PostgreSQL and MySQL from Python on Mac OSX with no problems.
Another guy here at work has used Sybase on his Mac (built the Object Craft
module against the FreeTDS stuff).  Pick your poison.

-- 
Skip Montanaro
Katrina Benefit Concerts: http://www.musi-cal.com/katrina
[EMAIL PROTECTED]
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] what's the plural of Emacs?

2005-06-15 Thread Skip Montanaro

Bob I've heard that some people are happy with the Carbonized GNU Emacs
Bob (I think it can be compiled from CVS, but there are various
Bob binaries available), and Kevin Walzer is working on an AquaMacs
Bob http://www.wordtech-software.com/aquamacs.html distribution,
Bob which I've heard mixed things about.

My understanding (completely second-hand, and from the XEmacs gang, no less)
is that the guy that Carbonized (Carbonified?) GNU Emacs got disillusioned
with the GNU folk.  There are enough Mac/GNU Emacs people to keep that
running though, so it should be a reasonable option.  There is a Carbon
patch for XEmacs (contributed by the same guy) that's available as a a
branch on the XEmacs CVS repository.

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] On posting long urls

2005-05-19 Thread Skip Montanaro

Jack I've got the following javascript snippet in a bookmark in
Jack Safari's bookmark bar:

Jack 
javascript:void(location.href='http://tinyurl.com/create.php?url='+location.href)

Cool.  Seems to work with Firefox as well (1.0.3 on Solaris/Intell in my
case).

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Silly question perhaps, but how do I use py2app?

2005-05-18 Thread Skip Montanaro
I downloaded and installed py2app this evening.  I didn't find an app named
py2app, but did find /usr/local/bin/py2applet.  Is that py2app?  If not,
where is it?  I tried running py2applet with no args or with --help.  Both
times it emitted lines like:

running py2app
creating /private/tmp/tmpN4iyW5/build
creating /private/tmp/tmpN4iyW5/build/bdist.darwin-7.9.0-Power_Macintosh
creating 
/private/tmp/tmpN4iyW5/build/bdist.darwin-7.9.0-Power_Macintosh/python2.4-standalone
creating 
/private/tmp/tmpN4iyW5/build/bdist.darwin-7.9.0-Power_Macintosh/python2.4-standalone/app
creating 
/private/tmp/tmpN4iyW5/build/bdist.darwin-7.9.0-Power_Macintosh/python2.4-standalone/app/collect
creating 
/private/tmp/tmpN4iyW5/build/bdist.darwin-7.9.0-Power_Macintosh/python2.4-standalone/app/temp
creating /private/tmp/tmpN4iyW5/dist
creating 
build/bdist.darwin-7.9.0-Power_Macintosh/python2.4-standalone/app/lib-dynload
creating 
build/bdist.darwin-7.9.0-Power_Macintosh/python2.4-standalone/app/Frameworks
error: You must specify either app or plugin

I'd appreciate some tips on how to use it.

Thanks,

-- 
Skip Montanaro
[EMAIL PROTECTED]
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Recursion limit in OS X?

2005-05-12 Thread Skip Montanaro

Kevin I ran across this thread:

Kevin 
http://lists.osafoundation.org/pipermail/commits/2005-February/003813.html

Kevin which indicates to me that conflicts between recursion limits in
Kevin Python and OS X are a known, documented issue.

% grep ulimit ~/.bash_profile
ulimit -s 8192

Works for me at least.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] [OT] To upgrade Mac OSX or not?

2005-03-03 Thread Skip Montanaro

 Thanks.  I'll have to check to see if that will work for my laptop.
 I have plenty of other stuff on my plate though, so this particular
 issue has sort of moved to the back burner...

Bob If it runs 10.2, it'll run 10.3.  You'll probably notice better
Bob performance, too.

Thanks.  The check is in the mail...

S

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac Wiki has been spammed.

2005-02-08 Thread Skip Montanaro

 http://pythonmac.org/wiki/TkAqua

Bob Unfortunately I do.. but I don't really have time to deal with the
Bob spam.  It has a defense in that existing pages can't be edited with
Bob too many URLs, but creating new pages lets you use as many URLs as
Bob you want.  I think I'd rather replace the installation with
Bob something else or a newer version of MoinMoin before I go hacking
Bob at it any more.

Bob,

I assume you're using MoinMoin 1.2.something.  There is a global Moin
anti-spam facility you can enable without too much trouble.  Take a look at
how that's managed for the python.org wiki:

http://www.python.org/moin/WikiSpam

That also includes a link to the main wiki page for that facility.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac Wiki has been spammed.

2005-02-08 Thread Skip Montanaro

has How about merging it into the python.org wiki? Let someone else do
has all the hard work for a change.

That thought occurred to me right after I posted my earlier reply.  There
are several of us that keep a fairly close eye on the python.org wiki.  If
you want, I'm sure the option to move would be available.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac Wiki has been spammed.

2005-02-08 Thread Skip Montanaro

 There are several of us that keep a fairly close eye on the
 python.org wiki.  If you want, I'm sure the option to move would be
 available.

Bob That works fine for me.. what are the next steps?  It would be nice
Bob to have our own namespace so that pythonmac.org/wiki/FAQ can
Bob still url rewrite to the right place.

Let me check on the python.org maintainers list and get back to you
(off-list unless there are others that care about these minutiae).

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] fink vs DarwinPorts?

2005-02-07 Thread Skip Montanaro

mwh I think there's a fair bit actually -- gnutar, bash, gnumake...

Not to mention gcc...

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] fink vs DarwinPorts?

2005-02-07 Thread Skip Montanaro

 Not to mention gcc...

Bob I said ... until you install Developer Tools.  Mac OS X doesn't
Bob ship stock with gcc.

Sorry, I missed that.  In any case, even if gcc isn't distributed by
default, it's certainly used to build everything, isn't it?

Skip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] [OT] To upgrade Mac OSX or not?

2005-01-25 Thread Skip Montanaro

 Am I missing something?

Charles Umm . . . Software Update?

Software Update won't take me from 10.2 to 10.3.  I'm as Software Updated as
I can be on my laptop, but it's still 10.2.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig