[Tutor] ipython trouble with editor

2012-02-13 Thread David Craig

Hi,
I use emacs with ipython (or I would like to) on a GNU/linux machine. To 
be able to use it from the ipython shell through %ed I added the 
following lines to my .bashrc file,


export LESS="-R"
export EDITOR=emacs

this seemed to work as when I try %ed filename it opens and is editable 
in the ipython shell. However I cant quit out of emacs to run my 
changes. I've tried Control-x Control-c but it doesnt work. Anyone know 
how I can exit?

Thanks
D
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] What's the difference between Queue(in module Queue) and list(build_in class)?

2012-02-13 Thread daedae11
What's the difference between Queue(in module Queue) and list(build_in class)? 
I think that when I pass a same queue object to two different threads, the 
change in each thread will affect each other as same as Queue. So why don't we 
use list or other variable object?




daedae11___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] What's the difference between Queue(in module Queue) and list(build_in class)?

2012-02-13 Thread Steven D'Aprano

daedae11 wrote:
What's the difference between Queue(in module Queue) and list(build_in class)? 
I think that when I pass a same queue object to two different threads, the change in each thread will affect each other as same as Queue. So why don't we use list or other variable object?



Have you read the Fine Manual?

Queue has a much more powerful and richer interface designed for use as a 
queue, while list is a general purpose sequence that can only be used for the 
most primitive queue-like data structures.


For example, Queue can be set to have a maximum size, while list will always 
grow until you run out of memory.


Queue.get() by default will wait as long as necessary for a value to be 
available, while list.pop() will fail immediately if the list is empty.


Queue is also carefully written to be thread-safe, unlike most other data 
structures written in pure Python. (I expect that the built-in list is also 
thread-safe, but I don't know for sure.)


By thread-safe I mean that two threads cannot accidentally delete or write to 
the same item at the same time. Thread safety is very hard to get right, so 
you should always use Queue with threads.




--
Steven

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] ipython trouble with editor

2012-02-13 Thread Steven D'Aprano

David Craig wrote:

Hi,
I use emacs with ipython (or I would like to) on a GNU/linux machine. To 
be able to use it from the ipython shell through %ed I added the 
following lines to my .bashrc file,


export LESS="-R"
export EDITOR=emacs

this seemed to work as when I try %ed filename it opens and is editable 
in the ipython shell. However I cant quit out of emacs to run my 
changes. I've tried Control-x Control-c but it doesnt work. Anyone know 
how I can exit?



This is not a mailing list for solving emacs problems, although we'll help you 
if we can. It's not even for solving ipython problems, since that's a fairly 
specialist area of Python (although I must admit I keep intending to try it 
out). This is for learning Python the programming language itself, not 
necessarily every tool vaguely associated with Python. You might be better off 
asking your question on a dedicated ipython support forum.


While waiting for somebody who knows more about ipython/emacs to show up, I'll 
start with a basic question: when you run emacs in ipython, do you get emacs 
running in the terminal, or in a GUI window?


If you get a GUI window, what happens if you select the Quit menu item or 
close the window?




--
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] ipython trouble with editor

2012-02-13 Thread Mark Lawrence

On 13/02/2012 16:07, Steven D'Aprano wrote:

[snipped]


You might be better off asking your question on a dedicated
ipython support forum.


Like http://news.gmane.org/gmane.comp.python.ipython.user

--
Cheers.

Mark Lawrence.

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Cmd Advice

2012-02-13 Thread Dave Hanson
On Sat, Feb 11, 2012 at 2:03 PM, Walter Prins  wrote:

> Hi all,
>
> Below is an *earlier* (note the date) private response by myself that
> at the time accidentally didn't get sent to the list and only to Dave
> (as he privately replied to me only and not to the list.) Given that
> the thread on the list has resumed,  I thought I'd forward this to the
> thread for completeness sake as otherwise a bit of context might be
> lost.
>
> Regards,
>
> Walter
>
>
> -- Forwarded message --
> From: Walter Prins 
> Date: 8 February 2012 01:29
> Subject: Re: [Tutor] Cmd Advice
> To: Dave Hanson 
>
>
> HI Dave,
>
>
> On 7 February 2012 16:55, Dave Hanson  wrote:
> >
> > I tried what you said, many attempts result in this message:
> >
> >>
> >> C:\Documents and Settings\dhanson2\Desktop>"C:\Python27\python.exe"
> "C:\t.py"
> >>
> >> C:\Python27\python.exe: can't open file 'C:\t.py': [Errno 2] No such
> file or directory
> >
> >
> > I've tried moving t.py around but still no joy?
> >
> > Here is what I put in my bat file with and without the quotes:
> >
> >>
> >> "C:\Python27\python.exe" "C:\t.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
> >
> >
>
> The error message implies that the program "t.py" is in the root of
> your C:\ drive?  I'd have thought this would not be the case -- you
> need to give the correct path to the "t.py" file for Python to load
> it. (And as an aside, you need to quote paths if theycontains spaces,
> otherwise the command prompt will interpret the first part up to a
> space in the path as the path/command and the remainder of the path as
> a command line argument!  (One subtlety of command lines...)  The
> "Documents and Settings" folder on Windows XP was therefore very
> unfortunately chosen since the spaces causes endless problems with
> people not realising this and trying to use files located inside
> Documents and Settings.  You'll notice on Windows 7 Microsoft has
> wisely (at last) decided to shorten and remove spaces as much as
> possible from paths to avoid gotchas with people forgetting to quote
> paths, and similarly Python itself does not uses spaces in any of its
> folder names.  But I digress.
>
> Anyway, I've had a quick further look at this program and got it
> working the way you want on my machine.  The precise steps I followed
> was:
> 1.) Install Mercurial for Windows (to be able to checkout the source).
>  I got it here: http://tortoisehg.bitbucket.org/download/index.html
> 2.) Retrieved the source code.  On my machine I opened a command prompt,
> and:
> cd "C:\Users\walterp\Documents\Python"
> hg clone https://bitbucket.org/sjl/t
>
> This creates a folder called "t" inside of my Python source folder.
> Adjust folders as required for your machine and/or where you keep your
> Python source.
>
> 3) Create a batch file called "t.bat" in
> "C:\Users\walterp\Documents\Python\t", so the full filename is
> "C:\Users\walterp\Documents\Python\t\t.bat", containing these lines:
>
> @echo off
> c:
> cd C:\Users\walterp\Documents\Python\t
> c:\python27\python.exe "C:\Users\walterp\Documents\Python\t\t.py" %1
> %2 %3 %4 %5 %6 %7 %8 %9
>
> The effect of these commands is to stop the command interpreter from
> displaying the commands issues by the batch file (which is unwanted
> here) via the "@echo off" line, and then setting up the environment
> prior to running the t.py program such that it will always run having
> the "current working folder" be the same folder that the t.py program
> is located in.
>
> This is important since the t.py program currently assumes that it
> will always be run from the same starting location, which is not the
> case if you go and put the program on the command line search path so
> that you can use it from any other working folder.  (Without this, if
> you run the program from another location, then the t.py program will
> create a new task list in the new location -- basically the t.py
> command will create and manage a task list in whatever folder you
> happen to be in, so in order to ensure it always updates the same task
> list, the lines above therefore ensures it always effectively runs
> from the same place, regardless of where the batch file t.bat might
> have been run from, thereby effectively ensuring it to always uses the
> same task list file.)
>
> Also, note that in order to in fact use the t.bat file from any other
> folder, you'll have to add the bat files location to you system (or
> user) PATH variable.  Do you know how to do this, and are you allowed
> to do so, or are you blocked by your IT policies?  If so you should
> also be able to do this via e.g. another batch file, perhaps the same
> one you use to circumvent the cmd.exe blocks on your system, by simply
> adding it to the PATH variable there, e.g. a line like this ought to
> do it:
> PATH=%PATH%;C:\Users\walterp\Documents\Python\t
>
> Lastly a minor observation:  I note this source code includes a
> setup.py script.  This implies you can install t.py into your Python
> environme

Re: [Tutor] Cmd Advice

2012-02-13 Thread Alan Gauld

On 13/02/12 17:00, Dave Hanson wrote:


[For future reference - should I have snipped the previous message out
of this email or trimmed it down a bit?


Always snip out as much as possible that is not needed for context.
Anything irrelevant just adds to the confusion and the byte count.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Alan Gauld

On 13/02/12 23:50, Elaina Ann Hyde wrote:

Hi, I'm working on a routine for reading in the Schlegel dustmaps.  I
have an ascii table with values, Ra-Dec and I'm trying to convert 2
columns to l,b and get the dust values out, this is a 2 part problem as
I need to first convert to l,b, keep those values for other uses
(calculating VLSR), and get extinctions for each l,b value,


That sounds very interesting but almost totally meaningless to most of 
us on this list I suspect! :-)



import astropysics
from astropysics.coords import ICRSCoordinates,GalacticCoordinates
import asciitable


From those lines alone I suspect you might have more luck on either a 
specialised forum or on the general Python mailing list/newsgroup.
It looks like a much more specialised query than is usual on this list 
which is for beginning Python programmers.


However


dustmap='SFD_dust_4096_ngp.fits'
EB_V=astropysics.obstools.get_SFD_dust(l,b,dustmap,interpolate=True)
---
this gives the error 'Only length-1 arrays can be converted to Python
scalars' ... however, I cannot do:


Always post the full error text not just the last line or a summary.
It usually contains a lot of useful information, especially what code 
Python actually saw when it tried to execute your code.



gcoords=ICRSCoordinates(dat['ra-drad'],dat['dec-drad'],radians=True).convert(GalacticCoordinates)

without the same error.  Any ideas would be appreciated, thanks!


On the surface I have no idea because that looks like an issue
related to the use of the astrophysics module. But the error
message may reveal a more fundamental issue underneath.


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Elaina Ann Hyde
On Tue, Feb 14, 2012 at 11:52 AM, Alan Gauld wrote:

> On 13/02/12 23:50, Elaina Ann Hyde wrote:
>
>> Hi, I'm working on a routine for reading in the Schlegel dustmaps.  I
>> have an ascii table with values, Ra-Dec and I'm trying to convert 2
>> columns to l,b and get the dust values out, this is a 2 part problem as
>> I need to first convert to l,b, keep those values for other uses
>> (calculating VLSR), and get extinctions for each l,b value,
>>
>
> That sounds very interesting but almost totally meaningless to most of us
> on this list I suspect! :-)
>
>
>  import astropysics
>> from astropysics.coords import ICRSCoordinates,**GalacticCoordinates
>> import asciitable
>>
>
> From those lines alone I suspect you might have more luck on either a
> specialised forum or on the general Python mailing list/newsgroup.
> It looks like a much more specialised query than is usual on this list
> which is for beginning Python programmers.
>
> However
>
>
>  dustmap='SFD_dust_4096_ngp.**fits'
>> EB_V=astropysics.obstools.get_**SFD_dust(l,b,dustmap,**interpolate=True)
>> ---
>> this gives the error 'Only length-1 arrays can be converted to Python
>> scalars' ... however, I cannot do:
>>
>
> Always post the full error text not just the last line or a summary.
> It usually contains a lot of useful information, especially what code
> Python actually saw when it tried to execute your code.
>
>  gcoords=ICRSCoordinates(dat['**ra-drad'],dat['dec-drad'],**
>> radians=True).convert(**GalacticCoordinates)
>>
>> without the same error.  Any ideas would be appreciated, thanks!
>>
>
> On the surface I have no idea because that looks like an issue
> related to the use of the astrophysics module. But the error
> message may reveal a more fundamental issue underneath.
>
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
> __**_
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor
>

Thanks Alan,
   I'm pretty sure that the problem is that the module expects a scalar and
I want it to read and return a vector from a table.  This is a general-ish
problem since I haven't had any real experience operating vectors, although
the code I'm working on now should give me that.  I had a moment of
puzzelment earlier when I realized that .math doesn't operate on vectors
either so you have to do np.sin() instead of math.sin().  I am
thinking/hoping this might be a similarly easy problem  Anyone
performing a module operation on a column from a file would encounter a
similar message (I have in other instances as well, some tasks don't seem
to care, other's do...).  If I do figure it out and it's a general thing
shall I post the solution here? The entire error is:
Traceback (most recent call last):
  File "read_plot.py", line 63, in 
gcoords=ICRSCoordinates(dat['ra-drad'],dat['dec-drad'],
radians=True).convert(GalacticCoordinates)
  File
"/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/Astropysics-0.1.dev_r1142-py2.7.egg/astropysics/coords/coordsys.py",
line 1845, in __init__

EpochalLatLongCoordinates.__init__(self,kwargs['ra'],kwargs['dec'],kwargs['raerr'],kwargs['decerr'])
  File
"/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/Astropysics-0.1.dev_r1142-py2.7.egg/astropysics/coords/coordsys.py",
line 1730, in __init__
LatLongCoordinates.__init__(self,long,lat,longerr,laterr,distancepc)
  File
"/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/Astropysics-0.1.dev_r1142-py2.7.egg/astropysics/coords/coordsys.py",
line 1307, in __init__
self.lat = lat
  File
"/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/Astropysics-0.1.dev_r1142-py2.7.egg/astropysics/coords/coordsys.py",
line 1375, in _setLat
rads = AngularCoordinate(val).radians%_twopi
  File
"/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/Astropysics-0.1.dev_r1142-py2.7.egg/astropysics/coords/coordsys.py",
line 254, in __init__
self._decval = radians(inpt)
  File
"/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/numpy/ma/core.py",
line 3782, in __float__
raise TypeError("Only length-1 arrays can be converted "\
TypeError: Only length-1 arrays can be converted to Python scalars
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Martin A. Brown

Greetings Elaina,

I will echo Alan's remarks--it sounds like you are using a quite
specialized (specialised?) module.  It is certainly not a module 
with which I am familiar, not in the standard library, and not a 
commonly encountered problem.  I would classify this module as 
domain-specific.

It is for this reason, that Alan (and possibly others on this list) 
would recommend finding a domain-specific mailing list on which to 
ask the question--IFF that question is really domain specific.

If the question is more general (and part of your question is 
general), then this is an appropriate forum.  With that, said, 
though, you have asked the question quite reasonably, and I have one 
other observation to make, based on the traceback and comments you 
have provided.

 : I'm pretty sure that the problem is that the module expects a 
 : scalar and I want it to read and return a vector from a table.  
 : This is a general-ish problem since I haven't had any real 
 : experience operating vectors, although the code I'm working on 
 : now should give me that.  I had a moment of puzzelment earlier 
 : when I realized that .math doesn't operate on vectors either so 
 : you have to do np.sin() instead of math.sin(). 

I note that you say 'np' here.  I will make an educated guess that 
this means numpy.  There is a package, numpy [0], which operates on 
arrays/vectors rather than the Python standard library math, which 
operates on individual values.

So, yes, you can use the standard library for calculating a sine:

  >>> import math
  >>> math.sin(0)
  0.0

But, the numpy library lets you operate on an array.

  >>> import numpy
  >>> l = [ x/1000.0 for x in range(1,1001) ]
  >>> len(numpy.sin(l))
  1000

It is up to you whether you treat the data as an array or a vector.

Now...going back to your original posting, I see:

 : dustmap='SFD_dust_4096_ngp.fits'
 : EB_V=astropysics.obstools.get_SFD_dust(l,b,dustmap,interpolate=True)
 : ---
 : this gives the error 'Only length-1 arrays can be converted to 
 : Python scalars' ... however, I cannot do:

First, I have no idea what a dustmap is.  Second thing, it seems 
that the error you are seeing is 'Only length-1 arrays [...]', which 
suggests that you are treating an array (a numpy thing) as a scalar 
(a native Python data type) without knowing how you wish to 
summarize your data into a single value.

Who is responsible for the namespace 'astrophysics' here?  The 
documentation there may be able to help you.maybe.

 : I am thinking/hoping this might be a similarly easy problem  
 : Anyone performing a module operation on a column from a file 
 : would encounter a similar message (I have in other instances as 
 : well, some tasks don't seem to care, other's do...).  If I do 
 : figure it out and it's a general thing shall I post the solution 
 : here? The entire error is: Traceback (most recent call last):

It is good form to post the traceback, so thank you for posting 
that.  I snipped your traceback, because the error message suggested 
to me exactly what you observed--that some part of that operates 
only on values, not arrays/vectors.

Good luck sorting this out!

-Martin

 [0] http://numpy.scipy.org/
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Andre' Walker-Loud
Hi Elaina,

just reading your question (and responses).  There is an issue with what you 
wrote in the email, which may help.

> for row in dat:
>  
> gcoords=ICRSCoordinates(dat['ra-drad'],dat['dec-drad'],radians=True).convert(GalacticCoordinates)

This line is identical to the one that broke before, and now you are just 
looping over it, so it is not surprising to fail in the same way.  If a loop 
will work, you would need the following instead

"""
for row in dat:
gcoords = 
ICRSCoordinates(row['ra-drad'],row['dec-drad'],radians=True).convert(GalacticCoordinates)
"""

notice the "dat" --> "row" inside the loop.  Now if that works, you can get it 
to work along the following lines

Example: suppose the output (gcoords) is a scalar float, and you would like to 
store these data in an array.  Then you can do

"""
import numpy as np #just copying the style from a previous reply

gcoords = np.zeros([len(dat)]) #this creates a numpy array of the length of 
dat, and fills it with all zeros
for i,row in enumerate(dat):
gcoords[i] = 
ICRSCoordinates(row['ra-drad'],row['dec-drad'],radians=True).convert(GalacticCoordinates)
"""

If the loop doesn't work, then you need to investigate the astrophysics library 
you are using, as previously mentioned, and hopefully there is someone who is 
familiar with it you can ask questions to.  

Actually, even if the loop does work, you want to be more familiar with the 
astrophysics library.  You certainly would not want to produce results with it 
(and base some conclusions on them/publish them) without being 100% sure you 
know what it is doing.


Good luck,

Andre
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Mark Lawrence

On 13/02/2012 23:50, Elaina Ann Hyde wrote:

Hi, I'm working on a routine for reading in the Schlegel dustmaps.  I have
an ascii table with values, Ra-Dec and I'm trying to convert 2 columns to
l,b and get the dust values out, this is a 2 part problem as I need to
first convert to l,b, keep those values for other uses (calculating VLSR),
and get extinctions for each l,b value, I have:

import astropysics
from astropysics.coords import ICRSCoordinates,GalacticCoordinates
import asciitable

x='Core_rod_name.list'
dat=asciitable.read(x,Reader=asciitable.CommentedHeader,
fill_values=['','-999.99'])
Radeg=dat['ra-drad']*180./math.pi
Decdeg=dat['dec-drad']*180./math.pi

plot(Radeg,Decdeg,'o')
xlabel('Radeg')
ylabel('Decdeg')

gcoords=ICRSCoordinates(dat['ra-drad'],dat['dec-drad'],radians=True).convert(GalacticCoordinates)
l=gcoords.l.degrees
b=gcoords.b.degrees

VLSR=dat['Vhel_f'] + 9*np.cos(l)*np.cos(b) + 12*np.sin(l)*np.cos(b) +
7*np.sin(b)
VGSR=VLSR + 220*np.sin(l)*np.cos(b)

dustmap='SFD_dust_4096_ngp.fits'
EB_V=astropysics.obstools.get_SFD_dust(l,b,dustmap,interpolate=True)
---
this gives the error 'Only length-1 arrays can be converted to Python
scalars' ... however, I cannot do:

for row in dat:

gcoords=ICRSCoordinates(dat['ra-drad'],dat['dec-drad'],radians=True).convert(GalacticCoordinates)

without the same error.  Any ideas would be apreciated, thanks!

~Elaina



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Well it's as clear as dust to me :)

Unlike others who have already responded I don't believe that this will 
be too difficult to sort as the astropysics package is available on Pypi 
and there it states that it requires scipy and numpy.  Did you or 
someone else install the package, if the latter can you ask them about 
this problem?


Best of British/Australian/Whatever luck with this.

--
Cheers.

Mark Lawrence.

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Request for advice on Python code

2012-02-13 Thread Elaina Ann Hyde
On Tue, Feb 14, 2012 at 1:38 PM, Andre' Walker-Loud wrote:

> Hi Elaina,
>
> just reading your question (and responses).  There is an issue with what
> you wrote in the email, which may help.
>
> > for row in dat:
> >
>  
> gcoords=ICRSCoordinates(dat['ra-drad'],dat['dec-drad'],radians=True).convert(GalacticCoordinates)
>
> This line is identical to the one that broke before, and now you are just
> looping over it, so it is not surprising to fail in the same way.  If a
> loop will work, you would need the following instead
>
> """
> for row in dat:
>gcoords =
> ICRSCoordinates(row['ra-drad'],row['dec-drad'],radians=True).convert(GalacticCoordinates)
> """
>
> notice the "dat" --> "row" inside the loop.  Now if that works, you can
> get it to work along the following lines
>
> Example: suppose the output (gcoords) is a scalar float, and you would
> like to store these data in an array.  Then you can do
>
> """
> import numpy as np #just copying the style from a previous reply
>
> gcoords = np.zeros([len(dat)]) #this creates a numpy array of the length
> of dat, and fills it with all zeros
> for i,row in enumerate(dat):
>gcoords[i] =
> ICRSCoordinates(row['ra-drad'],row['dec-drad'],radians=True).convert(GalacticCoordinates)
> """
>
> If the loop doesn't work, then you need to investigate the astrophysics
> library you are using, as previously mentioned, and hopefully there is
> someone who is familiar with it you can ask questions to.
>
> Actually, even if the loop does work, you want to be more familiar with
> the astrophysics library.  You certainly would not want to produce results
> with it (and base some conclusions on them/publish them) without being 100%
> sure you know what it is doing.
>
>
> Good luck,
>
> Andre



Thanks to everyone who replied, Andre's idea was very good and led to the
following solution:
l=[]
b=[]
for i in xrange(len(Radeg)):
gcoords=ICRSCoordinates(Radeg[i],Decdeg[i]).convert(GalacticCoordinates)
l.append(gcoords.l.degrees)
b.append(gcoords.b.degrees)

 you know, just in case anyone ever wants to convert to galactic
coordinates in the future.
Thanks again
~Elaina
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor