Skip to content

Commit 44286ee

Browse files
committed
last commit before switch to sdl git
1 parent fe5a572 commit 44286ee

2 files changed

Lines changed: 34 additions & 11 deletions

File tree

scripts/make_coldstartfs.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ FS=$PYTHONPYCACHEPREFIX/fs
1212
$HPY -v <<END 2>&1 |grep py$ > $FS
1313
import sys, os, json, builtins, shutil, zipimport, tomllib, time
1414
import trace, traceback, asyncio, inspect, _thread, importlib
15-
sys.stdout.reconfigure(encoding='utf-16')
1615
import ctypes
16+
sys.stdout.reconfigure(encoding='utf-16')
17+
18+
#pymunk tests
19+
import unittest, locale
20+
1721
#pymunk4
18-
import imp
19-
#pymunk4 ( but really not usefull)
20-
import platform
22+
import imp, platform
23+
24+
#pymunk6
25+
import numbers, random
2126
2227
#pgzero
2328
import hashlib, queue, pkgutil
2429
2530
#numpy
2631
import pathlib
2732
28-
29-
#pymunk6
30-
import numbers, random
31-
#pymunk tests
32-
import unittest, locale
33-
3433
# cffi
3534
import copy
35+
3636
if 0:
3737
import cffi
3838
from cffi import FFI
@@ -70,7 +70,7 @@ mkdir -p $PYTHONPYCACHEPREFIX/stdlib-coldstart
7070
pushd $PYTHONPYCACHEPREFIX/stdlib-coldstart
7171
tar xvf $PYTHONPYCACHEPREFIX/stdl.tar | wc -l
7272
rm $PYTHONPYCACHEPREFIX/stdl.tar
73-
du -hs $PYTHONPYCACHEPREFIX/stdlib-coldstart/python3.11
73+
du -hs $PYTHONPYCACHEPREFIX/stdlib-coldstart/python3.??
7474
popd
7575

7676

support/pythonrc.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,29 @@ def ls(cls, *argv):
212212
for out in os.listdir(arg):
213213
print(out)
214214

215+
@classmethod
216+
def clear(cls, *argv,**kw):
217+
import pygame
218+
screen = pygame.display.set_mode()
219+
screen.fill( (0, 0, 0) )
220+
pygame.display.update()
221+
222+
@classmethod
223+
def display(cls,*argv,**kw):
224+
import pygame
225+
if not len(argv):
226+
surf = _
227+
else:
228+
if argv[-1].lower().endswith('bmp'):
229+
surf = pygame.image.load_basic( argv[-1] )
230+
else:
231+
surf = pygame.image.load_( argv[-1] )
232+
233+
screen = pygame.display.set_mode()
234+
screen.blit( surf, (1,1) )
235+
pygame.display.update()
236+
237+
215238
@classmethod
216239
def pgzrun(cls, *argv):
217240
global pgzrun

0 commit comments

Comments
 (0)