Ask Your Question
1

How make idle the main program for python 2.7 on Fedora 19

asked 2013-09-07 01:21:44 -0500

Michael Vayvala gravatar image

updated 2013-09-07 21:03:23 -0500

FranciscoD_ gravatar image

Before I have install idle using Terminals command:

# yum install python-tools

When I'm writing idle in terminal, it's open idle. But when i want to open python file and press "other application" there is no idle in there. So how can I make idle the main program for python 2.7 on Fedora 19.

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2013-09-07 06:18:29 -0500

marcindulak gravatar image

I don't know the reason why Idle does not show up in "Open With-> Other Application" list, but you can associate python Mime type with Idle manually. In order to do so, create an idle.desktop file (python-tools does not provide one yet, and it should), as standard user (just copy and paste the whole block, and hit Enter):

cat > ~/.local/share/applications/idle.desktop << "EOF"
[Desktop Entry]
Version=1.0
Name=idle
GenericName=idle
Categories=Development;IDE;
Exec=idle
Type=Application
MimeType=text/x-python;
EOF

and update the Mime cache:

echo "text/x-python=idle.desktop;" >> ~/.local/share/applications/mimeinfo.cache

You may have already a setting for text/x-python in this file, in this case you may want to prepend the list with idle.desktop. You can also set this globally (as root) by making modifications under /usr/share/applications, but remember that user settings (~/.local) take precedence. The procedure described above is identical on Ubuntu http://ubuntuforums.org/showthread.php?t=1801149

edit flag offensive delete link more

Comments

Use gtk-launch idle in order to test launching of the application. See man gtk-launch

marcindulak gravatar imagemarcindulak ( 2013-12-12 03:39:44 -0500 )edit

Question Tools

Stats

Asked: 2013-09-07 01:21:44 -0500

Seen: 2,557 times

Last updated: Sep 07 '13