如何将python程序转换为真正的程序

时间:2015-09-13 11:10:58

标签: python

我想要它不要求PYTHON运行!

所以,我一直在玩Python,并为UUID转换器制作一个Minecraft用户名的脚本。

我的问题是如何将其转换为实际程序,并使其无法查看其中的代码。

这是我的代码:

import urllib.request
import json
import os
file = open('uuid.txt', 'w')
username = input("Insert a username: ")
url = "https://api.mojang.com/users/profiles/minecraft/" + username
rawdata = urllib.request.urlopen(url)
newrawdata = rawdata.read()
jsondata = json.loads(newrawdata.decode('utf-8'))
uuid = jsondata['id']
os.system('cls' if os.name == 'nt' else 'clear')
print ("Username = " + username)
print ()
print ("UUID = " + uuid)
print ()
print ("Username and UUID have been printed to a file called uuid.txt")
print ()
file.write("Username: " + username + " UUID: " + uuid)
input('Press ENTER to exit')

0 个答案:

没有答案