Code Monkey home page Code Monkey logo

command-prompt-py's People

Contributors

mamiiblt avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

calonz

command-prompt-py's Issues

Continuous prompting;

First we create a variable. I named it "commandRequire". Then I set my variable as integer type and gave the value 0. In their code, I wanted them to do a certain action until "commandRequire" was 1 (or something else). In this case, any code I write to the loop will always be repeated. I also asked the user to write an article. If the text it writes is equal to the articles I want, it performs the necessary function.

File Save System

In this project, "os" library is used to save language files.

language = str("default")
language2 = str("default")
language3 = str("default")

settingsFileWrite2 = open("langaugeSettings.mqs", "a")
settingsFileWrite2.write("")
settingsFileWrite2.close()

settingsFileRead = open("langaugeSettings.mqs","r")
language2 = settingsFileRead.read()
language = settingsFileRead.read()
settingsFileRead.close()

if (language2 != "tr_TR") and (language2 != "en_US"):
    language = input("PYC >>> Lütfen Dilinizi Giriniz - Please Enter Language (tr_TR veya en_US) (tr_TR or en_US) >>> ")
    language2 = language

    settingsFileWrite = open("langaugeSettings.mqs", "w")
    settingsFileWrite.write(language)
    settingsFileWrite.close()

    ctypes.windll.user32.MessageBoxW(0, "Restart the program to save the changes. - Değişikliklerin kaydedilmesi için programı yeniden başlatınız.", "Warnings - Uyarı", 1)
    quit()

First, we create our language variables. (language1, language etc.) (I used extra variables unnecessarily), Then we create our file in the required location, we will create the file with the "a" method, and it will close the file without writing any text. Then it reads the text in "r" (read) mode and puts it into language2 and language variable. If there is no "tr_TR" or "en_US" phrase in the variables, it executes the command to ask the language again. If the conditions are met, it takes the necessary actions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.