|
Re: newbie: loading' example' example in python: msg#00115programming.swig
On Thu, 23 Jan 2003 17:55:17 -0800 Harry Mangalam <hjm@xxxxxxxxx> wrote: > OK - with the help of my betters (thanks to Diane Trout), I've been able > to get > the C module to load, but the solution is not like anything the recent > docs > indicate. > > You have to name the generated .so '_example.so' and in Python: > > >>>import _example > > No other combination of names, underscores, etc worked. If this is in > fact the > case, it might be worth correcting the docs for this. However, it seems > odd > that this convention is actually the intended one (...?) That is only if you want to import the shared lib directly. SWIG assumes that you will access the wrapper through the generated python code. You should see an example.py where you compiled the extention. This is what gets imported if you do an 'import example', and in example.py you will see 'import _example'. Nic -- Nicholas Henke Linux Cluster Systems Programmer Liniac Project - Univ. of Pennsylvania _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: linking problems: 00115, Good Times |
|---|---|
| Next by Date: | Re: newbie: loading' example' example in python: 00115, Harry Mangalam |
| Previous by Thread: | Re: newbie: loading' example' example in pythoni: 00115, Harry Mangalam |
| Next by Thread: | Re: newbie: loading' example' example in python: 00115, Harry Mangalam |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |