Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
learnstuff
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher 'horni' Hornberger
learnstuff
Commits
769bfcba
Commit
769bfcba
authored
11 years ago
by
Christopher 'horni' Hornberger
Browse files
Options
Downloads
Patches
Plain Diff
first commit
parents
Branches
master
Tags
v0.01
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
README
+2
-0
2 additions, 0 deletions
README
aufnahme.py
+16
-0
16 additions, 0 deletions
aufnahme.py
connect.py
+26
-0
26 additions, 0 deletions
connect.py
hello.py
+11
-0
11 additions, 0 deletions
hello.py
sendme.py
+28
-0
28 additions, 0 deletions
sendme.py
with
83 additions
and
0 deletions
README
0 → 100644
+
2
−
0
View file @
769bfcba
* first python scripts I wrote
* maybe it's useful for learning
This diff is collapsed.
Click to expand it.
aufnahme.py
0 → 100755
+
16
−
0
View file @
769bfcba
#!/usr/bin/python
import
sys
datei
=
open
(
sys
.
argv
[
0
],
"
rU
"
)
for
zeile
in
datei
:
print
zeile
,
datei
.
close
()
sys
.
exit
(
0
)
This diff is collapsed.
Click to expand it.
connect.py
0 → 100755
+
26
−
0
View file @
769bfcba
#!/usr/bin/python
import
sys
import
socket
if
len
(
sys
.
argv
)
>
1
:
host
=
sys
.
argv
[
1
]
port
=
int
(
sys
.
argv
[
2
])
else
:
print
"
usage:
"
,
sys
.
argv
[
0
],
"
host port
"
sys
.
exit
(
0
)
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
sock
.
connect
((
host
,
port
))
text
=
sys
.
stdin
.
readline
()
while
text
:
write
=
sock
.
send
(
text
)
text
=
sys
.
stdin
.
readline
()
sys
.
exit
(
0
)
This diff is collapsed.
Click to expand it.
hello.py
0 → 100755
+
11
−
0
View file @
769bfcba
#!/usr/bin/python
import
sys
if
len
(
sys
.
argv
)
>
1
:
for
name
in
sys
.
argv
[
1
:]:
print
"
Hi
"
,
name
else
:
print
"
Hi Christopher
"
This diff is collapsed.
Click to expand it.
sendme.py
0 → 100755
+
28
−
0
View file @
769bfcba
#!/usr/bin/python
import
sys
import
socket
if
len
(
sys
.
argv
)
>
1
:
host
=
sys
.
argv
[
1
]
port
=
int
(
sys
.
argv
[
2
])
else
:
print
"
usage:
"
,
sys
.
argv
[
0
],
"
host port
"
sys
.
exit
(
0
)
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
sock
.
connect
((
host
,
port
))
datei
=
open
(
sys
.
argv
[
0
],
"
rU
"
)
for
zeile
in
datei
:
write
=
sock
.
send
(
zeile
)
datei
.
close
()
sys
.
exit
(
0
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment