[Tutor] Script Building

David Hutto dwightdhutto at yahoo.com
Wed Mar 3 17:45:41 CET 2010


I'm new to Python, so I thought as a first project I'd create a basic script building wizard to help with my understanding of the flow, and for basic practice. The following is a outline of what I would initially like to accomplish. 

I've begun creating small functions, and very lightly worded pseudocode, but before I go further I'd like to make sure I'm building my script insertions correctly, and see if any one has any suggestions on how to refine the process, or what I might be able to use as additives to sub-levels of my insertions.

Here is a basic outline of the insertions from either raw_input or, drop down menu:

append paths
import modules
from modules import*
import module as x
global variables
docs
version
class
class with docs
def
instance
comment to line x


This is the initial step-by step process which the script will create:

1)Ask for existing or new project

Would you like to open an existing project or create a new one?

1a)
if create new go to step 2

1b)
if open existing project go to step 3a

***************************************

2)Create new project or file

Would you like to created a new project, or a single file? 

2a)
if create single file go to step 4

2b)
if create a project go to step 5

***************************************


3)Select the folder of your existing project

3a)
open project, which would be a folder, not a single file, go to step 6a

3b)
open single existing file go to step 6b

***************************************

4)Setup for single file creation

4a)
What would you like to name your new file?

raw_input

4b) would you like to use the script wizard to
setup your new file?

if yes go to script wizard(it's a choose your own adventure book)

if no
go to step 7a
**************************************

5)Set up for project creation

5a) Two fields to fill in

What would you like to name your new project?
raw_input

You must create a new file to go in your project folder.
What would you like to call your first file?
raw_input

got to step 7b
**************************************
**************************************
6)open project window, or single file, depending
on which of step 3 user is coming from, then
begins 'recording' the current sessions input, until save
or exit

projects will have multiple files, so history
for each file open within the project

6a)
Open window with selection sidepanel of all files in project folder

6b)
Window with single file, and now side panel



*****************************************
****************************************

7) New file has been created, or new project has been created with blank file

7a) open new window with file, but no open project folder

7b) open edit window with blank file and project folder contents, which
at this point consist of the single blank named file
******************************************
*******************************************


sequence of events above have terminated at the editor window with
open file


******************************************
******************************************


The above excludes insertions, saving, creating a file or project into the main project window, which will probably call on some of the code from above.

If anyone is familiar with it, I'm thinking of using the blender game engine(just to combine the learning process of both), but the overall code is python, so I'm pretty sure I'm posting this to the right list.

Any suggestions, or critiques, are welcome.


Thanks,
David



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100303/a8224e4c/attachment.html>


More information about the Tutor mailing list