Python Imaging Library and textmate

Philip Semanchuk philip at semanchuk.com
Fri Jan 9 12:53:35 EST 2009


On Jan 9, 2009, at 12:19 PM, bilgin arslan wrote:

> Hi Philip,
> I tried to install PIL with the directions given and it seemed to be  
> ok.
>
> When I tried it with IDLE, import Image did not give an error and as
> far as I checked it seemed to be working.
> However, importing Image module in TextMate gives an error, saying
> that the module cannot be found for some strange reason.


I am still unclear on how you're importing Python modules via  
TextMate. It's a text editor, so even though I've used it for a couple  
of years, it's not at all obvious to me how you'd use it to import a  
Python module. I think I can help you, but to do so I need you to tell  
me *exactly* what menu items you're clicking on, e.g. "Bundle/Python/ 
Run Script..."

> The code simply contains the line *"import Image"* in both cases

 From what I can see in the PIL documentation, this wouldn't work.  
You'd need either this:
    from PIL import Image
or this:
    import PIL.Image

What am I missing?





> On Jan 9, 2009, at 2:49 AM, bilgin arslan wrote:
>
>> * Hello,
> *>* I am a beginner in python and I am trying to create image files  
> that
> *>* contain
> *>* lines from a text file.
> *>* I am trying to do this with PIL, which seems like a suitable  
> tool. I
> *>* have a
> *>* copy of TextMate(1.5.8) and I run Macosx 10.5.6
> *>*
> *>* The problem is, even though I installed PIL correctly (I get no
> *>* errors from
> *>* "import Image" in IDLE or in terminal), I can't get TextMate to
> *>* import the
> *>* module.
> *>* I keep getting "ImportError: No module named Image" error.
> *>* I tried reloading TextMate's bundles but that did not work either.
> *
> I use TextMate but I don't know what you mean when you say you can't
> get TM to import a module. Can you give a little more context?
>
>
>> * There was a similar thread in this list with textmate but I can't
> *>* understand
> *>* how that issue was solved in the end.
> *
> link?
>
>
>
> bye
> Philip
> --
> http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list