![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
http://www.mediafire.com/?dyz55tmdmng
omplete version of my first useful Python script. The purpose of it is to generate javadoc comments (plus any ETSU CS department-specific comment blocks) and write them to a text file to then be pasted into the Java source file. Eventually, I hope to figure out how to have it insert the comments in the appropriate spot in a Java source file and auto-complete some of that information based on the file itself.
I really hated how time consuming it was to do those javadoc comment blocks, and I had originally planned on using Java to implement the functionality of the script, but I picked up that Python book and thought this would be a good exercise in the language. Oddly enough, the submission requirements for the projects in my Java class said the javadocs were required, but I kept getting bonus points for adding them.
Edit:
I keep getting an error message when I try to run a modified version of the script.
"SyntaxError: invalid syntax" on the line "methodcomment = "/**\n"
EditEdit:
Fixed.
omplete version of my first useful Python script. The purpose of it is to generate javadoc comments (plus any ETSU CS department-specific comment blocks) and write them to a text file to then be pasted into the Java source file. Eventually, I hope to figure out how to have it insert the comments in the appropriate spot in a Java source file and auto-complete some of that information based on the file itself.
I really hated how time consuming it was to do those javadoc comment blocks, and I had originally planned on using Java to implement the functionality of the script, but I picked up that Python book and thought this would be a good exercise in the language. Oddly enough, the submission requirements for the projects in my Java class said the javadocs were required, but I kept getting bonus points for adding them.
Edit:
I keep getting an error message when I try to run a modified version of the script.
"SyntaxError: invalid syntax" on the line "methodcomment = "/**\n"
#Function that builds the method javadocs comments
def methoddoc() :
methodname = raw_input('Method name: ')
methodpurpose = raw_input('Method purpose: ')
methoddate = raw_input('Creation date: ')
methodspecs = raw_input('Specifications, special algorithms, and assumptions: ')
numparams = int(raw_input('Number of parameters: ')
methodcomment = "/**\n"
methodcomment += "* Method Name: " + methodname + "
\n"
methodcomment += "* Method Purpose: " + methodpurpose + "
\n"
methodcomment += "*\n"
methodcomment += "*
\n"
methodcomment += "* Date created: " + methoddate + "
\n"
methodcomment += "* Date last modified: " + methoddate + "
\n"
methodcomment += "*\n"
methodcomment += "*
\n"
methodcomment += "* Notes on specifications, special algorithms, and assumptions
\n"
methodcomment += "* " + methodspecs + "\n"
methodcomment += "*
\n"
for i in range(1, numparams):
param = raw_input('Parameter')
methodcomment += "* @param" + param + "
\n"
returntype = raw_input('Returns (void if void): ')
methodcomment += "* " + returntype + "
\n"
methodcomment += "*\n"
methodcomment += "*\n"
methodcomment += "*/\n"
return methodcomment
EditEdit:
Fixed.