Re: [Tutor] How to get file permissions (Python 2.4)?

2014-03-19 Thread Steven D'Aprano
On Thu, Mar 20, 2014 at 01:13:28AM +, Alan Gauld wrote: > On 19/03/14 16:48, leam hall wrote: > >I can use os.chmod('/usr/local/somefile') to change permissions but I > >haven't been able to find a way to test for file modes. > > > stat.S_IRWXU('/usr/bin/python') > >Traceback (most recent c

Re: [Tutor] loop through hours to calc max and plot

2014-03-19 Thread ALAN GAULD
Forwarding to the list. Use ReplyAll when responding to ensure maximum responses.   Alan Gauld Author of the Learn To Program website http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos > > From: questions anon >To: Alan Gauld >Sent: Wednesda

Re: [Tutor] How to get file permissions (Python 2.4)?

2014-03-19 Thread Alan Gauld
On 19/03/14 16:48, leam hall wrote: I can use os.chmod('/usr/local/somefile') to change permissions but I haven't been able to find a way to test for file modes. stat.S_IRWXU('/usr/bin/python') Traceback (most recent call last): File "", line 1, in ? TypeError: 'int' object is not callable

Re: [Tutor] FW: Beginner - list not returning correct variable value

2014-03-19 Thread Mark Lawrence
On 19/03/2014 20:41, Marc Eymard wrote: Hello Tutor, Could somebody help me with below query? Thanks Marc From: marc_eym...@hotmail.com To: tutor@python.org Subject: Beginner - list not returning correct variable value Da

Re: [Tutor] FW: Beginner - list not returning correct variable value

2014-03-19 Thread Danny Yoo
Hmm. Did you get Alan's reply six days ago? Here's a link to his reply, just in case you've missed it: https://mail.python.org/pipermail/tutor/2014-March/100580.html ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription optio

[Tutor] FW: Beginner - list not returning correct variable value

2014-03-19 Thread Marc Eymard
Hello Tutor, Could somebody help me with below query? Thanks Marc From: marc_eym...@hotmail.com To: tutor@python.org Subject: Beginner - list not returning correct variable value Date: Thu, 13 Mar 2014 16:12:28 + Hello Tutor, I am a self-taught Python script beginner and I do it from th

[Tutor] is set/getlocale buggy in OS X?

2014-03-19 Thread Albert-Jan Roskam
I got several unexpected results using locale.getlocale under OS X. On one computer (not mine) it returned (None, None), even though I used setlocale. Now I am getting the result below on my own computer. Is there a good workaround for this?  Albert-Jans-Mac-Pro:macos albertjan$ uname -a Darw

Re: [Tutor] mixing 64 bit and 32 bit

2014-03-19 Thread John Fabiani
Thanks Johnf On 03/19/2014 11:01 AM, Reuben wrote: Hi John, The generated bytecodes will be different - but both version can run same code without issues Regards, Reuben On 19-Mar-2014 11:28 PM, "John Fabiani" > wrote: Hi, At my office we have a mix o

Re: [Tutor] How to create a sqlite table schema dynamically

2014-03-19 Thread Mark Lawrence
On 19/03/2014 12:19, Toni Fuente wrote: Hello everyone, I am stack with a problem that I can't find a solution: I need to create a sqlite schema dynamically, I've got a dictionary with text keys: "RedHat", "CentOS", "SLES9",..., "etc", "etc" My intention was at the time of creating the table s

Re: [Tutor] mixing 64 bit and 32 bit

2014-03-19 Thread Reuben
Hi John, The generated bytecodes will be different - but both version can run same code without issues Regards, Reuben On 19-Mar-2014 11:28 PM, "John Fabiani" wrote: > Hi, > > At my office we have a mix of XP (32bit) and Window 7 (64 bit). I > installed python 64 bit on the windows 7 machines

[Tutor] mixing 64 bit and 32 bit

2014-03-19 Thread John Fabiani
Hi, At my office we have a mix of XP (32bit) and Window 7 (64 bit). I installed python 64 bit on the windows 7 machines and 32 bit on the XP machines. The question is can the different version run the same code without causing issues. Can the 64 bit use the same byte code as the 32 bit? I

Re: [Tutor] How to get file permissions (Python 2.4)?

2014-03-19 Thread Walter Prins
Hi On 19 March 2014 18:48, leam hall wrote: > I can use os.chmod('/usr/local/somefile') to change permissions but I > haven't been able to find a way to test for file modes. > stat.S_IRWXU('/usr/bin/python') > Traceback (most recent call last): > File "", line 1, in ? > TypeError: 'int' ob

Re: [Tutor] How to get file permissions (Python 2.4)?

2014-03-19 Thread Martin A. Brown
Hi there, : I can use os.chmod('/usr/local/somefile') to change permissions : but I haven't been able to find a way to test for file modes. : : >>> stat.S_IRWXU('/usr/bin/python') : Traceback (most recent call last): : File "", line 1, in ? : TypeError: 'int' object is not callable :

[Tutor] How to get file permissions (Python 2.4)?

2014-03-19 Thread leam hall
I can use os.chmod('/usr/local/somefile') to change permissions but I haven't been able to find a way to test for file modes. >>> stat.S_IRWXU('/usr/bin/python') Traceback (most recent call last): File "", line 1, in ? TypeError: 'int' object is not callable What should I be looking for? Python

[Tutor] How to create a sqlite table schema dynamically

2014-03-19 Thread Toni Fuente
Hello everyone, I am stack with a problem that I can't find a solution: I need to create a sqlite schema dynamically, I've got a dictionary with text keys: "RedHat", "CentOS", "SLES9",..., "etc", "etc" My intention was at the time of creating the table schema run a loop through the dictionary ke

Re: [Tutor] apihelper in dive into python

2014-03-19 Thread Peter Otten
robert.gutm...@dlr.de wrote: > Hi guys, > > I've got the following problem: I tried to run the example-program > apihelper.py in chapter IV of "Dive into Python" and got the following > error message: > > Define the builtin 'help'. > This is a wrapper around pydoc.help (with a twist). > > T

Re: [Tutor] loop through hours to calc max and plot

2014-03-19 Thread Alan Gauld
On 19/03/14 05:12, questions anon wrote: I have monthly netcdf files containing hourly temperature data. I would like to loop through all of the hours and calculate the max for each hour (00 - 23) and then make a plot. Its hard to give specific help since I don't know the file format and most

[Tutor] apihelper in dive into python

2014-03-19 Thread Robert.Gutmann
Hi guys, I've got the following problem: I tried to run the example-program apihelper.py in chapter IV of "Dive into Python" and got the following error message: Define the builtin 'help'. This is a wrapper around pydoc.help (with a twist). This is not the Output I expected, however I have