Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed the following Markdown-to-HTML converter by MacPorts.

py26-markdown @2.0 (python, textproc)
    Python implementation of Markdown

I run

py26-markdown 1.markdown

I get

zsh: command not found: py26-markdown

How can you use py26-markdown?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

py26-markdown is not the program's name, it's the name of the package. The program is markdown.py and it comes from that package. It's a module you use by importing it into Python, or by running it from the command line. Using it from the command-line is explained in the user's guide. It looks like this:

<python> markdown.py input_file.txt > output_file.html

You may need to explicitly call it from Python depending on whether it is executable by default or not.

To find out where the actual script lives you should ask port:

port contents py26-markdown | grep markdown.py

markdown.py doesn't necessarily need to be on your PATH, but it will be a lot easier to use it lives in your PYTHONPATH, which should include /opt/local/lib/python2.6/site-packages.

share|improve this answer
    
Thank you for your answer! –  Masi Jul 24 '09 at 11:36

It's possible that your $PATH variable wasn't set properly, or was only set for bash. Make sure it contains /opt/local/bin:/opt/local/sbin and that $MANPATH contains /opt/local/share/man.

Edit: Actually, wait, is py26-markdown even supposed to be a command? This page suggests it may be something you use from within Python.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.