wuxfheb / pysmell

Automatically exported from code.google.com/p/pysmell
0 stars 0 forks source link

Bundle pysmell with TextMate bundle #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
TextMate users should not have to install pysmell in the system python - bundle 
pysmell inside 
PySmell.tmbundle.

Original issue reported on code.google.com by orestis on 2 Nov 2008 at 9:57

GoogleCodeExporter commented 8 years ago
Sounds like a good plan to me. I'm having trouble getting it working in 
TextMate since the paths are different. 
This is despite setting my PATH in tm.

Maybe you can install in in TM_BUNDLE_SUPPORT/lib?

Original comment by matt.p.f...@gmail.com on 4 Nov 2008 at 10:23

GoogleCodeExporter commented 8 years ago
That's the plan; I'm afraid it has to wait for v0.8 when I'm going to introduce 
a build tool to do it for me.

BTW, as a workaround, type:

python -c "import sys;print sys.path"

and hit ^R - it will send the output in your buffer, and you can see which 
python is TextMate using.

Original comment by orestis on 4 Nov 2008 at 10:31

GoogleCodeExporter commented 8 years ago
Thanks for the speedy reply.

I tried something similar, and what surprised me was that I get different 
results depending on where I run it.

I'm using EPD, instead of the normal apple install, which is probably the cause 
of the problem.

If I run it from within TM, i get what I expect. If I make a bundle command, 
and run python -c '…' I also get 
what I expect. 

If I use /usr/bin/env python, from within a bundle command, I find that apple's 
python interpreter is running, 
and the path is totally wrong.

So, I've worked around it by wrapping the bundle commands in python -c "…", 
and now it work.

Original comment by matt.p.f...@gmail.com on 5 Nov 2008 at 8:21

GoogleCodeExporter commented 8 years ago
Matt, is there any chance that you can provide the bundle definitions... I am 
still
new to textmate, epd, and mac os x... 

Have you seen the ability to run, set breakpoints, etc... at:
http://ipython.scipy.org/moin/Cookbook/UsingIPythonWithTextMate

Original comment by I3enha...@gmail.com on 10 Nov 2008 at 7:57

GoogleCodeExporter commented 8 years ago
I just forked pysmall in github and added my bundle defs in. The two files are 
here:
http://github.com/mattfoster/pysmell/tree/matt/PySmell.tmbundle/Commands
I'm not sure this is ideal, but it works for me.

Basically, I have 
python -c "from pysmell import textmate;textmate.main()
for complete, and
python -c "import os; projectDir = os.environ.get('TM_PROJECT_DIRECTORY') or 
os.environ.get('TM_DIRECTORY');from pysmell import 
textmate;textmate.tags(projectDir)"
for Tags.

That link looks awesome! I'm thinking a dedicated IPython/numpy bundle might be 
needed!

Original comment by matt.p.f...@gmail.com on 10 Nov 2008 at 9:29

GoogleCodeExporter commented 8 years ago
Just a quick and shameless plug.
I made a quick bundle based on the commands in the link above.
You can find it at: http://github.com/mattfoster/ipython-tmbundle/tree/master
Feel free to fork and contribute! (sorry for spamming this thread, I'll go now)

Original comment by matt.p.f...@gmail.com on 10 Nov 2008 at 10:15

GoogleCodeExporter commented 8 years ago
Thanks for the work! I'll have to run this again by the TM mailing lists to see 
what 
is the preferred way of doing things like that.

The best solution would be to just bundle PySmell and to not depend on a 
specific 
python running. I think it would make things faster as well.

Original comment by orestis on 10 Nov 2008 at 10:20

GoogleCodeExporter commented 8 years ago
Matt, I agree with the ipython/numpy/scipy comment.  I am interested and 
willing, but
not yet able to contribute.  I don't expect my ramp-up time should be that bad 
once I
can start working off of examples.

Original comment by I3enha...@gmail.com on 11 Nov 2008 at 1:35

GoogleCodeExporter commented 8 years ago
orestis: I agree, I just wanted to play with pysmell. 

l3enhamin: Cool. I'm sure it won't be. I've only been using python for a bit, 
and it seems to be very writable. The 
same is true of TextMate bundle. I've made a google group: 
http://groups.google.com/group/ipython-tmbundle  Please join the group so we 
can probably discuss this there!

Original comment by matt.p.f...@gmail.com on 11 Nov 2008 at 8:22