猫史档案馆


【Python作品分享】cmd

用户:wrmdcxywrmdcxy查看:75 回复:21 评论:75 创建时间:2020-02-19T20:06:38


【作品展示】

center_image

 

【作品介绍】

Windows命令提示符

 

【作品源代码】

import os,sys

print('Microsoft Windows[版本 10.0.18363.592]')
print('(c) 2019 Microsoft Corporation。保留所有权利。')
while True:
    command=input('C:\\Users>')
    if command.lower().replace('-f','-s')=='taskkill -s -t cmd.exe':
        os.system('cls')
        sys.exit(0)
    else:
        os.system(command)

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
wrmdcxywrmdcxy

cmd=cmd

点赞0


评论


TobylaiTobylai

呵呵

cmd

不被屏蔽

点赞0


评论


wrmdcxywrmdcxy

试试,cmd

点赞0


评论


wrmdcxywrmdcxy

html

点赞0


评论


liuzhiyuliuzhiyu

 

html

 

点赞0


评论


星空之忆星空之忆

看一下我的帖子好吗?https://shequ.codemao.cn/community/249295(不是广告,但是似乎都没有人看我的帖子)

点赞0


评论


Hello_eosHello_eos

我电脑自带的cmd他不香吗

点赞0


评论


Hello_eosHello_eos

对了,香喵腿堡真香

点赞0


评论


wrmdcxywrmdcxy

香辣不愧是香辣啊,嗯!香辣是真的好吃!再来一份香辣堡,顺便帮我的香辣搞点香辣专用汁!

点赞0


评论


泠尘晓泠尘晓

我不在的时候发生了什么!!!!

 

点赞0


评论


liuzhiyuliuzhiyu

cmd

点赞0


评论


opjest_Redstoneopjest_Redstone

import 喵oswin10
win.forty(#0001ccc)

点赞0


评论


Hello_eosHello_eos

香辣腿不愧是香辣腿啊,嗯!香辣腿是真的好吃!再来一份香辣腿堡,顺便帮我的香辣腿搞点香辣腿专用汁!

点赞0


评论


wrmdcxywrmdcxy

程序更改:

import os,sys,getpass

name=getpass.getuser()
os.chdir('C:\\Users\\'+name)
print('Microsoft Windows[版本 喵]')
print('(c) 2019 Microsoft Corporation。保留所有权利。')
while True:
    command=input('C:\\Users\\%s>'%(name))
    if command.lower()=='taskkill -t -im cm d.exe -f':#此处空格防屏蔽
        os.system('cls')
        sys.exit(0)
    else:
        os.system(command)

点赞1


评论


梦里觅深海梦里觅深海

厉害

点赞0


评论


opjest_Redstoneopjest_Redstone

//一个简单的射击PvP
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
entity.player.onPress(({ button, raycast:{ hitEntity, direction } }) => {
if (button !== 'action0' || !hitEntity) {
return;
}
hitEntity.velocity.x += direction.x;
hitEntity.velocity.y += 0.5;
hitEntity.velocity.z += direction.z;
hitEntity.hurt(2 * Math.random() + 1, {
attacker: entity,
});
});
});

world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' killed ' + entity.player.name)
}
entity.player.forceRespawn();
});
undefined;
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "cangshu") {x.say("指定说问问句")}});
//快捷PVP

点赞0


评论


tq_xyytq_xyy

我发现一段代码可以无缝调用命令行,

import os
a = 'c'+'m'+'d' #本来不用怎么麻烦,但怕屏蔽。
os.system('%s.exe' % a)

像真的命令提示符。

点赞1


评论


蒟蒻OIer1048576蒟蒻OIer1048576

import os,sys

print('Microsoft Windows[版本 10.0.18363.592]')
print('(c) 2019 Microsoft Corporation。保留所有权利。')
while True:
    command=input('C:\\Users>')
    if command.lower().replace('-f','-s')=='taskkill -s -t cm'+'d.exe':
        os.system('cls')
        sys.exit(0)
    else:
        os.system(command)

点赞0


评论


Hello_eosHello_eos

import os,sys

print('Microsoft Windows[版本 10.0.18363.592]')
print('(c) 2019 Microsoft Corporation。保留所有权利。')
    while True:
        command=input('C:\\Users>')
        if command.lower().replace('-f','-s')=='taskkill -s -t cmd.exe':
            os.system('cls')
            sys.exit(0)
        else:
            os.system(command)

点赞0


评论


蒟蒻OIer1048576蒟蒻OIer1048576

print(' '.join(['{i}*{j}={pro}'.format(i=i,j=j,pro=i*j) for i in range(1,10) for j in range(1,10) if i>=j]))

点赞0


评论


無一郎無一郎

看不懂

点赞0


评论