_대문 | 방명록 | 최근글 | 홈피소개 | 주인놈
FrontPage › HelpOnMacros

Contents

[-] [-]
1 Macros
1.1 Search macros
1.2 Navigation
1.3 System information
1.4 Others
2 Example Display


1 Macros #

Macros allow the insertion of system features into normal wiki pages; the only thing that makes those pages special is that they contain macros. If you edit pages like RecentChanges or SystemInfo, you'll see what that means.

For more information on the possible markup, see HelpOnEditing.

1.1 Search macros #

MacroDescriptionExample
[[TitleSearch]] search the page titles FindPage
[[FullSearch]] search the page contents FindPage
[[GoTo]] directly go to the page you enter FindPage
[[PageList(regex)]] list of pages whose title matches the regex HelpIndex

1.2 Navigation #

MacroDescriptionExample
[[RecentChanges]] a list of recently edited pages RecentChanges
[[TitleIndex]] an index of all page titles TitleIndex
[[WordIndex]] an index of all words in page titles WordIndex
[[RandomPage]] a link to a random page 발코니-베란다-테라스-포치
[[RandomPage(#)]] links to a number of random pages
[[TableOfContents]] display a local table of contents see below

1.3 System information #

MacroDescriptionExample
[[InterWiki]] a list of all known InterWiki names InterWiki
[[SystemInfo]] info on the wiki, the python interpreter and the host system SystemInfo
[[PageCount]] current page count 1784 pages

1.4 Others #

MacroDescriptionExample
[[Icon(image)]] display system icons HelpOnNavigation
[[UserPreferences]] display a user preferences dialog UserPreferences
[[BR]] insert a line break 1st line
2nd line
[[Include(HelloWorld[,heading[,level]])]] include contents of another page

Contents

1 python


1 python #

py_helloworld.jpg

헐.. 처음부터 뻑이냐? ㅋ 닝기미.. 알고보니..

In Python2: print "Hello World"
In Python3: print("Hello World")

아.. 짜증.. 전산밥이 몇 년인데 "hello world" 한 번 찍느라 30분이 넘게 걸렸다. ㅎ
흠... 좀 보니.. 2.x 버전과 3.x 버전과는 많은 차이가 있는 듯 하다..
떱.. 문서는 대부분 2.x 버전인데.. 아.. 삽질 좀 하게 생겼다...

2.x 버전에서는...
 python
for i in range(10):
	print i,

3.x 버전에서는...
 python
for i in range(10):
	print(i, end=' ')

루프를 돌려보자..
 python
for i in range(3):
    for j in range(3):
        print ("루프=",i, "값=",i*j, sep=';')

결과는
루프=;0;값=;0
루프=;0;값=;0
루프=;0;값=;0
루프=;1;값=;0
루프=;1;값=;1
루프=;1;값=;2
루프=;2;값=;0
루프=;2;값=;2
루프=;2;값=;4

호오.. 잼있다.. 쉽고..

2 Example Display #

We don't show examples for all macros here, because that would make this page quite long. Here is is the replacement text for the [[SystemInfo]] macro:
PHP Version 5.3.3 (Linux yasicom.cafe24.com 2.6.32-754.el6.x86_64 #1 SMP Tue Jun 19 21:26:04 UTC 2018 x86_64)
MoniWiki Version Release 1.1.2 [Revision: 1.319 ]
HTTP Server Version Apache/2.2.15
Number of Pages 1784




댓글 남기기..
이름: : 오른쪽의 새로고침을 클릭해 주세요. 새로고침
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

Youth is not a time of life but it is a state of mind. (사무엘울만)