コード例 #1
0
import _initpath
import pyradox

import re

result = pyradox.parse(r"""
r = rgb { 1 100 200 }
h = hsv { 0.3 0.6 0.9 }
""")

print(result)
コード例 #2
0
ファイル: escape_test.py プロジェクト: SaucyPigeon/pyradox
import _initpath
import pyradox

import re

result = pyradox.parse(r"""
random_owned_controlled_state = {
        prioritize = { 43 }
        limit = { ROOT = { has_full_control_of_state = PREV } }
        create_unit = {
                division = "name = \"1. Light Division\" division_template = \"Light Division\" start_experience_factor = 1.0" 
                owner = HUN
        }
}
""")

print(result)
コード例 #3
0
result = pyradox.parse("""
# pre comment
foo = bar # line comment 0

1 # pre comment
= # pre comment
3 # line comment

empty_tree = {}

# tree test
tree = {
# pre comment in tree
foo = bar # line comment in tree
# tree end comment
} # tree line comment

# group outside precomment?
group = {
    # group item precomment
    foo # line comment in group
    bar baz
    # group item postcomment
} # group outside postcomment?

list2 = {1 2 3}

# file end comment (or item outside postcomment?)
""")
コード例 #4
0
ファイル: txt_test.py プロジェクト: ajul/pyradox
result = pyradox.parse("""
# pre comment
foo = bar # line comment 0

1 # pre comment
= # pre comment
3 # line comment

empty_tree = {}

# tree test
tree = {
# pre comment in tree
foo = bar # line comment in tree
# tree end comment
} # tree line comment

# group outside precomment?
group = {
    # group item precomment
    foo # line comment in group
    bar baz
    # group item postcomment
} # group outside postcomment?

list2 = {1 2 3}

# file end comment (or item outside postcomment?)
""")
コード例 #5
0
ファイル: time_test.py プロジェクト: warior4356/ck3_mapdata
import _initpath
import pyradox

import re

result = pyradox.parse(r"""
with_days = 1444.1.1
with_hours = 1939.1.1.12
""")

print(result)

print(pyradox.Time.from_days_since_1_ad(365 + 32))
コード例 #6
0
ファイル: group_test.py プロジェクト: ajul/pyradox
#result = pyradox.txt.parse_file('D:/Steam/steamapps/common/Europa Universalis IV/common/prices/00_prices.txt')
#print(result)

result = pyradox.parse("""
regular_group = { 1 2 3 }

empty_tree = {}

mixed_group = {
    10
    {}
    { a = 1 b = 2 }
    20
}

player_countries={
	ITA={
		user="******"
		country_leader=yes
		pinned_theatres={
{
				id=16
				type=67
			}
		}
	}
}
""")

print(result)
コード例 #7
0
ファイル: escape_test.py プロジェクト: ajul/pyradox
import _initpath
import pyradox

import re

result = pyradox.parse(r"""
random_owned_controlled_state = {
        prioritize = { 43 }
        limit = { ROOT = { has_full_control_of_state = PREV } }
        create_unit = {
                division = "name = \"1. Light Division\" division_template = \"Light Division\" start_experience_factor = 1.0" 
                owner = HUN
        }
}
""")

print(result)
コード例 #8
0
#result = pyradox.txt.parse_file('D:/Steam/steamapps/common/Europa Universalis IV/common/prices/00_prices.txt')
#print(result)

result = pyradox.parse("""
regular_group = { 1 2 3 }

empty_tree = {}

mixed_group = {
    10
    {}
    { a = 1 b = 2 }
    20
}

player_countries={
	ITA={
		user="******"
		country_leader=yes
		pinned_theatres={
{
				id=16
				type=67
			}
		}
	}
}
""")

print(result)