Re: [Tutor] Best way to use excepthook here?

2016-06-23 Thread Peter Otten
Alex Hall wrote: > Hey all, > How would I go about sharing a reassignment of excepthook, where that > assignment is made to a central function and could come from any of > several files? > > I'm replacing a bunch of SQL jobs at work, and my boss said he doesn't > care which language I use. Natura

Re: [Tutor] Fwd: : Turtle

2016-06-23 Thread Steven D'Aprano
On Thu, Jun 23, 2016 at 02:13:56PM -0700, Hershel Millman wrote: > What I typed was: > > import turtle > turtle.pendown() What do you get if you print turtle.__file__? > (And pendown was highlighted in pycharm, indicating that it was not a valid > command.) > > The error message I received was

Re: [Tutor] Opening EOS-5 HDF file - help!

2016-06-23 Thread Alan Gauld via Tutor
On 23/06/16 15:02, Lennartson, Elizabeth M wrote: > I am trying to open a HDF file in python. I downloaded python 2.7.8 through > miniconda2. Given how many other modules you are loading I'd suggest installing a full anaconda distribution which has everything included as standard. > I also dow

Re: [Tutor] Hi

2016-06-23 Thread Alan Gauld via Tutor
On 23/06/16 19:00, Bharath Swaminathan wrote: > Can I run my python code in multiple processors? I have a dual core... Your OS may run your python code on multiple processors but it's not something you can easily control in Python. Remember that your computer probably has hundreds of processes run

Re: [Tutor] Best way to use excepthook here?

2016-06-23 Thread Alan Gauld via Tutor
On 23/06/16 22:08, Alex Hall wrote: > setup I'm going to try first is one file per job, with utils.py and a > couple others shared between them all. > ... > Now, Python is running two scripts which each have their excepthook set to > something different. What happens when both try to log an excep

Re: [Tutor] Fwd: : Turtle

2016-06-23 Thread Alan Gauld via Tutor
On 23/06/16 22:13, Hershel Millman wrote: > What I typed was: > > import turtle > turtle.pendown() > > (And pendown was highlighted in pycharm, indicating that it was not a valid > command.) Don't use pycharm. We need to eliminate as many variables as possible. Start python in a Terminal and ju

[Tutor] Fwd: : Turtle

2016-06-23 Thread Hershel Millman
What I typed was: import turtle turtle.pendown() (And pendown was highlighted in pycharm, indicating that it was not a valid command.) The error message I received was: /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 "/Users/Hershel/PycharmProjects/Project 1/practicefor

[Tutor] Opening EOS-5 HDF file - help!

2016-06-23 Thread Lennartson, Elizabeth M
I am trying to open a HDF file in python. I downloaded python 2.7.8 through miniconda2. I also downloaded basemap-1.0.7, matplotlib-1.5.0, and numpy-1.11.0. I am trying to do this example: http://hdfeos.org/software/pyhdf.php. I can execute "import os" but when I try to execute "import matplotl

[Tutor] Hi

2016-06-23 Thread Bharath Swaminathan
Can I run my python code in multiple processors? I have a dual core... ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Best way to use excepthook here?

2016-06-23 Thread Alex Hall
Hey all, How would I go about sharing a reassignment of excepthook, where that assignment is made to a central function and could come from any of several files? I'm replacing a bunch of SQL jobs at work, and my boss said he doesn't care which language I use. Naturally, Python it is. :) All these

Re: [Tutor] : Turtle

2016-06-23 Thread Alan Gauld via Tutor
On 23/06/16 01:52, Hershel Millman wrote: > I found the turtle module on my computer. > import turtle print(turtle.__file__) > /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/turtle.py That's the right turtle module do not rename it. >>> I entered "import

[Tutor] Fwd: Fwd: Fwd: Turtle

2016-06-23 Thread Hershel Millman
I found the turtle module on my computer. >>> import turtle >>> print(turtle.__file__) /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/turtle.py I followed the chain of folders in my finder window, and was able to locate the file. I tried to rename the file and my c