Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
MeteorologicalBureau
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fca58595
authored
Mar 11, 2020
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改py
parent
66c11f8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
center.py
+7
-1
test.js
+12
-2
No files found.
center.py
View file @
fca58595
...
...
@@ -31,8 +31,14 @@ def sendMessage(path, message):
args
=
parser
.
parse_args
()
client
=
udp_client
.
SimpleUDPClient
(
args
.
ip
,
args
.
port
)
print
(
path
,
message
)
client
.
send_message
(
path
,
json
.
dumps
(
message
))
print
(
path
.
encode
(
'unicode_escape'
),
message
)
print
((
'BEUC'
+
path
)
.
encode
(
'unicode_escape'
),
message
)
str
=
(
'BEUC'
+
path
)
.
encode
(
'unicode_escape'
)
.
decode
(
'utf-8'
)
print
(
'BEUC'
+
path
,
str
)
print
(
str
.
encode
(
'unicode_escape'
)[
0
],
str
.
encode
(
'unicode_escape'
)[
1
],
str
.
encode
(
'unicode_escape'
)[
2
],
str
.
encode
(
'unicode_escape'
)[
3
],
str
.
encode
(
'unicode_escape'
)[
4
])
client
.
send_message
(
str
,
json
.
dumps
(
message
))
# error action
...
...
test.js
View file @
fca58595
...
...
@@ -34,4 +34,14 @@ function* helloWorldGenerator() {
}
var
hw
=
helloWorldGenerator
();
console
.
log
(
hw
.
next
(),
hw
.
next
(),
hw
.
next
(),
hw
.
next
())
\ No newline at end of file
console
.
log
(
hw
.
next
(),
hw
.
next
(),
hw
.
next
(),
hw
.
next
())
// import logging
// logging.basicConfig(level=logging.DEBUG,#控制台打印的日志级别
// filename='log_new.log', # 将日志写入log_new.log文件中
// filemode='a',##模式,有w和a,w就是写模式,每次都会重新写日志,覆盖之前的日志
// #a是追加模式,默认如果不写的话,就是追加模式
// format=
// '%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s'
// #日志格式
// )
复制代码
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment