Re: [Pythonmac-SIG] os.environ

2006-03-19 Thread Nicholas Riley
On Sun, Mar 19, 2006 at 07:20:51AM +, Nicholas Cole wrote: > I hope that this is not an FAQ, but I can't find an answer on it. > > I know that Terminal.app is setting the environment variables LINES > and COLUMNS (I can see them with the bash "set" command), but > os.environ['LINES'] and os.en

Re: [Pythonmac-SIG] resizing terminal and curses

2006-03-19 Thread Nicholas Cole
I'm still trying to investigate this problem with resizing terminals. I've found a method which can reliably determine the size of the terminal on OS X (not completely tested), which is to do the following: struct.unpack('hh', fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, '')) However

Re: [Pythonmac-SIG] Pythonmac-SIG Digest, Vol 35, Issue 36

2006-03-19 Thread Daniel Lord
I prefer:import osos.environ['HOME']but I have no strong argument for that bias other than I sometimes use different environment variables and I standardized on the call.DanielOn Mar 19, 2006, at 3:00 AM, [EMAIL PROTECTED] wrote:From: "Stewart Midwinter" <[EMAIL PROTECTED]> Date: March 18, 2006 4:4

[Pythonmac-SIG] [PATCH]: Python should use dlopen() on 10.3+

2006-03-19 Thread Zachary Pincus
Hello folks, Here is a patch to make Python on OS X 10.3 and above use dlopen() (via dynload_shlib.c) to load extension modules, and to make the dl module avaliable. It ought to be incorporated into the SVN for python 2.5, if not for further development on 2.4. If this is an inappropriate c