Problem with bpy.ops.mesh.select_all in edit mode

Hello:

I want to select all vertices in the editing mesh. When I try to do it in the console I get this error message. Those strings are not documented in the API (or I could not find them). Which one should I use to select everything?


bpy.ops.mesh.select_all('SELECT')
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/Applications/blender.app/Contents/MacOS/2.65/scripts/modules/bpy/ops.py", line 186, in __call__
    ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
TypeError: Calling operator "bpy.ops.mesh.select_all" error, expected a string enum in ('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS', 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA', 'EXEC_SCREEN')

Regards.

Try this:

bpy.ops.mesh.select_all(action = 'SELECT')

and for deselecting:

bpy.ops.mesh.select_all(action = 'DESELECT')

[QUOTE=BartekSkorupa;2267369]Try this:

bpy.ops.mesh.select_all(action = 'SELECT')

Thanks, that was a silly mistake. What about this one, why a simple “print” is syntax error?

PYTHON INTERACTIVE CONSOLE 3.3.0 (default, Nov 18 2012, 18:00:38)  [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))]

Command History:     Up/Down Arrow
Cursor:              Left/Right Home/End
Remove:              Backspace/Delete
Execute:             Enter
Autocomplete:        Ctrl+Space
Ctrl +/-  Wheel:     Zoom
Builtin Modules:     bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
Convenience Imports: from mathutils import *; from math import *
Convenience Variables: C = bpy.context, D = bpy.data


>>> print 'hola'
  File "<blender_console>", line 1
    print 'hola'
               ^
SyntaxError: invalid syntax


>>> 

print(‘hola’)

Ok, this is a very strict python. Thanks again!

It’s Python 3 since Blender 2.5X.