Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
detecting Cython version?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris Barker  
View profile  
 More options Oct 3 2012, 1:50 pm
From: Chris Barker <chris.bar...@noaa.gov>
Date: Wed, 3 Oct 2012 10:50:07 -0700
Local: Wed, Oct 3 2012 1:50 pm
Subject: detecting Cython version?
Folks,

running:

$cython --version

gives me the version of the cyton script.

However, I can't find a way to see the version from python.
In [4]: import cython

In [5]: cython.__version__

AttributeError: 'module' object has no attribute '__version__'

It looks like there is a __version__ in the __init__.py, but that
doen'st appear to be hoe it's getting imported, rather the
higher-level cyton.py is gettign imported, which then imports
Cython.Shadow:

In [6]: cython.__file__
Out[6]: '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa ges/cython.py'

I find this all a bit confusing -- but maybe __version__ should be
defined in Cython.Shadow.

-Chris

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Bar...@noaa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Bradshaw  
View profile  
 More options Oct 3 2012, 1:55 pm
From: Robert Bradshaw <rober...@gmail.com>
Date: Wed, 3 Oct 2012 10:55:09 -0700
Local: Wed, Oct 3 2012 1:55 pm
Subject: Re: [cython-users] detecting Cython version?

Yeah, this is a bit confusing. +1 to adding it to Shadow (which could
be resolved at compile time as well). Also, you could try importing
Cython instead of cython.

- Robert


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Barker  
View profile  
 More options Oct 3 2012, 2:06 pm
From: Chris Barker <chris.bar...@noaa.gov>
Date: Wed, 3 Oct 2012 11:05:37 -0700
Local: Wed, Oct 3 2012 2:05 pm
Subject: Re: [cython-users] detecting Cython version?

On Wed, Oct 3, 2012 at 10:55 AM, Robert Bradshaw <rober...@gmail.com> wrote:
> On Wed, Oct 3, 2012 at 10:50 AM, Chris Barker <chris.bar...@noaa.gov> wrote:
>> I find this all a bit confusing -- but maybe __version__ should be
>> defined in Cython.Shadow.

> Yeah, this is a bit confusing. +1 to adding it to Shadow (which could
> be resolved at compile time as well). Also, you could try importing
> Cython instead of cython.

yup -- that gets me the version, but shy does the cython.py wierd
import thing exist anyway? Presumably there is a reason.

Also, I think it's a bad a idea to have a package module with an
upper-case name (particularly one mirroring a lower-case name) --
there are case-insensitive file systems out there (what does this do
on Windows?)

-Chris

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Bar...@noaa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Bradshaw  
View profile  
 More options Oct 3 2012, 2:13 pm
From: Robert Bradshaw <rober...@gmail.com>
Date: Wed, 3 Oct 2012 11:13:23 -0700
Local: Wed, Oct 3 2012 2:13 pm
Subject: Re: [cython-users] detecting Cython version?

Yeah. It exists to support pure mode:
http://docs.cython.org/src/tutorial/pure.html

> there are case-insensitive file systems out there (what does this do
> on Windows?)

With the exception of __version__, importing either one should have
the same effect.

https://github.com/cython/cython/blob/master/Cython/__init__.py

- Robert


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Barker  
View profile  
 More options Oct 3 2012, 2:21 pm
From: Chris Barker <chris.bar...@noaa.gov>
Date: Wed, 3 Oct 2012 11:20:26 -0700
Local: Wed, Oct 3 2012 2:20 pm
Subject: Re: [cython-users] detecting Cython version?

On Wed, Oct 3, 2012 at 11:13 AM, Robert Bradshaw <rober...@gmail.com> wrote:
> With the exception of __version__, importing either one should have
> the same effect.

> https://github.com/cython/cython/blob/master/Cython/__init__.py

so we really shold move __version__ to Cython.Shadow

-CHB

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Bar...@noaa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Behnel  
View profile  
 More options Oct 3 2012, 3:47 pm
From: Stefan Behnel <stefan...@behnel.de>
Date: Wed, 03 Oct 2012 21:47:16 +0200
Local: Wed, Oct 3 2012 3:47 pm
Subject: Re: [cython-users] detecting Cython version?
Am 03.10.12 20:05, schrieb Chris Barker:

> On Wed, Oct 3, 2012 at 10:55 AM, Robert Bradshaw <rober...@gmail.com> wrote:
>> On Wed, Oct 3, 2012 at 10:50 AM, Chris Barker <chris.bar...@noaa.gov> wrote:

>>> I find this all a bit confusing -- but maybe __version__ should be
>>> defined in Cython.Shadow.

>> Yeah, this is a bit confusing. +1 to adding it to Shadow (which could
>> be resolved at compile time as well).

Yes, I think it makes sense to have it in Shadow.

>> Also, you could try importing Cython instead of cython.

> yup -- that gets me the version, but shy does the cython.py wierd
> import thing exist anyway? Presumably there is a reason.

It's two things: the main program entry point and the "magic" namespace
that holds all the nice Cython language goodies (that's the part in
Shadow.py).

> Also, I think it's a bad a idea to have a package module with an
> upper-case name (particularly one mirroring a lower-case name) --
> there are case-insensitive file systems out there (what does this do
> on Windows?)

Nothing special on Windows here. The package name is "Cython" and the
name of the module file is "cython.py". Module names are always case
sensitive in Python. The "Cython" package is an entirely different thing
than the "cython" namespace module.

Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Bradshaw  
View profile  
 More options Oct 3 2012, 4:11 pm
From: Robert Bradshaw <rober...@gmail.com>
Date: Wed, 3 Oct 2012 13:10:45 -0700
Local: Wed, Oct 3 2012 4:10 pm
Subject: Re: [cython-users] detecting Cython version?

On Wed, Oct 3, 2012 at 11:20 AM, Chris Barker <chris.bar...@noaa.gov> wrote:
> On Wed, Oct 3, 2012 at 11:13 AM, Robert Bradshaw <rober...@gmail.com> wrote:
>> With the exception of __version__, importing either one should have
>> the same effect.

>> https://github.com/cython/cython/blob/master/Cython/__init__.py

> so we really shold move __version__ to Cython.Shadow

I agree. Done.

- Robert


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »