|
|
|
|||||
|
Python including slices
Hello,
I'm new to ice and python so probably I'm just overlooking something trivial. But I include our own slice files into my python program: Ice.loadSlice('Session.ice') Ice.loadSlice('SecurityItmes.ice') But one of our own slice files has a include: #include <Ice/Plugin.ice> So I added: Ice.loadSlice('-I c:/Ice-3.0.1/slice/Ice Plugin.ice') But now following error occurs: icecpp: can't open `Plugin.ice' for reading Traceback (most recent call last): File "Client.py", line 13, in ? Ice.loadSlice('-I c:/Ice-3.0.1/slice/Ice Plugin.ice') RuntimeError: Slice preprocessing failed for `-I c:/Ice-3.0.1/slice/Ice Plugin.i ce' I also tried with: Ice.loadSlice('-I c:/Ice-3.0.1/slice Plugin.ice') Like I told I'm new to ice and new to python so probably I'm missing something trivial...
__________________
Geert Theys Project Manager PearlDoc |
|
|||||
|
Hello,
So I have: in my local slice dir: someslice1.ice someslice2.ice someslice3.ice someslice1.ice has as includes: #include <someslice2.ice> #include <someslice3.ice> someslice2.ice has as includes: #include <Ice/Plugin.ice> #include <someslice3.ice> My python script contains: Ice.loadSlice('-I c:/Ice-3.0.1/slice -I C:/localslicepath someslice1.ice') Ice.loadSlice('-I c:/Ice-3.0.1/slice -I C:/localslicepath someslice2.ice') Ice.loadSlice('-I c:/Ice-3.0.1/slice -I C:/localslicepath someslice3.ice') Following error occurs: Traceback (most recent call last): File "Client.py", line 13, in ? Ice.loadSlice('-I c:/Ice-3.0.1/slice -I C:/localslicepath someslice1.ice') File "someslice1.ice'", line 3, in ? ImportError: No module named someslice2_ice Why is there a importerror?
__________________
Geert Theys Project Manager PearlDoc |
|
||||||
|
Add -I., so that the current directory is searched.
You can also simply add --all, so that all dependencies are included. Then you only need one line: Ice.loadSlice('--all -I. -Ic:/Ice-3.0.1/slice -IC:/localslicepath someslice1.ice') |
|
||||||
|
Quote:
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Python | BiT | Help Center | 1 | 09-19-2006 06:21 PM |
| pb with python example | arnaud | Help Center | 13 | 03-06-2006 03:36 AM |
| Pb with installation directories including space in name | vermorel | Bug Reports | 2 | 12-08-2005 01:18 PM |
| Including slice files | mcrystal | Help Center | 1 | 08-05-2005 01:00 AM |
| Ice for Python | davidcr1983 | Help Center | 3 | 07-27-2005 01:01 PM |