|
Re: Is this a bug or am I doing it wrong?: msg#00020python.pyrex
Gary Bishop <gb@xxxxxxxxxx>: > I'm building a module "matrix" to be included in a package "my" using > Pyrex. > > Is there a way to tell Pyrex that the module is going to reside inside > a package? Yes, there is, but it's currently undocumented (since I'm not at all sure that I want to make it the official way). The trick is that you name the .pyx file with the fully qualified name that it will eventually have in the package hierarchy, i.e. in your case, my.matrix.pyx (This will also be important if you ever want to cimport an extension type from another Pyrex module that lives in a different package, since the module doing the cimport needs to know the absolute path to the module being cimported from. If you need any help with that case, let me know.) This feature is very under-tested at the moment, so use it at your own risk. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@xxxxxxxxxxxxxxxxxxxxx +--------------------------------------+ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Team Pyrex Mission Statement: 00020, Lenard Lindstrom |
|---|---|
| Next by Date: | Re: Segfault when trying to set attribute of another class: 00020, Greg Ewing |
| Previous by Thread: | Is this a bug or am I doing it wrong?i: 00020, Gary Bishop |
| Next by Thread: | Re: Segfault when trying to set attribute of another class: 00020, Armin Bauer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |