Skip to content

Commit 2f381d8

Browse files
2 parents 0f15676 + 6894761 commit 2f381d8

File tree

114 files changed

+5304
-5292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+5304
-5292
lines changed

docs/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ PythonBridge gives Smalltalk developers the capability of interacting and reusin
1515

1616
[Get started now](#getting-started){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [View it on GitHub](https://github.com/ObjectProfile/PythonBridge){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 }
1717

18+
<iframe width="560" height="315" src="https://www.youtube.com/embed/uKSHUVZs75k" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
19+
1820
---
1921

2022
## Getting started in Pharo
@@ -58,4 +60,4 @@ PBApplication do: [
5860

5961
## Bridges based on PythonBridge
6062

61-
- [KerasBridge](https://objectprofile.github.io/KerasBridge)
63+
- [KerasBridge](https://objectprofile.github.io/KerasBridge)

docs/pages/pharo-installation.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,13 @@ PBApplication do: [
151151
]
152152
```
153153
To try this code snippet using KerasBridge replace `PBApplication` -> `Keras` and `PBCF` -> `KCF`.
154+
155+
## Changing communication protocol
156+
By default, the communication protocol for the bridge is MessagePack through native sockets. To manage which protocol to use we run:
157+
```
158+
PBPlatform current setSocketMessageBroker. "Set MessagePack over socket protocol"
159+
```
160+
or
161+
```
162+
PBPlatform current setHttpMessageBroker. "Set JSON over HTTP protocol"
163+
```
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Extension { #name : #Character }
2-
3-
{ #category : #'*PythonBridge' }
4-
Character >> isPythonGenerable [
5-
^ true
6-
]
7-
8-
{ #category : #'*PythonBridge' }
9-
Character >> isPythonValue [
10-
^ true
11-
]
1+
Extension { #name : #Character }
2+
3+
{ #category : #'*PythonBridge' }
4+
Character >> isPythonGenerable [
5+
^ true
6+
]
7+
8+
{ #category : #'*PythonBridge' }
9+
Character >> isPythonValue [
10+
^ true
11+
]
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Extension { #name : #Collection }
2-
3-
{ #category : #'*PythonBridge' }
4-
Collection >> ensureDo: aBlock [
5-
self do: [ :el | aBlock valueUninterruptably ]
6-
]
1+
Extension { #name : #Collection }
2+
3+
{ #category : #'*PythonBridge' }
4+
Collection >> ensureDo: aBlock [
5+
self do: [ :el | aBlock valueUninterruptably ]
6+
]
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Extension { #name : #Dictionary }
2-
3-
{ #category : #'*PythonBridge' }
4-
Dictionary >> isPythonGenerable [
5-
^ true
6-
]
7-
8-
{ #category : #'*PythonBridge' }
9-
Dictionary >> isPythonValue [
10-
^ true
11-
]
1+
Extension { #name : #Dictionary }
2+
3+
{ #category : #'*PythonBridge' }
4+
Dictionary >> isPythonGenerable [
5+
^ true
6+
]
7+
8+
{ #category : #'*PythonBridge' }
9+
Dictionary >> isPythonValue [
10+
^ true
11+
]

src/PythonBridge/False.extension.st

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Extension { #name : #False }
2-
3-
{ #category : #'*PythonBridge' }
4-
False >> isPythonGenerable [
5-
^ true
6-
]
7-
8-
{ #category : #'*PythonBridge' }
9-
False >> isPythonValue [
10-
^ true
11-
]
1+
Extension { #name : #False }
2+
3+
{ #category : #'*PythonBridge' }
4+
False >> isPythonGenerable [
5+
^ true
6+
]
7+
8+
{ #category : #'*PythonBridge' }
9+
False >> isPythonValue [
10+
^ true
11+
]

src/PythonBridge/Float.extension.st

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Extension { #name : #Float }
2-
3-
{ #category : #'*PythonBridge' }
4-
Float >> isPythonGenerable [
5-
^ true
6-
]
7-
8-
{ #category : #'*PythonBridge' }
9-
Float >> isPythonValue [
10-
^ true
11-
]
1+
Extension { #name : #Float }
2+
3+
{ #category : #'*PythonBridge' }
4+
Float >> isPythonGenerable [
5+
^ true
6+
]
7+
8+
{ #category : #'*PythonBridge' }
9+
Float >> isPythonValue [
10+
^ true
11+
]
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Extension { #name : #Fraction }
2-
3-
{ #category : #'*PythonBridge' }
4-
Fraction >> isPythonGenerable [
5-
^ true
6-
]
7-
8-
{ #category : #'*PythonBridge' }
9-
Fraction >> isPythonValue [
10-
^ true
11-
]
1+
Extension { #name : #Fraction }
2+
3+
{ #category : #'*PythonBridge' }
4+
Fraction >> isPythonGenerable [
5+
^ true
6+
]
7+
8+
{ #category : #'*PythonBridge' }
9+
Fraction >> isPythonValue [
10+
^ true
11+
]

src/PythonBridge/Integer.extension.st

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Extension { #name : #Integer }
2-
3-
{ #category : #'*PythonBridge' }
4-
Integer >> isPythonGenerable [
5-
^ true
6-
]
7-
8-
{ #category : #'*PythonBridge' }
9-
Integer >> isPythonValue [
10-
^ true
11-
]
1+
Extension { #name : #Integer }
2+
3+
{ #category : #'*PythonBridge' }
4+
Integer >> isPythonGenerable [
5+
^ true
6+
]
7+
8+
{ #category : #'*PythonBridge' }
9+
Integer >> isPythonValue [
10+
^ true
11+
]

src/PythonBridge/Object.extension.st

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Extension { #name : #Object }
2-
3-
{ #category : #'*PythonBridge' }
4-
Object >> isPythonGenerable [
5-
^ false
6-
]
1+
Extension { #name : #Object }
2+
3+
{ #category : #'*PythonBridge' }
4+
Object >> isPythonGenerable [
5+
^ false
6+
]
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Extension { #name : #P3GGenerable }
2-
3-
{ #category : #'*PythonBridge' }
4-
P3GGenerable >> isPythonGenerable [
5-
^ true
6-
]
7-
8-
{ #category : #'*PythonBridge' }
9-
P3GGenerable >> isPythonValue [
10-
^ true
11-
]
1+
Extension { #name : #P3GGenerable }
2+
3+
{ #category : #'*PythonBridge' }
4+
P3GGenerable >> isPythonGenerable [
5+
^ true
6+
]
7+
8+
{ #category : #'*PythonBridge' }
9+
P3GGenerable >> isPythonValue [
10+
^ true
11+
]
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Extension { #name : #P3GStatement }
2-
3-
{ #category : #'*PythonBridge' }
4-
P3GStatement >> isPythonValue [
5-
^ false
6-
]
1+
Extension { #name : #P3GStatement }
2+
3+
{ #category : #'*PythonBridge' }
4+
P3GStatement >> isPythonValue [
5+
^ false
6+
]
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
Class {
2-
#name : #PBAbstractAnswer,
3-
#superclass : #Object,
4-
#instVars : [
5-
'message'
6-
],
7-
#category : #'PythonBridge-Platform-Messages'
8-
}
9-
10-
{ #category : #'instance creation' }
11-
PBAbstractAnswer class >> answerFor: aMessage [
12-
^ self new
13-
message: aMessage;
14-
yourself
15-
]
16-
17-
{ #category : #accessing }
18-
PBAbstractAnswer >> message [
19-
^ message
20-
]
21-
22-
{ #category : #accessing }
23-
PBAbstractAnswer >> message: anObject [
24-
message := anObject
25-
]
26-
27-
{ #category : #accessing }
28-
PBAbstractAnswer >> type [
29-
^ message type
30-
]
1+
Class {
2+
#name : #PBAbstractAnswer,
3+
#superclass : #Object,
4+
#instVars : [
5+
'message'
6+
],
7+
#category : #'PythonBridge-Platform-Messages'
8+
}
9+
10+
{ #category : #'instance creation' }
11+
PBAbstractAnswer class >> answerFor: aMessage [
12+
^ self new
13+
message: aMessage;
14+
yourself
15+
]
16+
17+
{ #category : #accessing }
18+
PBAbstractAnswer >> message [
19+
^ message
20+
]
21+
22+
{ #category : #accessing }
23+
PBAbstractAnswer >> message: anObject [
24+
message := anObject
25+
]
26+
27+
{ #category : #accessing }
28+
PBAbstractAnswer >> type [
29+
^ message type
30+
]
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Class {
2-
#name : #PBAbstractFinalizer,
3-
#superclass : #Object,
4-
#category : #'PythonBridge-Platform'
5-
}
6-
7-
{ #category : #finalization }
8-
PBAbstractFinalizer >> finalize [
9-
self subclassResponsibility
10-
]
1+
Class {
2+
#name : #PBAbstractFinalizer,
3+
#superclass : #Object,
4+
#category : #'PythonBridge-Platform'
5+
}
6+
7+
{ #category : #finalization }
8+
PBAbstractFinalizer >> finalize [
9+
self subclassResponsibility
10+
]
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
Class {
2-
#name : #PBAbstractMessage,
3-
#superclass : #Object,
4-
#category : #'PythonBridge-Platform-Messages'
5-
}
6-
7-
{ #category : #testing }
8-
PBAbstractMessage class >> isReverseMessage [
9-
"Reverse messages corresponds to messages that start on Python to Pharo. In other words
10-
in reverse direction from normal messages."
11-
self subclassResponsibility
12-
]
13-
14-
{ #category : #accessing }
15-
PBAbstractMessage class >> type [
16-
self subclassResponsibility
17-
]
18-
19-
{ #category : #testing }
20-
PBAbstractMessage >> isReverseMessage [
21-
"Reverse messages corresponds to messages that start on Python to Pharo. In other words
22-
in reverse direction from normal messages."
23-
^ self class isReverseMessage
24-
]
25-
26-
{ #category : #accessing }
27-
PBAbstractMessage >> type [
28-
^ self class type
29-
]
1+
Class {
2+
#name : #PBAbstractMessage,
3+
#superclass : #Object,
4+
#category : #'PythonBridge-Platform-Messages'
5+
}
6+
7+
{ #category : #testing }
8+
PBAbstractMessage class >> isReverseMessage [
9+
"Reverse messages corresponds to messages that start on Python to Pharo. In other words
10+
in reverse direction from normal messages."
11+
self subclassResponsibility
12+
]
13+
14+
{ #category : #accessing }
15+
PBAbstractMessage class >> type [
16+
self subclassResponsibility
17+
]
18+
19+
{ #category : #testing }
20+
PBAbstractMessage >> isReverseMessage [
21+
"Reverse messages corresponds to messages that start on Python to Pharo. In other words
22+
in reverse direction from normal messages."
23+
^ self class isReverseMessage
24+
]
25+
26+
{ #category : #accessing }
27+
PBAbstractMessage >> type [
28+
^ self class type
29+
]

0 commit comments

Comments
 (0)