Click on the web disk to download the project source code and files

Originally the chairman of the Student Union, he was so excellent in school, but he still showed his strong side after graduation.

Serious work every day, even in the work should also be used to charge their own, so it is inevitable to ignore his girlfriend, not enough care, temper, and even quarrel.

One day, a programming teacher in the university taught him a way to use Python to send messages to his girlfriend at different times every day and to know her emotional index in real time.

He was a man of science and became interested immediately. But he didn’t learn programming well at that time. He thought it would be difficult for him to realize it, and there was still a lot of work to do.

Teacher: Python is not difficult, teach you a few days, and then give you the code and corresponding files, it is very easy to learn, this will not only make your girlfriend happy, you can also access this very powerful programming language, if you can learn it, it will be very good for your work.

So he started trying to learn it for a few days. He didn’t expect to learn the basics of Python, especially the ability to flirt with his girlfriend every day.

Below, I give you with a simple tutorial of this function, and the source code below, try it, very interesting.

First, the demo screenshot

My programming ideas

First, we set up a config.ini configuration file from which we start reading information.

If you want, add something else to the time judgment above to make your girlfriend happier!

Then, open the wechat robot, for the robustness of the program, automatically judge the operating system, according to different operating systems to execute different instructions.

After setting up the relevant parameters, we will learn again, how to teach his girlfriend to learn English every day

Only daily greetings and festival greetings are not enough, we must always know her mood index, here can use snowNlp or jieba to do analysis, but in order to make the program as small as possible when packaging into exe executable file, we adopt direct call interface to do it.

Part of the code is as follows:

After teaching my girlfriend English, I began to send her our expressions of concern. This involves the wXPY module related operations, very simple.

Then, there’s the question of how to send a message of concern to your girlfriend at the same time every day. Start with a while loop, 365 days of unlimited care

Finally, enter the following code to start flirting mode ~