You are not logged in.

#1 2011-02-21 20:19:13

MystKid
Member
Registered: 2011-01-24
Posts: 55

medit executing python2 scripts

hello guys i have recently installed medit-full from the Aur since i saw it had an option to execute python scripts so i could test them without running them from the terminal.  i am coding in python2 and for arch the "python" command will launch python3 by default. that was causing me issues in executing python2 scripts in medit.
after a couple of hours i found a working way to get medit to execute python2 instead of python3. this is what i did:

mkdir -p /home/USERNAME/.bin 

then created a symlink:

ln -s /usr/bin/python2 /home/USERNAME/.bin/python

now that you have created the symlink you can execute medit this way from the terminal

PATH="/home/USERNAME/.bin:$PATH" medit

i use openbox so i added a menu entry like this:

<item label="Medit Py2">
                <action name="Execute">
                    <execute>
                        /bin/sh -c 'PATH=&quot;/home/USERNAME/.bin:$PATH&quot; medit'
                    </execute>
                </action>
            </item>

Last edited by MystKid (2011-02-21 20:23:13)

Offline

Board footer

Powered by FluxBB