Re: [Tutor] Making a script part of the terminal
Hello Michael, first you have to give your script an executable bit. Just type chmod +x your_script.py Furhtermore, your script has to be in a directory that is also part of your search path. Type in echo $PATH to see how your path is set. You can either link or copy your script to an approprate location. Regards, Ralf michael scott hat am 20. Mai 2011 um 19:43 geschrieben: > > Okay, my title might be undescriptive, let me try to explain it better. I want > to take a script I've written and make it usable by typing its name in the > terminal. Perfect example is the python interpreter. You just type in the word > python to the terminal and then the interpreter runs. I know other programs > can do this as well (like mozilla or nautilus or rhythmbox). So how do I make > my scripts executable from the terminal? > > > What is it about you... that intrigues me so? >___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] system()? popen2()? How to execute a command & save its output?
Hi, I've once written a script to sync my website with a local directory. I guess that you will find anything you need in the FTPHelper class. Have a look at: http://home.arcor.de/ralf_schoenian/websync/index.html At the bottom of the page you can view and download the script. Any questions are welcome. Ralf James Hartley hat am 30. September 2010 um 06:29 geschrieben: > I'm needing to transfer the following shell construct to Python, plus save the > output of execution: > > FTP_SITE='ftp.somesite.com [http://ftp.somesite.com] ' > ftp -a $FTP_SITE < binary > prompt off > cd /some_dir > dir > bye > EOF > > Here, the FTP client accepts commands from STDIN, so all commands are saved in > a temporary file which is redirected to the client application. > > I also need to save whatever output is generated. How can this be done in > Python? > > Thanks. > > Jim > ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Documenting a Module
Hi Michael, I can recommend epydoc. You can find it here: http://epydoc.sourceforge.net/ It's a nice tool and you should have no problems with the installation. Ralf Michael Powe hat am 13. September 2010 um 11:54 geschrieben: > Hello, > > Are there any tools for documenting a module other than Sphinx? > > Apparently, I need a full-blown dev box with Visual Studio installed > to get Sphinx up, due to the dependency on Jinja, which comes > source-only and requires VC. > > I wrote a module, I'd like to produce a decent document of its > functionality from the comments and doc strings; and I already wasted > a considerable part of my Sunday afternoon trying to get along with > Sphinx. I'm not talking about a huge Python project, nor am I likely > to need that type of documentation tool in the near future. > > Thanks. > > mp > > -- > Michael Powe mich...@trollope.org Naugatuck CT > USA > > > Is it time for your medication or mine?___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor