Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How SimpleGUICS2Pygame replaces simplegui

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about how SimpleGUICS2Pygame is an alternative to simplegui. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

Simplegui:

Simplegui is not a standard Python module. It is a module that provides gui support in an open source project Codeskulptor.

Codeskulptor is based on javascript and can translate python programs to run directly in browsers. Rice University is in coursera.

The basic courses of python are taught on Codeskulptor platform, and students are free to write them on Codeskulptor.

Store and share python programs. In order to use simplegui locally, we need to replace simplegui with SimpleGUICS2Pygame.

The Codeskulptor platform needs to be used. In order to run the simplegui examples in the course locally, I found many methods. Due to the lack of understanding of the cmd command, I tried various methods by myself, and finally successfully installed SimpleGUICS2Pygame after consulting the materials of all parties.

During the operation, all installation packages are 32-bit versions (packaged and uploaded to the download center)

Install SimpleGUICS2Pygame under win10

First, go to Windows\ system32 and run cmd.exe as an administrator

Cd/ return to the root directory

G: / / enter the directory where the files to be installed are stored

Step 1: install pip (pip is included in the Python27.x version or above. If not, install one in the Python\ Scripts directory)

C:\ Python27\ Python-m pip install-U pip / / upgrade pip

C:\ Python27\ Scripts\ pip install-U setuptools / / install setuptools

Ensure that after the above two steps are completed, proceed to the next step.

Step 2: install pygame

C:\ Python27\ Python pygame-1.9.2a0-cp27-none-win32.whl / / install in the same directory as Pygame

Step 3: to install matplotlib under matplotlib,windows, you need to add setuptools, numpy and python-dateutil

Pytz, pyparsing and six module (setuptools has been installed in step 1, other module I follow the following

The reader can also install it according to the above method)

Installation can be performed directly in exe format

Install in whl format by entering the following command:

C:\ Python27\ Scripts\ pip install six-1.9.0-py2.py3-none-any.whl

Extract the msvcp71.dll and drag the others to the c:\ windows\ system32 directory. (some systems are not required)

Finally install matplotlib

Test whether the matplotlib installation is successful after all module installations are completed

C:\ Python27\ Python

> > import matplotlib

> > exit ()

Step 4: extract the SimpleGUICS2Pygame, find the SimpleGUICS2Pygame_check.py file and execute it

C:\ Python27\ Python SimpleGUICS2Pygame_check.py / / check whether the modele required by SimpleGUICS2Pygame is complete

Step 5: install SimpleGUICS2Pygame

C:\ Python27\ Scripts\ pip install SimpleGUICS2Pygame / / install

C:\ Python27\ Scripts\ pip install SimpleGUICS2Pygame-- upgrade / / check for updates

Step 6: write a paragraph of Mini Program to try (the personal test is successfully executed under Pycharm)

Import SimpleGUICS2Pygame.simpleguics2pygame as simplegui

# Event handler

Def tick ():

Print "tick"

# Register handler

Timer = simplegui.create_timer (100, tick)

# Start timer

Timer.start ()

After reading the above, do you have any further understanding of how SimpleGUICS2Pygame replaces simplegui? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report