PeterJohn ThreeDim
Python IDE - Creating 3D Games
Only for iPhone
$5.99 · Designed for iPhone. Not verified for macOS.
****What is this;;
PeterJohn is a Python3 PlayGrounds runs on iPhone.
This enables you to code, run and learn Python3 even on the train, on the bus, even Offline.
****Why we named "PeterJohn";;
Peter is the son of Old John. Young John is the son of Zebedee.
Peter and Young John led Christianity in the early church.
We named "PeterJohn" after the two names of Peter and Young John.
** Why we made this and Why we chose Python3;;
We wanted to code even on the train or even on the bus,
even on OffLine.
and wanted to offer you to do the same things.
We chose Python3 as the programing language.
'cause the Curly Bracket language such
as JavaScript needs many lines and
it's Not appropriate in the narrow iPhone screen.
**Basic Technology;;
PeterJohn is constructed on some of basic technologies.
**Python-Apple-Support;;
We didn't want to make any Wheel language and
any Wheel interpreter.
so we chose Python3 and
we used "Python-Apple-Support" as the Python3 interpreter.
"Python-Apple-Support" is one of CPython.
**CPython's Extension Function;;
This is used for Python to call Swift function
such as GUI
via Objective-C and
for Swift to call Python via Objective-C
in order to offer Python3 interpreter.
**PeterJohn-Bridging-Header.h;;
This is used to import Objective-C header files to Swift.
This enables Swift to use CPython's Extension Function via Objective-C.
**PeterJohn-Swift.h;;
This enables CPython's Extension Function to use Swift such as GUI via Objective-C.
**AudioKit;;
To implement playing MIDI function, we used AudioKit.
**squash.py;;
Many people on this planet have learned the programing
from the "squash.py".
****What we offer you;;
**s00stdErrTest.py;;
iOS hides "stderr" to make simple to use iPhone.
but it's required when we learn Python3.
so I wrote "logStdErr.py".
Import "logStdErr" and
execute "logStdErr.errToFile()"
in your code.
**s01basicUi.py;;
pj.title()
pj.removeAllFromCanvas()
pj.createRectangle()
pj.createCircle()
pj.createLabel()
pj.setText()
pj.updateMainPanel()
**s02midiTest.py;;
pj.midi();
**s03bindTest.py;;
pj.bindMotionFunction()
pj.bindMotionCanvasFunction()
pj.bindButtonFunction()
pj.bindKeyPressFunction()
For example,
pj.bindButtonFunction("p1:s03bindTest.click")
By the notation of "p1:s03bindTest.click",
the function "click" is executed
only from the script file "s03bindTest" in the project "p1".
**s04timerTest.py;;
pj.startTimerFunctionAfter()
pj.stopTimer()
For example,
pj.startTimerFunctionAfter("p1:s04timerTest.gameLoop")
By the notation of "p1:s04timerTest.gameLoop",
the function "gameLoop" is executed
only from the script file "s04timerTest" in the project "p1".
**s05squash.py;;
This is the "PeterJohn" implementation
of the Famous "squash.py".
**s06spriteBundle.py;;
pj.createSpriteBundle()
This's just a demonstration,
you need to proceed to create Sprite from SandBox
'cause the Bundle file is freezed when we submitted
this app to AppStore and
you can Not change the Bundle file.
**s07audioBundle.py;;
pj.playSoundEffectsBundle()
pj.prepareBgmBundle()
pj.playBGM()
This's just a demonstration,
you need to proceed to create Audio from SandBox
'cause the Bundle file is freezed when we submitted
this app to AppStore and
you can Not change the Bundle file.
**s08spriteSandBox.py;;
pj.createSpriteSandBox()
You can import your PNG files to your project.
**s09audioSandBox.py;;
pj.playSoundEffectsSandBox()
pj.prepareBgmSandBox()
pj.playBGM()
You can import your MP3 files to your project.
**Acknowledgements;;
Thank you Lord, Thank you King Jesus.
Thank you AppStore Review Team, every day.
Thank you Guido van Rossum, the author of "CPython".
Thank you Russell Keith-Magee, the author of "Python-Apple-Support".
Thank you Aurelius Prochazka, the author of "AudioKit".
Thank you M-Sugaya, the author of "squash.py".
Best Regards,
--Yasushi Yassun Obata
more "pip.whl" Added Version;
we Apologize that we forgot to Add "pip.whl".
Now you Can Use "pip".
Please Check "pjCommandLineTools/scripts/s002pip.py".
Best Regards,
--Yasushi Yassun Obata
2026.0518.2019 May 18
Last Time We Forgot to Add "PIL", Python Imaging Library, So That We Corrected it Version;
we Apologize
that we Forgot to Add "PIL" ( Python Imaging Library ) at the last time.
we Corrected it at this time.
you will be Confirm it
by Testing "TutorialSeason003/scripts/s005PILtest.py".
Best Regards,
--Yasushi Yassun Obata
2026.0514.0029 May 14
iOS26 Available Version;
After End Of April,
we Need to Compile on New Xcode and New iOS.
Best Regards,
--Yasushi Yassun Obata
2026.0510.2136 May 11
"pjThreeDim became Available to GLB File" Version;
We Added Two APIs in "pjThreeDim" module
in order to make you available to GLB file.
1) pj3d.getMeshNameListFromGLBFile( GLBfileAbsPath )
2) pj3d.createSCNSceneWithGLBFilePath(
GLBfileAbsPath,
meshName,
modelName,x,y,z )
In Order to know how to Use the APIs,
Please Check
"CameraAngle.create3dModelGLB(self,glbFileName,meshName,modelName) " method
in "TutorialSeason001/s009ThreeDimTest.py".
****Romans 12:6-8, NIV;
12:6 We have different gifts, according to the grace given to each of us. If your gift is prophesying, then prophesy in accordance with your faith;
12:7 if it is serving, then serve;
if it is teaching, then teach;
12:8 if it is to encourage, then give encouragement;
if it is giving, then give generously;
if it is to lead, do it diligently;
if it is to show mercy, do it cheerfully.
Best Regards,
--Yasushi Yassun Obata
2026.0329.1842 Mar 30
Minor Update of "EditScriptView-KeyWordSearch" Version;
We modified the "EditScriptView-KeyWordSearch"
'cause, when we touch "Previous" button or "Next" button, our Thumb finger of Right hand hides Number of Matches or LineNumber.
Now both Number of Matches and LineNumber is at the Left of both "Previous" button and "Next" button.
This is a Very Small Update but the change will make Easier to Use.
It seems "Search" in Japanese Language means "Happy" in English.
So we quoted the Scripture about "Happy".
****Psalm 1:1-3, GNT;Good News Translation;
1:1 Happy are those
who reject the advice of evil people,
who do not follow the example of sinners
or join those who have no use for God.
1:2 Instead, they find joy in obeying the Law of the Lord,
and they study it day and night.
1:3 They are like trees that grow beside a stream,
that bear fruit at the right time,
and whose leaves do not dry up.
They succeed in everything they do.
Best Regards,
--Yasushi Yassun Obata
2026.0316.2146 Mar 19
EditScriptView-KeyWordSearch Version;
For many years, our priority was Not implementing TextEditor with "KeyWord Search"
but implementing either NumPy or PyTorch.
But, Since Once we reached at the implementing both NumPy and PyTorch
as "PeterJohnNumPy", "PeterJohnNumPyMatplotlib", "PeterJohnPyTorch",
Now We Added "KeyWord Search" function to EditScriptView at this time.
So that You Can Search a Line and modify the Line easily.
So Far, we needed to use iPhone's "Notes" app in order to search a Line and modify the Line,
and needed to Paste the Script to the EditScriptView again.
but Now You Can Search a Line and modify the Line easily on "PeterJohn".
It seems "Search" in Japanese Language means "Happy" in English.
So we quoted the Scripture about "Happy".
****Psalm 1:1-3;
1:1 Happy are those
who reject the advice of evil people,
who do not follow the example of sinners
or join those who have no use for God.
1:2 Instead, they find joy in obeying the Law of the Lord,
and they study it day and night.
1:3 They are like trees that grow beside a stream,
that bear fruit at the right time,
and whose leaves do not dry up.
They succeed in everything they do.
Best Regards,
--Yasushi Yassun Obata
2026.0307.1456 Mar 7
'TutorialSeason003/S007AMACEaction.py' Added Version;
We Added Three APIs at this time.
Please Check the 'TutorialSeason003/S007AMACEaction.py' to know how to use the APIs.
import pjThreeDim as pj3d
import pjTkInter as tk
1) pj3d.setMaterial()
Check how to use in TutorialSeason003/pjAMACEactionCameraAngle.py;putSideWall() method;
it will make your 3D games beautiful.
2) pj3d.removeNodeHasPrefix()
Check how to use in TutorialSeason003/pjAMACEactionCameraAngle.py;initGame() method;
it will make easier to remove some of Nodes.
3) tk.removeNodeHasPrefix()
Check how to use in TutorialSeason003/pjAMACEactionCameraAngle.py;hideCastTheDemonOutOf(), hideBambooSpear(), hideWin1() method;
it will make easier to remove some of Nodes.
Best Regards,
--Yasushi Yassun Obata
2026.0301.0617 Mar 1
's005ThreeDimSquash.py', 's006MMLshepherd.py" and "Edit" button at ScriptView Version;
we Added Three at this time.
**1) TutorialSeason002/s005ThreeDimSquash.py;
This shows how to use pjThreeDim,
how to Create 3D games using "PeterJohn" app.
Please touch "TouchPadLeft" and "UpCursor"
in order to play this game.
TouchPadLeft - move Racket;
UpCursor - Replay;
**2) TutorialSeason003/s006MMLshepherd.py;
we added two of APIs into pjSound;
import pjSound as sound
sound.startNote(midiChannel,midiNote,midiVelocity);
sound.stopNote(midiChannel,midiNote,midiVelocity);
and added two of Classes,
pjMMLshepherdClass
pjMMLsheepClass
in order to show how to use the API, sound.noteStart, sound.noteStop;
Please check the code of s006MMLshepherd.py
in order to how to use the classes, pjMMLshepherdClass, pjMMLsheepClass.
Now you Can Play MML( Music Macro Language ) using "PeterJohn" app.
**3) "Edit" button at the TopRight of "ScriptsView";
so that you Can Remove any Non Required File.
Best Regards,
--Yasushi Yassun Obata
2026.0216.1434 Feb 18
the "PyRun_StringFlags() returns Nil
but PyErr_Print() outputs Empty" Problem Solved and the "opencv2.a" Removed Version;
we Changed Three Things at this time.
****1) we Solved the the "PyRun_StringFlags() returns Nil
but PyErr_Print() outputs Empty" Problem;
When you go to RunScriptView for the first time after you installed this App,
you needed to once go back to EditScriptView and then needed to go to RunScriptView again.
To Solve the "PyRun_StringFlags() returns Nil
but PyErr_Print() outputs Empty" Problem,
it was needed to once call Py_FinalizeEx() and then to call Py_Initialize() again,
Means it was needed to Re-initialize the python interpreter.
It was Hard to find this solution
'cause the error message "fopen failed for data file: errno = 2 (No such file or directory), Errors found! Invalidating cache..." has Hidden this problem for many years.
As a result, the error message "fopen failed for data file: errno = 2 (No such file or directory), Errors found! Invalidating cache..." didNot relate to
the "PyRun_StringFlags() returns Nil
but PyErr_Print() outputs Empty" Problem.
****2) we Removed "opencv2.a";
'cause you canNot use opencv Python Bindings on 'PeterJohnThreeDim'
since 'PeterJohnThreeDim' doesNot have 'NumPy'.
By removing"opencv2.a",
you Can Save 180MBytes of SSD Disk Space and downloading Time.
****3) In conjunction with the Removal of "opencv2.a",
we Removed the tutorials below at the same time.
3.1) TutorialSeason003/s001opencvMachineLearning.py
3.2) TutorialSeason003/s002videoCaptureMachineLearning.py
Please enjoy opencv Python Bindings on 'PeterJohnNumPyV4', 'PeterJohnNumPyMatplotlib' and 'PeterJohnPyTorch'.
3.3) TutorialSeason003/s003DeepLearningColorizes.py
Please enjoy opencv Python Bindings on 'PeterJohnPyTorch',
'cause it seems Richard Zhang's Image Colorization 'Caffe' model is No Longer provided.
Instead of it, Please use Richard Zhang's Image Colorization 'PyTorch' model on 'PeterJohnPyTorch'.
Best Regards,
--Yasushi Yassun Obata
2026.0119.0123 Jan 20
"tk.stopTkTimer()" BugFix and Adjusted "s04timerTest.py" Version;
in "TutorialSeason001/s04timerTest.py",
we Found a Bug that "tk.stopTkTimer()" function didNot make the stop of Timer.
We Fixed the Bug and Adjusted "s04timerTest.py" a Little
so that User Can Understand Easily How to Use
both "tk.startTimerAfterFunction()" and "tk.stopTkTimer()" functions.
And in some of "TutorialSeason001" examples,
we Added "tk.stopTkTimer()"
So that each example Can Avoid influence from the other example
which Uses Timer in the Same Projects.
And One More Thing,
at this timing,
we added Six Functions Below to "tkInter" module.
It will help you to create some of Apps which use different Font Size or different Font Color,
especially to create some of Games.
**Added Function;;
tk.setLabelFontSize(labelNodeName, fontSize)
tk.setLabelFontColor(labelNodeName, r, g, b, a)
tk.setMainLabelFontSize(fontSize)
tk.setMainLabelFontColor(r, g, b, a)
tk.setTitleLabelFontSize(fontSize)
tk.setTitleLabelFontColor(r, g, b, a)
BestRegards,
--Yasushi Yassun Obata
2025.1001.0810 10/01/2025
"TutorialSeason001/s10ThreeDimAMACE.py" 5.4inch iPhone such as iPhone13mini Available Version;
in 'RunScriptView', fourDirectionPadNode and fourButtonMousePadNode Became Bigger,
So that You Can Play the Game "All Men Are Created Equal"
on 5.4inch, 375x812 Pixel, iPhone such as iPhone13mini.
Enjoy it.
--Yasushi Yassun Obata
2025.0923.2309 09/24/2025
"Non-threading-Thread" s001python3.py Version;
"pjCommandLineTools/s001python3.py" does No Longer Use "threading.Thread" library
'cause "threading.Thread" has been UnStable on CPython3.9.9.
This is Due to the GIL, Global Interpreter Lock.
If PCE, Python C Extension, became Thread-Safe,
if GIL was Abolished,
if the "immortal objects" problem of "free Threading" was Solved,
and if CPython became Ten Times Faster than CPython3.9.9,
we might resurRect the Thread version of s001python.py.
Until the day will come,
Enjoy the "Non-threading-Thread" s001python3.py version.
One More Thing,
If you need Speed or High Performance in CPython3.9.9,
please Consider Using "PeterJohnPyTorch"
'cause MPS, MetalPerformanceShader, is Available on the "PeterJohnPyTorch".
Best Regards,
--Yasushi Yassun Obata.
2025.0920.0819 09/20/2025
Both TutorialSeason004 and TutorialSeason005 Removed Version;
Sorry, This's our Release Management Fault.
We forgot to Hide both TutorialSeason004 and TutorialSeason005 in PeterJohnV4,
Even Though Both TutorialSeason004 and TutorialSeason005 Need NumPyFeature,
Since PeterJohnV4 does Not have NumPy Feature,
User Can Use Neither TutorialSeason004 Nor TutorialSeason005.
So we Hid both TutorialSeason004 and TutorialSeason005 in PeterJohnV4.
We Apologize it and
We will Strive for Further improvement.
Best Regards,
--Yasushi Yassun Obata
2025.0913.2025 09/17/2025
'pjThreeDim' module Added Version;
We are trying to Add 'pjThreeDim' module for All the 'PeterJohn' Series
except for the App which doesNot have 'EditScript' function such as 'PeterJohnNumpyConnectFour'.
Continuing to that we added 'pjThreeDim' to PeterJohnPyTorch, PeterJohnNumPyMatplotlib, PeterJohnNumPyV4,
we added 'pjThreeDim' to PeterJohnV4.
PeterJohnV4, PeterJohnNumpyV4, PeterJohnNumpyMatplotlib and PeterJohnPyTorch
have both 'EditScript' function and 'RunScript' function.
PeterJohnNumpyConnectFour has Only 'RunScript' function.
'pjThreeDim' module provides the feature for user to create 3D Model Games.
You Can Play the game "All Men Are Created Equal" which uses 'pjThreeDim' module
from
'TutorialSeason001/s10ThreeDimAMACE.py'.
AMACE stands for 'All Men Are Created Equal'.
Best Regards,
--Yasushi Yassun Obata
2025.0908.2232 09/10/2025
"in LandScape mode, inputResultLabel, Position of Cursor BugFixed" and "Stoped PyFinalizeEx(()" Version;
(1) In LandScape mode, at the InputLabel, position of Cursor was Wrong, we Fixed the Bug at this time.
(2)we Stopped PyFinalizeEx() 'cause PyFinalizeEx() doesNot Work Well, for example, in some of situations,
some of Apps which use Thread in the LandScape mode will CRASH when it executes PyFinalizeEx().
****Ezekiel 34:3-6, GNT;
34:3 You drink the milk, wear clothes made from the wool, and kill and eat the finest sheep. But you never tend the sheep.
34:4 You have not taken care of the weak ones, healed the ones that are sick, bandaged the ones that are hurt, brought back the ones that wandered off, or looked for the ones that were lost. Instead, you treated them cruelly.
34:5 Because the sheep had no shepherd, they were scattered, and wild animals killed and ate them.
34:6 So my sheep wandered over the high hills and the mountains.
They were scattered over the face of the earth, and no one looked for them or tried to find them.
Even if you live in the evil country which Evil Emperor rules, You MustNot Lose the Hope that King Jesus comes.
--Yassun
2023.1219.2232 12/19/2023
"pjBlueTooth" Version;
Now You Can Communicate with "pjBlueTooth" on PeterJohn.
We Added "pjBlueTooth" module and "pjBlueToothClass" at this time
in order to use Apple's CoreBlueTooth on PeterJohn.
****1of2; pjBlueTooth;
This is a Basic Module to use Apple's CoreBlueTooth
on PeterJohn.
bindOpponentDeviceNamesUpdated()
bindPeripheralMgrDidReceiveWrite()
init()
selectOpponentDeviceByUUID()
sendMsgStr()
cleanUp()
****2of2; pjBlueToothClass.py
This is a Basic Class to use "pjBlueTooth" Module
on PeterJohn.
blueToothInit(self)
opponentDeviceNamesUpdated(self, opponentDeviceNamesCsvStr)
keyPress(self, eventKeySym)
peripheralMgrDidReceiveWrite(self, msgStr)
afterConnected(self)
clickFirst(self, eventNum)
****TutorialSeason001/scripts/s08pjBlueTooth.py;
This is the First Example to Show How to Use
both "pjBlueTooth" module and "pjBlueToothClass".
****Ezekiel 36:25-29, GNT;
36:25 I will sprinkle clean water on you and make you clean from all your idols and everything else that has defiled you.
36:26 I will give you a new heart and a new mind. I will take away your stubborn heart of stone and give you an obedient heart.
36:27 I will put my Spirit in you and will see to it that you follow my laws and keep all the commands I have given you.
36:28 Then you will live in the land I gave your ancestors. You will be my people, and I will be your God.
36:29 I will save you from everything that defiles you. I will command the grain to be plentiful,
so that you will Not have any more famines.
36:30 I will increase the yield of your fruit trees and your fields, so that there will be No more famines to disgrace you among the nations.
Go Forward along the Path which Holy Spirit Showed You.
--Yassun
2023.1217.2217 12/18/2023
"sqLite3" modelViewController Tutorial Arranged Version;
In the previous version, you became Able to Use "sqLite3" on PeterJohnV4.
we Arranged the "TutorialSeason004" which is Created to Learn about the Concept of ModelViewController.
#sqLite3 #modelViewController #NormalizedTable
****What we Offer you at this time.
**TutorialSeason004/scripts/s001modelViewController.py;;
This is the Same as the previous version.
the Data Model has the Horizontal Structure
and it is Shown as the Horizontal View.
but "UnNormalized Tables" are Inferior in ExtenSibiLity.
**TutorialSeason004/scripts/s002normalizedEqDetailMVC.py;;
"Normalized Tables" are Superior in ExtenSibiLity.
This Shows Even if the table was Normalized,
and Even if the table structure was Changed from Horizontal to Vertical,
you Can Get the Same Horizontal View.
It means that we Can Separate the Structure of Data Model from the Structure of View.
This is the Concept of "Model-View-Controller".
we Arranged the sourceCode just a little from the previous version
in order to make easier to Connect to the Next.
**TutorialSeason004/scripts/s003eqDetailKeyMVC.py;;
we Added this at this time.
Now "normalizedEqDetail" table doesNot have "key" column,
instead of it, it Has "keyCode" column.
Best Regards,
--Yasushi Yassun Obata
2022.1126.2048PM 11/27/2022
" PIL ( Python Imaging Library ) " and " SqLite3 " Available Version;
****What we Offer you at This Time;;
**1of4; TutorialSeason004/scripts/s005PILtest.py;;
PIL stands for Python Imaging Library.
Now You Can Use PIL on PeterJohnV4.
PIL is installed as "Pillow" Package but
is imported as "PIL".
CAUTION:
But "PIL.Image.show()" doesNot Work.
So we Used
"pjTkInter.createSprite()"
in order to Show the Destination Image
which was Created by "PIL.image.save()".
**2of4; ImageFile as the Picture;;
In " Images/->imagesWindow->Each ImageFile";;
Now You Can See ImageFile as the Picture
Not Only Image FileName.
**3of4; TutorialSeason003/scripts/s004NumPyReplacementTest.py;;
We Added "pjNumPyReplacement.py".
it is a SubSet of NumPy and Written in PurePython3.
**4of4; And One More Thing;;
SqLite3 is a Buitin Module in Python3.
and Kivy-iOS is a Python3 Interpeter
but Kivy-iOS CanNot import SqLite3.
So we Wrote PCE( Python C Extensiton ) code which uses PyImport_AppendInittab().
Now You Can Use "SqLite3" on PeterJohnV4.
and Now You Can See some of Examples which Show How to Use SqLite3 on PeterV4
As Follows.
TutorialSeason004/scripts/s001modelViewController.py and
TutorialSeason004/scripts/s002modelViewController.py;;
's001modelViewController.py' uses 'UnNormalized Tables'.
'UnNormalized Tables' are Inferior in the Extensibility.
It Needs to 'Add Columns' When it Needs to Add Some of Detail Informations.
's002modelViewController.py' uses 'Normalized Tables'.
'Normalized Tables' are Superior in the Extensibility.
It has Only to 'Insert Rows' When it Needs to Add Some of Detail Informations.
In these Two python3 script, the python3 scripts work as the Controller
bet the Model and the View.
Even these Small Examples, it Shows that
the Model Needs to be Separated from the View.
Even if the View is supposed to be Showed Horizontally,
the Model Needs to be "Normalized" as the "Normalized Tables".
****What we Modified at This Time;;
**1of2; TutorialSeason001/scripts/s00stdErrTest.py;;
Now You Can See Error Message at "Run Script" Window.
**2of2; pjCommandLineTools/scripts/s00python3.py;;
Now You Can See Error Message at "Run Script" Window.
For Example, if you Entered "1+[Enter]",
it Shows "Syntax Error" at "Run Script" Window.
****What Bugs we Fixed at this time;;
**1of1; First time Running Failed Bug;;
When you Run any Script at the First time After Installed "PeterJohnV4" App,
it Failed to Run the Script So Far.
it Needed to ReStart "PeterJohnV4" App in order to Run any Script.
After Second time Running, it has worked Well.
we Fixed this Bug at this time.
So you Can Run any Script Even at the First time After Installed "PeterJohnV4" App.
****What we Changed at this time.
**1of3; CPython Interpreter;;
we Changed CPython Interpreter
from "Python-Apple-Support Version" by BeeWare
to "Kivy-iOS Version".
**2of3; AVAudioUnitSampler;;
Now we Use AVAudioUnitSampler Directly to implement MIDI function.
So Once we Removed AudioKit.
But "AudioKit CookBook" is Awesome Library,
For Example, "Tuner" is Awesome.
So in the Future Release, we Might Use AudioKit Again.
**3of3; MIDI instrument file;;
we Changed MIDI instrument file
from "nes-syn1.EXS"
to a 'SF2' format file.
'cause "EXS" format has the Absolute File Path to the WAV file when someone created the "EXS" file,
and it Causes "load Instrument Error".
So we Changed to the 'SF2' format file.
Best Regards,
--Yasushi Yassun Obata
2022.1122.0035AM 11/22/2022
API ReFactoring Version;
****What we Offer you at this time.
****About New APIs;
we Added Three APIs,
which specify image file or audio file using the AbsolutePath,
'cause Now we Can know the AbsolutePath of image file or audio file,
using logStdEntry.bundleAppPath and logStdEntry.sandBoxProjDirPath.
**tutorialSeason001/s06spriteSandBox.py
1of5; pjTkInter.createSprite()
**tutorialSeason001/s07audioSandBox.py
2of5; pjSound.playSoundEffects()
3of5; pjSound.prepareBgm()
Also you can see the example of pjSound.playSoundEffects()
in the tutorial below.
**tutorialSeason002/s007tellMeAt.py
****And Two More Things;;
we Added Two More APIs.
**tutorialSeason002/s001calc.py;;
When you'd like to set the position of PlotView to Top,
Before showing PlotView, please set the position of PlotView to Top.
In default setting, plotView is Set to Bottom.
4of5; pjPlot.setPlotViewToTop()
5of5; pjPlot.setPlotViewToBottom()
****Removed APIs;
we Removed Six of Old APIs below.
1of6; pjTkInter.createSpriteBundle()
2of6; pjTkInter.createSpriteSandBox()
3of6; pjSound.playSoundEffectsBundle()
4of6; pjSound.playSoundEffectsSandBox()
5of6; pjSound.prepareBgmBundle()
6of6; pjSound.prepareBgmSandBox()
****Removed Tutorials;
we Removed Two of tutorials
'cause Bundle Files are Fixed Only When submitting App to iPhone AppStore,
and you CanNot Add Any Files to the Bundle Files.
**tutorialSeason001/s06spriteBundle.py
**tutorialSeason001/s07audioBundle.py
Best Regards,
--Yasushi Yassun Obata
2022.1022.1819PM 10/22/2022
some of BugFixes Version;;
****What we Offered you at this time;;
**1of6; TutorialSeason002/scripts/pjMidiKeyboardClass.py;;
we corrected the line "pj.updateMainLabel()" to "tk.updateMainLabel()".
'cause the "updateMainLabel()" function moved from "pj" module to "tk" module in the Previous Version.
**2of6; TutorialSeason002/scripts/s002midiKeyboard.py;;
we Corrected the Explanation Sentence, which is shown by the "tk.updateMainLabel()" function,
from
"pj.createRectangle() and pj.bindMotionCanvasFunction()"
to
"tk.createRectangle() and tk.bindMotionCanvasFunction()".
'cause both "createRectangle()" function and "bindMotionCanvasFunction()"
moved from "pj" module to "tk" module in the Previous Version.
**3of6; TutorialSeason002/scripts/s003startTcpServerTest.py;;
in the "afterConnected(self)" method, the UnExpected and Extra thread "Thread-2" occured.
so we Removed it by joining the thread "Thread-2".
We don't understand the reason why the "Thread-2" Occurs But we Need to Proceed.
This is the "Symptomatic Threapy".
**4of6; TutorialSeason002/scripts/pjInputRequestClientThreadBaseClass.py;;
in the "afterConnected(self)" method, the UnExpected and Extra thread "Thread-1" occured.
so we Removed it by joining the thread "Thread-1".
We don't understand the reason why the "Thread-1" Occurs But we Need to Proceed.
This is the "Symptomatic Threapy".
**5of6; TutorialSeason002/scripts/s006pipInstallTest.py;;
we Added "truncateOutFilePath()" function and modified "displayPipListResult()" function.
This was Not a Bug But it needed to list some of packages more Beautifully.
**6of6; pjCommandLineTools/scripts/s001python3.py;;
we added the line "import traceback" Before the "printException()" function.
'cause the "printException()" function uses "traceback.format_exc()" function.
Best Regards,
--Yasushi Yassun Obata
2022.1001.0143AM 10/02/2022
"python3.py" and "pip.py" Added Version;;
****What we Offer you at this time;;
**1of5;pjCommandLineTools/scripts/s001python3.py;;
Now You Can Use "PeterJohn V4" as the Command Line Version of Python3.
iPhone doesn't provide "Terminal.app" like the MacOS,
so "python3.py" is implemented as a Python3 Script.
**2of5;pjCommandLineTools/scripts/s002pip.py;;
Now You Can Use "PeterJohn V4" as the Command Line Version of Pip3.
iPhone doesn't provide "Terminal.app" like the MacOS,
so "pip.py" is implemented as a Python3 Script.
Now it supports Three Options Below.
pip install pkgName
pip uninstall pkgName
pip list
and One More Thing,
pip listPkg pkgName
'cause there are Only Nine Lines to list some of packages.
**3of5;we Separated "pj" module to the three modules of "pj", "pjTkInter" and "pjSound".
This makes Easier to port "TkInter" and "WinSound" App from the Other OS to iOS.
Or to port "pjTkInter" and "pjSound" App from iOS to the Other OS.
**4of5;we Arranged ScriptsView where you select a Script from the list of scripts,
to the three parts of "mainContents", "pjClases" and "logFiles".
This makes Easier for you to Edit and Run the pyhon3 scripts in the "mainContents".
**5of5;we Added "Command Line History" function to English Keyboard.
This helps you to enter Command, for example, on "python3.py" script or "pip.py" script
or to Calculate using "Calc.py" script.
ControlP-show Previous command in the History.
ControlN-show Next command in the History.
ControlA-Move Cursor to Head
ControlE-Move Cursor to Tail
ControlF-Move Cursor Forward
ControlB-Move Cursor Backward
That's All.
Best Regards,
--Yasushi Yassun Obata
2022.0930.0327AM 09/29/2022
"SecondTime BuiltIn Input Function Failure" BugFix Version;;
In "tutorialSeason002/s001calc.py",
We found a Bug.
For example,
if you executed,
>>>s=input('?')[Enter]
?monty[Enter]
>>>s[Enter] returns monty.
>>>t=input('?')[Enter]
?monday[Enter]
>>>t[Enter] didn't return monday though it needs to return monday.
So We Added "sys.stdin.seek(0, os.SEEK_SET)" as the Solution.
This's the important BugFix for the Users who use Buitlin Input Function.
2022.0914.0306AM 09/13/2022
'Deep Learning' Colorizes Version;;
****What we Offer you at this time;;
**tutorialSeason003/s003DeepLearningColorizes.py;;
'Deep Learning' enables Machine to Colorize some of Black and White Images.
****How to Use;
When Started Running the Script,
it takes a few mintues to download the ModelBinFile(129MBytes).
While downloading, the "touchPad" has Not Appeared yet.
After finished downloading, iPhone starts to colorize one of Black and White picture using the PreTrained Model,
and then display the colorized pictures after finished colorizing.
****Recommendation;;
the downloaded ModelBinFile (129MBytes)
Exists at the SandBoxDocumentsPath/usrLocal/opencvDnnData.
We Recommend you to BackUp the downloaded ModelBinFile to the Other place such as 'Pages' Folder using Apple 'Files.app'.
**the APIs which we Added at this time;;
pjOpenCV.setUseOpenCL()
pjOpenCV.dnnNetLoadFromFilePath()
pjOpenCV.dnnNetColorize()
****Citation;;
@inproceedings{zhang2016colorful,
title={Colorful Image Colorization},
author={Zhang, Richard and Isola, Phillip and Efros, Alexei A},
booktitle={ECCV},
year={2016}
}
@article{zhang2017real,
title={Real-Time User-Guided Image Colorization with Learned Deep Priors},
author={Zhang, Richard and Zhu, Jun-Yan and Isola, Phillip and Geng, Xinyang and Lin, Angela S and Yu, Tianhe and Efros, Alexei A},
journal={ACM Transactions on Graphics (TOG)},
volume={9},
number={4},
year={2017},
publisher={ACM}
}
2022.0911.2114PM 09/12/2022
the "General UnNamed Variable Version";;
This was a Small Bug Fix in the original motivation.
In the "tutorialSeason002/s001calc.py",
For example, after you exectuted "1+1[Enter]", if you executed "s[Enter]", it returns "2".
This was a Curious and Strange result.
The Cause was that we used "s" as the Working Variable Name.
Now "PeterJohn V4" uses the General UnNamed Variable "_", UnderScore, as the Working Variable Name.
So This gives you guys the SideEffect Below.
****What we Offered you at this time;;
In the "tutorialSeason002/s001calc.py",
Now you Can Get the Most Recently Evaluated Value Using "_" ( UnderScore ).
For example, after you exectuted "1+1[Enter]", if you executed "_[Enter]", it returns "2".
2022.0830.1251PM 08/30/2022
Builtin input() Function Available Version;;
****What we Offer you at this time;;
**tutorialSeason002/s001calc.py;;(Updated Version);;
**1of2;; 'PeterJohn V4' now has Supported Builtin input() Function.
This enables you to Create CUI, Character User Interface, Application
Now you Can Create your CUI App such as "Monty Python's Flying Circus" example in the manual of CPython.
This was the Difficult Problem to Solve it for long time 'cause
Python for iOS ( Python-Apple-Support ) doesn't support "Curses" library and "Readline" Module,
it seems we canNot to get the pointer to the Two functions,
"PyOS_ReadlineFunctionPointer" and "PyOS_InputHook".
But, Finally, we Did it.
Perhaps, you might be able to use this builtin input() function to train your programming skills
for the some of programming Competitions.
**2of2;; we Abolished "Calc" Key and "Assign" Key from English Keyboard.
Now we Integrated all three keys, "Calc", "Assign" and "Enter" to the One "Enter" Key.
**APIs which we Added at this time;;
**pjPlot.hide();;
this Enables to Hide PlotView by touching "Enter" Key.
so Now you don't Need to go back to "Edit Script" Window.
**pj.setIntegratedEnterKeyApp();;
"Simple Enter Key App"s such as
"tutorialSeason002/s003startTcpServerTest.py" or
"tutorialSeason002/s004startTcpInputResultServer.py"
don't use EnterKey as the "Calc" Key or "Assign" Key.
In the "Simple Enter Key App", Without going through "eval()" function or "exec()" function,
Typed String is Directly Passed.
To Protect "Simple Enter Key App", we prepared this function.
If you don't Set your App as the integrated EnterKey App, it's "Simple Enter Key App".
**pj.setInputHistoryApp();;
"PeterJohn V4" uses titleLable to display the Input History.
If you don't Set your App as InputHistory App, the titleLabel of your App is Protected.
**pj.moveInputFieldToTop();;
this Moves InputPromptLabel and InputResultLabel from the Bottom of Screen to the Top of Screen
in order to Create Space to display the History of the Input Prompts and Input Results, the Evalutated Values and the Printed Values.
**pj.moveInputFieldToBottom();;
this Moves InputPromptLabel and InputResultLabel from the Top of Screen to the Bottom of Screen.
in order to Create Space to display the mainLabel which is Used to give some of Explanations to users.
2022.0829.1343PM 08/29/2022
"pip.whl" Added Version;
we Apologize that we forgot to Add "pip.whl".
Now you Can Use "pip".
Please Check "pjCommandLineTools/scripts/s002pip.py".
Best Regards,
--Yasushi Yassun Obata
more Version 2026.0518.2019 May 18
Data Not Collected The developer does not collect any data from this app.