Writeing new files

Maan Hamze mmhamze at pleiades.net
Fri Aug 31 21:08:54 EDT 2001


"eber kain" <eberkain at earthlink.net> wrote in message
news:b5f84cf8.0108311646.1ddf1f98 at posting.google.com...
> you lost me, whats dir() do, and how do i use it.
>
>>> import os
>>> dir(os)
['F_OK', 'O_APPEND', 'O_BINARY', 'O_CREAT', 'O_EXCL', 'O_RDONLY', 'O_RDWR',
'O_TEXT', 'O_TRUNC', 'O_WRONLY', 'P_DETACH', 'P_NOWAIT', 'P_NOWAITO',
'P_OVERLAY', 'P_WAIT', 'R_OK', 'TMP_MAX', 'UserDict', 'W_OK', 'X_OK',
'_Environ', '__all__', '__builtins__', '__doc__', '__file__', '__name__',
'_execvpe', '_exists', '_exit', '_get_exports_list', '_notfound', 'abort',
'access', 'altsep', 'chdir', 'chmod', 'close', 'curdir', 'defpath', 'dup',
'dup2', 'environ', 'error', 'execl', 'execle', 'execlp', 'execlpe', 'execv',
'execve', 'execvp', 'execvpe', 'fdopen', 'fstat', 'getcwd', 'getenv',
'getpid', 'i', 'isatty', 'linesep', 'listdir', 'lseek', 'lstat', 'makedirs',
'mkdir', 'name', 'open', 'pardir', 'path', 'pathsep', 'pipe', 'popen',
'popen2', 'popen3', 'popen4', 'putenv', 'read', 'remove', 'removedirs',
'rename', 'renames', 'rmdir', 'sep', 'spawnl', 'spawnle', 'spawnv',
'spawnve', 'startfile', 'stat', 'strerror', 'sys', 'system', 'times',
'umask', 'unlink', 'utime', 'write']
>>>
That is what dir() do :)  A 'directory' of a module.

> I should have said earlier, im a C++ person, only started looking into
> Python a few weeks ago.
>
> If i had a choice of something else i wouldnt use python, but its the
> only medium to get the models out of blender.
>
What do you mean by choice?  Python is as good as it gets and here you have
a program that allows you to script.  You certainly are not going to script
in C++ or C.  What else do you exactly have in mind.
I use scripting - let it be VB for Applications in Excel or scripting for an
animation in the old vistapro program.  Just for the fun of it.  I use
Python for scripting in the povray modeller Breeze Designer.  I have never
used Blend.  But I get a sense of what is happening.  You should FEEL LUCKY
you can use a scripting engine (ANY scripting engine) with a modelling
program.  and here you have Python.
>
> I really have a hard time understanding how the classes in python
> function, and the for statement gives me problems. To be honest i dont
> care for the launguage, if I had looked at it before i started C it
> probably wouldnt look so odd, not even sure if it was around when i
> started in programming.
>
There are countless documents on www.python.org
Please check them out and you are going to change your rmind.  This is a
NEAT clear ELEGANT language.  Maybe you are bothered by the indentation.
You get used to it.  It imposes clarity and maintability.
Maan





More information about the Python-list mailing list