3D Studio Max 명령어 단축키

Snaps Action Table :
Snap To Edge/Segment Toggle : Alt+F10
Snap To Endpoint Toggle : Alt+F8
Snap To Face Toggle : Alt+F11
Snap To Grid Points Toggle : Alt+F5
Snap To Midpoint Toggle : Alt+F9
Snap To Pivot Toggle : Alt+F6
Snap To Vertex Toggle : Alt+F7

Main UI :

Adaptive Degradation Toggle : O
Align : Alt+A
Angle Snap Toggle : A
Arc Rotate View Mode : Ctrl+R
Auto Key Mode Toggle : N
Background Lock Toggle : Alt+Ctrl+B
Backup Time One Unit : ,
Bottom View : B
Camera View : C
Clone : Ctrl+V
Cycle Active Snap Type : Alt+S
Cycle Selection Method : Ctrl+F
Cycle Snap Hit : Alt+Shift+S
Default Lighting Toggle : Ctrl+L
Delete Objects : .
Disable Viewport : D
Display as See-Through Toggle : Alt+X
Environment Dialog Toggle : 8
Expert Mode Toggle : Ctrl+X
Fetch : Alt+Ctrl+F
Forward Time One Unit : .
Front View : F
Go to End Frame : End
Go to Start Frame : Home
Hide Cameras Toggle : Shift+C
Hide Geometry Toggle : Shift+G
Hide Grids Toggle : G
Hide Helpers Toggle : Shift+H
Hide Lights Toggle : Shift+L
Hide Particle Systems Toggle : Shift+P
Hide Shapes Toggle : Shift+S
Hide Space Warps Toggle : Shift+W
Hold : Alt+Ctrl+H
Isometric User View : U
Left View : L
Lock User Interface Toggle : Alt+0
Material Editor Toggle : M
Maximize Viewport Toggle : Alt+W
MAXScript Listener : F11
New Scene : Ctrl+N
Normal Align : Alt+N
Open File : Ctrl+O
Pan View : Ctrl+P
Pan Viewport : I
Percent Snap Toggle : Shift+Ctrl+P
Perspective User View : P
Place Highlight : Ctrl+H
Play Animation : /
Quick Align : Shift+A
Quick Render : Shift+Q
Redo Scene Operation : Ctrl+Y
Redo Viewport Operation : Shift+Y
Redraw All Views : `
Render Last : F9
Render Scene Dialog Toggle : F10
Restrict Plane Cycle : F8
Restrict to X : F5
Restrict to Y : F6
Restrict to Z : F7
Save File : Ctrl+S
Scale Cycle : Ctrl+E
Select All : Ctrl+A
Select Ancestor : PageUp
Select and Move : W
Select and Rotate : E
Select By Name : H
Select Child : PageDown
Select Children : Ctrl+PageDown
Select Invert : Ctrl+I
Select None : Ctrl+D
Selection Lock Toggle : Space
Set Key Mode : '
Set Keys : K
Shade Selected Faces Toggle : F2
Show Floating Dialogs : Ctrl+`
Show Main Toolbar Toggle : Alt+6
Show Safeframes Toggle : Shift+F
Show Selection Bracket Toggle : J
Snap To Frozen Objects Toggle : Alt+F2
Snaps Toggle : S
Snaps Use Axis Constraints Toggle : Alt+D, Alt+F3
Sound Toggle : \
Spacing Tool : Shift+I
Spot/Directional Light View : Shift+4
Sub-object Level Cycle : Insert
Sub-object Selection Toggle : Ctrl+B
Top View : T
Transform Gizmo Size Down : -
Transform Gizmo Size Up : =
Transform Gizmo Toggle : X
Transform Type-In Dialog Toggle : F12
Undo Scene Operation : Ctrl+Z
Undo Viewport Operation : Shift+Z
Update Background Image : Alt+Shift+Ctrl+B
View Edged Faces Toggle : F4
Viewport Background : Alt+B
Virtual Viewport Pan Down : NumPad 2
Virtual Viewport Pan Left : NumPad 4
Virtual Viewport Pan Right : NumPad 6
Virtual Viewport Pan Up : NumPad 8
Virtual Viewport Toggle : NumPad /
Virtual Viewport Zoom In : NumPad +
Virtual Viewport Zoom Out : NumPad -
Wireframe / Smooth+Highlights Toggle : F3
Zoom Extents All Selected : Z
Zoom Extents All : Shift+Ctrl+Z
Zoom Extents : Alt+Ctrl+Z
Zoom In 2X : Alt+Shift+Ctrl+Z
Zoom Mode : Alt+Z
Zoom Out 2X : Alt+Shift+Z
Zoom Region Mode : Ctrl+W
Zoom Viewport In : [, Ctrl+=
Zoom Viewport Out : ], Ctrl+-

Track View

Add Keys : A
Apply Ease Curve : Ctrl+E
Apply Multiplier Curve : Ctrl+M
Assign Controller : C
Copy Controller : Ctrl+C
Expand Object Toggle : O
Expand Track Toggle : Enter, T
Filters : Q
Lock Selection : Space
Lock Tangents Toggle : L
Make Controller Unique : U
Move Highlight Down : Down Arrow
Move Highlight Up : Up Arrow
Move Keys : M
Nudge Keys Left : Left Arrow
Nudge Keys Right : Right Arrow
Pan : P
Paste Controller : Ctrl+V
Scroll Down : Ctrl+Down Arrow
Scroll Up : Ctrl+Up Arrow
Snap Frames : S
Zoom : Z
Zoom Hrizontal Extents Keys : Alt+X
<ul=http://www.all3dmodel.com>
3d models

Posted by Parametric Culture

Built-in Functions in Python


The Python interpreter has a number of functions built into it that are always available. They are listed here in alphabetical order.

Built-in Functions
abs()divmod()input()open()staticmethod()
all()enumerate()int()ord()str()
any()eval()isinstance()pow()sum()
basestring()execfile()issubclass()print()super()
bin()file()iter()property()tuple()
bool()filter()len()range()type()
bytearray()float()list()raw_input()unichr()
callable()format()locals()reduce()unicode()
chr()frozenset()long()reload()vars()
classmethod()getattr()map()repr()xrange()
cmp()globals()max()reversed()zip()
compile()hasattr()memoryview()round()__import__()
complex()hash()min()set()
delattr()help()next()setattr()
dict()hex()object()slice()
dir()id()oct()sorted()

In addition, there are other four built-in functions that are no longer considered essential: apply()buffer()coerce(), and intern(). They are documented in the Non-essential Built-in Functions section.

abs(x)

Return the absolute value of a number. The argument may be a plain or long integer or a floating point number. If the argument is a complex number, its magnitude is returned.

출처

https://docs.python.org/2/library/functions.html

Posted by Parametric Culture
Loop Mechanisms in Python

메카니즘 설명

x = int(raw_input('Enter an integer: ')) # asks me to enter a value 
                    # for x that I want to find the cube root of
for ans in range(0, abs(x)+1): # tests answers from x = 0 to x ...
                    # Certainly the cube root of x can't be 
                    # greater than x.
    if ans**3 == abs(x): # compares ans**3 with x
        break # if we have the answer, break out of the loop
if ans**3 != abs(x): # if we run past the end of the range, we end
                # up here, so x is not a perfect cube, and we're
                # done.
     print(str(x) + ' is not a perfect cube')
else: # If we don't run out of range, and we have the answer, we
# end up here.
     if x < 0: # If we began with a negative integer, we will have a 
            # negative root. Note that we used abs(x) in the
            # above code to account for this possibility.
         ans = - ans
     print('Cube root of ' + str(x) + ' is ' + str(ans))

심플예제_1

num = 10
while True:
    if num < 7:
        print 'Breaking out of loop'
        break
    print num
    num -= 1
print 'Outside of loop'


Result

10, ,9, 8, 7, "Breaking out of loop", "Outside of loop"


심플예제_2

num = 2
while num < 11:
    print num
    num += 2
print "Goodbye!"
num = 2
while num <= 10:
    print num
    num += 2
print "Goodbye!"
num = 0
while True:
    num += 2
    print num
    if num >= 10:
        print "Goodbye!" 
        break
num = 1
while num <= 10:
    if num % 2 == 0:
        print num
    num += 1
print "Goodbye!"


심플예제_3

print "Hello!"
num = 10
while num > 0:
    print num
    num -= 2
num = 11
print "Hello!"
while num > 1:
    num -= 1
    if num %2 == 0:
        print num


심플예제_4

total = 0

current = 1

while current <= end:

    total += current

    current += 1


print total

Posted by Parametric Culture

More Syntax, Keywords, Functions, Variable Scope


관련자료 다운로드


2_syntax_keyword_vars_scope.pdf


출처

https://courses.edx.org


List of Python Keywords

https://docs.python.org/release/2.3.5/ref/keywords.html

'Parametric Design > 21. Python 툴팁' 카테고리의 다른 글

Built-in Functions in Python  (0) 2015.06.14
Loop Mechanisms in Python  (0) 2015.06.13
Operator precedence  (0) 2015.06.13
Capitalization, Indentation, String Splicing  (0) 2015.06.13
[기초] Python in operator와 Advance S  (0) 2015.06.13
Posted by Parametric Culture

Operator precedence

The following table summarizes the operator precedences in Python, from lowest precedence (least binding) to highest precedence (most binding). Operators in the same box have the same precedence. Unless the syntax is explicitly given, operators are binary. Operators in the same box group left to right (except for comparisons, including tests, which all have the same precedence and chain from left to right — see section Comparisons — and exponentiation, which groups from right to left).

OperatorDescription
lambdaLambda expression
if – elseConditional expression
orBoolean OR
andBoolean AND
not xBoolean NOT
innot inisis not<<=>>=<>!===Comparisons, including membership tests and identity tests
|Bitwise OR
^Bitwise XOR
&Bitwise AND
<<>>Shifts
+-Addition and subtraction
*///%Multiplication, division, remainder [8]
+x-x~xPositive, negative, bitwise NOT
**Exponentiation [9]
x[index]x[index:index]x(arguments...)x.attributeSubscription, slicing, call, attribute reference
(expressions...)[expressions...]{key: value...}`expressions...`Binding or tuple display, list display, dictionary display, string conversion


출처

https://docs.python.org/2/reference/expressions.html#operator-precedence

Posted by Parametric Culture

Capitalization, Indentation, String Splicing


Pyhton 툴팁 자료 다운로드


1_caps_indent_splicing.pdf


출처

https://courses.edx.org

Posted by Parametric Culture

The Python 'in' Operator


The operators in and not in test for collection membership (a 'collection' refers to a string, list, tuple or dictionary - don't worry, we will cover lists, tuples and dictionaries soon!). The expression

element in coll

evaluates to True if element is a member of the collection coll, and False otherwise.

The expression

element not in coll

evaluates to True if element is not a member of the collection coll, and False otherwise.

Note this returns the negation of element in coll - that is, the expression element not in coll is equivalent to the expression not (element in coll).


Advanced String Slicing


You've seen in lecture that you can slice a string with a call such as s[i:j], which gives you a portion of string s from index i to index j-1. However this is not the only way to slice a string! If you omit the starting index, Python will assume that you wish to start your slice at index 0. If you omit the ending index, Python will assume you wish to end your slice at the end of the string. Check out this session with the Python shell:

>>> s = 'Python is Fun!'
>>> s[1:5]
'ytho'
>>> s[:5]
'Pytho'
>>> s[1:]
'ython is Fun!'
>>> s[:]
'Python is Fun!'

That last example is interesting! If you omit both the start and ending index, you get your original string!

There's one other cool thing you can do with string slicing. You can add a third parameter, k, like this:s[i:j:k]. This gives a slice of the string s from index i to index j-1, with step size k. Check out the following examples:

>>> s = 'Python is Fun!'
>>> s[1:12:2]
'yhni u'
>>> s[1:12:3]
'yoiF'
>>> s[::2]
'Pto sFn'

The last example is similar to the example s[:]. With s[::2], we're asking for the full string s (from index 0 through 13), with a step size of 2 - so we end up with every other character in s. Pretty cool!


출처

https://courses.edx.org

Posted by Parametric Culture

INSTALLING ENTHOUGHT FOR WINDOWS (XP, VISTA, 7, OR 8)

To download Enthought Canopy on your Windows machine, you should follow these steps:

●       Visit the Enthought website's download page (https://www.enthought.com/downloads/)

●       The site should detect your operating system, but check that it shows "Windows". If you are running 32-bit Windows, be sure that you have selected the 32-bit flavor. (If you are running 64-bit Windows, you can download either flavor.) Click the green "Download Canopy…" button.

NOTE: the course has been tested on the 32 bit Python version. You can run 64 bit if you want, but we can’t promise that every assignment will run correctly.

●       In most cases (except as noted in the next bullet point), you will not need administrative privileges to install Canopy. Once the file has downloaded to your system, start the installer by double-clicking the downloaded file. Verify that the publisher is listed as Enthought, Inc. and click "Run." Follow the installer instructions and complete the installation.

●       Note: If your Windows login user name includes any international (non-ASCII, i.e. non-English) alphabet letters, you will need to install a little differently. Either install Canopy "for all users" as an administrator or log in as a different user who has an ASCII user name. You can read detailed instructions in this article in the Enthought Support Knowledge Base.

 Once the installation process is complete, the last step is to set up your Python environment. Launch Canopy by selecting it from the Windows Start Menu in the Enthought Canopy folder.

 The application will guide you through the setup process:

 

If you have an ASCII (English letters, numbers, and punctuation) user name, then you should accept the directory which is proposed. Otherwise, we suggest entering

C:\Program Files\Canopy
See this article in the Enthought Support Knowledge Base for more details.

After the environment is installed, Canopy prompts you to make it the default Python environment:  

 

For most users (and for all new Python users), the default “Yes” response will be the most convenient. However, if you are also using another Python distribution, it will be safer to select “No” for now, so as not to interfere with the operation of your other Python. You can still run Canopy Python safely inside the Canopy application's editor. 

 

Once you have made your selection and set up your environment, the Canopy Welcome screen should be visible. If there are any Canopy application updates available, you will see a note in the bottom-right corner of the Welcome window, which you can click to open the About window in order to install the updates. You can also view this window by clicking “Canopy Application Updates…” from the Help menu. Please install any available updates.

 

Canopy is now set up and is ready to use!

 

Expert note (optional): if you choose not to make Canopy your default Python environment, but you still do want to use Canopy User Python from the Windows command line, please read this article first to avoid confusion, since Canopy User Python does not live where you might assume it does.

 

CANOPY APPLICATION OVERVIEW

To help you get an understanding of the Canopy application, this article in the online Canopy User Guidedescribes the basics of the Editor. You can also access the User Guide offline through the Canopy application by selecting the "Documentation Browser" from the Welcome screen (the User Guide is the top item listed in the Documentation Browser window).

 

Opening an Editor window typically presents you with the following (screenshot is from Mac OS X, but are similar in Windows):

This window combines three commonly used parts: (1) File Browser, (2) Code Editor, and (3) Python (IPython) interpreter pane.

  • The IPython prompt looks something like this:
In [1]:
  • Try typing the following simple expression after the IPython prompt:
3*5
  • What happens when you press the Enter key? 
  • Try typing the following simple expression after the IPython prompt:
'foobar'
  • What happens when you press the Enter key?

To create, save, run, and re-open a file:

  • In the Canopy Editor's File menu, select "New", then "Python file". On the first line of the new file, type the following:
print 'hello world'
  • You will want to save your files in a location specific for this course. To do that, first create a directory (or folder) for your 6.00.1x material, with an appropriate name.
    • To create a new folder using Canopy:
      • Use the File Browser to browse to the existing folder where you want to create your course folder. (If you can't find the desired existing folder in the File Browser, you can right-click and select "Add Top-Level Path".)
      • Right click on that existing folder and click "Create Directory", which will create a new folder inside the existing folder.
      • Type a name for the new folder, such as  “6.00.1x Files,” and press ENTER.
    • Or, to create a new folder using Windows, go to the location (either another folder or the desktop) where you want to create the folder. Right-click a blank area on the desktop or in the folder window, point to New, and then click Folder. Type a name for the new folder, such as “6.00.1x Files,” and press ENTER.
  • Now you will save your "hello world" file in the new folder that you just created.
    • From the Canopy File menu, click Save As and then navigate to your course folder before typing a name for this file, e.g., "pset0Test.py".
      • Note: Be sure to type the ".py" file extension, so that Canopy and Windows recognize this as a Python file! In other words, always save your Python files as fileName.py, instead of just fileName
    • Click the Save button.
    • At this point, please add your course folder (“6.00.1x Files” in our example) to the Canopy File Browser so that you have easy access to it each time you start Canopy. To do this, expand the Recent Files folder in the side pane and right-click on the file you just saved. Select Add directory as Top-level and now you should see your course folder in the File Browser.
  • From the Canopy Run menu, click on "Run File".
  • What happens?
  • Go back to the Code Editor and add the following line:
print 'I like 6.00.1x!'
  • Select “Run File” again (you can also use the green triangular Run button on the toolbar).

What happens?

  • Close your test file by clicking the X in its filename tab.
  • Now reopen your test file by double-clicking its name in the File Browser's "Recent Files" folder.

Congratulations - your Python environment has been installed, and you now know how to enter expressions in Python and how to save, run, and open files!


INSTALLING ENTHOUGHT FOR MAC OS X (10.6.2 AND ABOVE)

 To download Enthought Canopy on your Mac (Apple) machine, you should follow these steps:

  • Visit the Enthought website's download page (https://www.enthought.com/downloads/)
  • The site should detect your operating system, but check that it shows "Mac OS X". We suggest downloading the 32-bit flavor for maximum graphics compatibility. Click the green "Download Canopy…" button.

NOTE: the course has been tested on the 32 bit Python version. You can run 64 bit if you want, but we can’t promise that every assignment will run correctly.

  • Once the file has downloaded to your system, start by double-clicking the .dmg file to mount the image. Opening this file displays the installation window shown below. Canopy can be installed by dragging the Canopy icon to the Applications folder in the window, to the computer Desktop, or to another folder. If you drag it to the Applications folder, it will show as “Canopy” along with your other applications.

 

Once Canopy is copied to your system, the last step is to set up your Python environment. Double-clicking the Canopy icon in your Applications folder will start Canopy, and the application will guide you through the setup process.

If you have an ASCII (English letters, numbers, and punctuation) user name, then you should accept the directory which is proposed. Otherwise, we suggest entering
/Applications/Canopy
See this article in the Enthought Support Knowledge Base for more details.

 After the environment is installed, Canopy prompts you to make it the default Python environment:

 

For most users (and for all new Python users), the default “Yes” response will be the most convenient. However, if you are also using another Python distribution, it will be safer to select “No” for now, so as not to interfere with the operation of your other Python. You can still run Canopy Python safely inside the Canopy application's editor.

 

Once you have made your selection and set up your environment, the Canopy Welcome screen should be visible. If there are any Canopy application updates available, you will see a note in the bottom-right corner of the Welcome window, which you can click to open the About window in order to install the updates. You can also view this window by clicking “Canopy Application Updates…” from the Help menu. Please install any available updates.

 Canopy is now set up and is ready to use!

 

 Expert note (optional): if you choose not to make Canopy your default Python environment, but you still do want to use Canopy User Python from the terminal command line, please read this article first to avoid confusion, since Canopy User Python does not live where you might assume it does.

  

CANOPY APPLICATION OVERVIEW

To help you get an understanding of the Canopy application, this article in the online Canopy User Guidedescribes the basics of the Editor. You can also access the User Guide offline through the Canopy application by selecting the "Documentation Browser" from the Welcome screen (the User Guide is the top item listed in the Documentation Browser window).

 

Opening an Editor window typically presents you with the following:

 

This window combines three commonly used parts: (1) File Browser, (2) Code Editor, and (3) Python (IPython) interpreter pane.

  • The IPython prompt looks something like this:
In [1]:
  • Try typing the following simple expression after the IPython prompt:
3*5
  • What happens when you press the Enter key? 
  • Try typing the following simple expression after the IPython prompt:
'foobar'
  • What happens when you press the Enter key?

 

To create, save, run, and re-open a file:

  • In the Canopy Editor's File menu, select "New", then "Python file". On the first line of the new file, type the following:
print 'hello world'
  • You will want to save your files in a location specific for this course. To do that, first create a directory (or folder) for your 6.00.1x material, with an appropriate name.
    • To create a new folder using Canopy:
      • Use the File Browser to browse to the existing folder where you want to create your course folder. (If you can't find the desired existing folder in the File Browser, you can right-click and select "Add Top-Level Path".)
      • Right click on that existing folder and click "Create Directory", which will create a new folder inside the existing folder.
      • Type a name for the new folder, such as  “6.00.1x Files,” and press ENTER.
    • Or, to create a new folder using Mac OS, go to the Finder application. Open your Documents folder. Under the Wheel icon, click on New Folder. Name the folder something appropriate (eg "6.00.1x Files").

 

  • Now you will save your "hello world" file in the new folder that you just created.
    • From the Canopy File menu, click Save As and then navigate to your course folder before typing a name for this file, e.g., "pset0Test.py".
      • Note: Be sure to type the ".py" file extension, so that Canopy and Mac OS X recognize this as a Python file! In other words, always save your Python files as fileName.py, instead of just fileName
    • Click the Save button.
    • At this point, please add your course folder (“6.00.1x Files” in our example) to the Canopy File Browser so that you have easy access to it each time you start Canopy. To do this, expand the Recent Files folder in the side pane and right-click on the file you just saved. Select Add directory as Top-level and now you should see your course folder in the File Browser.
  • From the Canopy Run menu, click on "Run File".

What happens?

  • Go back to the Code Editor and add the following line:
print 'I like 6.00.1x!'
  • Select “Run File” again (you can also use the green triangular Run button on the toolbar).

What happens?

  • Close your test file by clicking the X in its filename tab.
  • Now reopen your test file by double-clicking its name in the File Browser's "Recent Files" folder.

Congratulations - your Python environment has been installed, and you now know how to enter expressions in Python and how to save, run, and open files!


INSTALLING ENTHOUGHT FOR LINUX (RH/CENTOS 5 OR HIGHER, OR EQUIVALENT)

 To download Enthought Canopy on your Linux machine, you should follow these steps:

  • Visit the Enthought website's download page (https://www.enthought.com/downloads/)
  • The site should detect your operating system, but check that it shows "Linux", and that you select the flavor (32-bit or 64-bit) that corresponds to your Linux system installation. Click the green "Download Canopy…" button.

NOTE: the course has been tested on the 32 bit Python version. You can run 64 bit if you want, but we can’t promise that every assignment will run correctly.

  • Canopy for Linux is distributed as a self-extracting shell script. Once the file has downloaded to your system, the install can be started by executing the following command from within the download directory (the exact name "canopy-1.1.0-rh5-64.sh" may differ slightly, depending on which Canopy installer version you just downloaded):

bash canopy-1.1.0-rh5-64.sh

  • The installer will present the Canopy End User License Agreement for approval. If you agree to the license, the next prompt is for the installation location. The default installation location is ~/Canopy.

 

Once the installation is complete, the last step is to set up your Python environment. Launch Canopy from your Applications directory and the application will guide you through the process.

 

If you have an ASCII (English letters, numbers, and punctuation) user name, then you can accept the directory which is proposed. Otherwise, please enter a writeable directory whose path contains only ASCII characters. See this article in the Enthought Support Knowledge Base for more details.

 

After the environment is installed, Canopy prompts you to make it the default Python environment:

 

For most Linux users who are already using another Python distribution, it will be safer to select “No” for now, so as not to interfere with the operation of your other Python. You can still run Canopy Python safely inside the Canopy application's editor.  For some, the default “Yes” response may be the most convenient.

Once you have made your selection and set up your environment, the Canopy Welcome screen should be visible. If there are any Canopy application updates available, you will see a note in the bottom-right corner of the Welcome window, which you can click to open the About window in order to install the updates. You can also view this window by clicking “Canopy Application Updates…” from the Help menu. Please install any available updates.

 

Canopy is now set up and is ready to use!

 

Expert note (optional): if you choose not to make Canopy your default Python environment, but you still do want to use Canopy User Python from the Linux command line, please read this article first to avoid confusion, since Canopy User Python does not live where you might assume it does.

 

CANOPY APPLICATION OVERVIEW

 

To help you get an understanding of the Canopy application, this article in the online Canopy User Guidedescribes the basics of the Editor. You can also access the User Guide offline through the Canopy application by selecting the "Documentation Browser" from the Welcome screen (the User Guide is the top item listed in the Documentation Browser window).

 

 

Opening an Editor window typically presents you with the following (screenshot is from Mac OS X but are similar in Linux): 

This window combines three commonly used parts: (1) File Browser, (2) Code Editor, and (3) Python (IPython) interpreter pane.

  • The IPython prompt looks something like this:
In [1]:
  • Try typing the following simple expression after the IPython prompt:
3*5
  • What happens when you press the Enter key? 
  • Try typing the following simple expression after the IPython prompt:
'foobar'
  • What happens when you press the Enter key?

 

To create, save, run, and re-open a file:

  • In the Canopy Editor's File menu, select "New", then "Python file". On the first line of the new file, type the following:

print 'hello world'

  • You will want to save your files in a location specific for this course. To do that, first create a directory (or folder) for your 6.00.1x material, with an appropriate name.
    • To create a new folder using Canopy:
      • Use the File Browser to browse to the existing folder where you want to create your course folder. (If you can't find the desired existing folder in the File Browser, you can right-click and select "Add Top-Level Path".)
      • Right click on that existing folder and click "Create Directory", which will create a new folder inside the existing folder.
      • Type a name for the new folder, such as  “6.00.1x Files,” and press ENTER.
    • You may also create the folder using any Linux tools that you prefer.
  • Now you will save your "hello world" file in the new folder that you just created.
    • From the Canopy File menu, click Save As and then navigate to your course folder before typing a name for this file, e.g., "pset0Test.py".
      • Note: Be sure to type the ".py" file extension, so that Canopy and Linux recognize this as a Python file! In other words, always save your Python files as fileName.py, instead of just fileName
    • Click the Save button.
    • At this point, please add your course folder (“6.00.1x Files” in our example) to the Canopy File Browser so that you have easy access to it each time you start Canopy. To do this, expand the Recent Files folder in the side pane and right-click on the file you just saved. Select Add directory as Top-level and now you should see your course folder in the File Browser.
  • From the Canopy Run menu, click on "Run File".

What happens?

  • Go back to the Code Editor and add the following line:
print 'I like 6.00.1x!'
  • Select “Run File” again (you can also use the green triangular Run button on the toolbar).

What happens?

  • Close your test file by clicking the X in its filename tab.
  • Now reopen your test file by double-clicking its name in the File Browser's "Recent Files" folder.

Congratulations - your Python environment has been installed, and you now know how to enter expressions in Python and how to save, run, and open files!


Posted by Parametric Culture

Learn Python for Free From MIT via EDX : ISresource Discussion


Open for all Python Discussion Forum :

Free 9 week course begining on 10th of June from MIT via the EDX platform.

Register on www.edx.org and enroll for the course below(it is a Massive Open Online Course or MOOC and below is its location):
https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-0

What you'll learn:
A Notion of computation
The Python programming language
Some simple algorithms
Testing and debugging
An informal introduction to algorithmic complexity
Data structures

Receive a free honor code certificate at the end of the course. 
Disclaimer: ISresource is not in any way affiliated to the content of this course or EDX.org or MIT. ISresource is a discussion forum. ISresource is promoting this Massive Open Online Course because of its value.


홈페이지

https://courses.edx.org/


Enthought Canopy Python Distribution, which you can download here.

https://store.enthought.com/downloads/#default


Python Download

https://www.python.org/downloads/

'Parametric Design > 20. Python 정보' 카테고리의 다른 글

INSTALLING ENTHOUGHT FOR WINDOWS  (0) 2015.06.13
Posted by Parametric Culture

Parametric Design Concepts


  • Rapidly test, iterate, and study multiple design options in less time
  • Solve complex geometric problems, no programming experience needed
  • Automate repetitive tasks for more precision and speed
  • Manage risk by exposing tradeoffs and understanding systems and connections at the conceptual phase
  • Generate sophisticated designs from simple data, logic, and analysis

How is Computational Design addressing them?


  • Helps reduce struggle in early design phase
  • Eases the ability to design complex geometry
  • Improves designer's overall capabilities

How dose Computational Design factor in?

  • Apply hehaviors & logic to model
  • Add rules via visual or scripting interface
  • Build a system, not just a model
  • Extend to other applications model


Posted by Parametric Culture