From: R. B. <ro...@pa...> - 2006-09-25 21:17:34
|
Works for me. Although in pdb, I have found myself writing a wrapper script as you seem to indicate, with recent versions of pydb, normally you don't need to. (Well, at least I don't and *I'm* normal.) pydb tries to install a symlink in your a binary directory to the python script. # ls -l /usr/local/bin/pydb lrwxrwxrwx 1 root root 45 2006-09-16 20:37 /usr/local/bin/pydb -> /usr/lib/python2.4/site-packages/pydb/pydb.py That said, if you want to create a shell script, sure, you still can. (Or at least I can ;-) Here's what I just tried on a SUSE GNU linux box as seen above seems to want to put packages in /usr/lib/python2.4/site-packages: #!/bin/sh export PYTHONPATH="/usr/lib/python2.4/site-packages/:$PYTHONPATH:" /usr/lib/python2.4/site-packages/pydb/pydb.py $* When I tried running the above script passing a little python program when I got the pydb prompt. Just to make sure it's what I thought it should be I ran this: (Pydb) import sys (Pydb) sys.version '2.4.2 (#1, May 2 2006, 08:13:46) \n[GCC 4.1.0 (SUSE Linux)]' (Pydb) I've also installed Python 2.5 and that seems to want to put packages in /usr/local/lib/python2.5/site-packages instead. So changing this to the 2.5 location, as a test verified there was nothing magical: #!/bin/sh export PYTHONPATH="/usr/local/lib/python2.5/site-packages/:$PYTHONPATH" /usr/local/lib/python2.5/site-packages/pydb/pydb.py $* Running the same program stopped as before; upon checking I was indeed getting something different: (Pydb) import sys (Pydb) sys.version '2.5 (r25:51908, Sep 19 2006, 21:51:15) \n[GCC 4.1.0 (SUSE Linux)]' (Pydb) To get working from GNU/Emacs. First make sure you can do the above. :-) Then it is just a matter of entering that location when prompted. For example, I called the script /tmp/mypdb.sh So when I run meta-x pydb, and it shows: Run pydb (like this): pydb I just change "pydb" to "/tmp/mpydb.sh /tmp/my-python-script" The next time I issue M-x pydb though, I get: Run pydb (like this): /tmp/mpydb /tmp/my-python-script which seems to make sense. iglen writes: > Hi > > I posted the same question on the discussion group, but then I have found > this mailing list. Sorry if someone stumble across my duplicate question, > > Previously I have been using pdb and typically write pdb shell script > somewhere in the path which would setup PYTHONPATH and invoke python2.4 > pdb.py somefile.py. > > It does not look like there is a simular way to do it with Pydb. I have > tried creating Pydb which launch python2.4 pydb.py somefile.py but it does > not appear to work. > > Please help. > > -Len > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Bashdb-pydb mailing list > Bas...@li... > https://lists.sourceforge.net/lists/listinfo/bashdb-pydb > |