python开发中级_针对中级Python开发人员的13个项目构想

python开发中级

Learning the basics of Python is a wonderful experience. But the euphoria of just learning can be replaced by the hunger for hands-on projects. It’s normal to want to build projects, hence the need for project ideas.

学习Python的基础知识是一次很棒的经历。 但是,对于动手项目的渴望可以代替仅仅学习的欣快感。 想要构建项目是正常的,因此需要项目创意。

The problem though is that some projects are either too simple for an intermediate Python developer or too hard. This article will suggest projects you can work on as an intermediate Python developer. These project ideas will provide the appropriate level of challenge for you.

但问题是,对于中级Python开发人员而言,有些项目太简单了,或者太难了。 本文将建议您作为中级Python开发人员可以从事的项目。 这些项目构想将为您提供适当级别的挑战。

In this article, you’ll learn:

在本文中,您将学习:

  • The importance of building projects
  • The major platforms you can build projects for
  • Thirteen project ideas you can work on
  • Some tips for working on projects
  • 建设项目的重要性
  • 您可以为其构建项目的主要平台
  • 您可以处理的十三个项目构想
  • 有关项目的一些提示

Free Bonus: 5 Thoughts On Python Mastery, a free course for Python developers that shows you the roadmap and the mindset you’ll need to take your Python skills to the next level.

免费奖金: 关于Python精通的5个想法 ,这是针对Python开发人员的免费课程,向您展示了将Python技能提升到新水平所需的路线图和心态。

建筑项目的重要性 (The Importance of Building Projects)

Working on projects is vital to pushing your career as a Python developer forward. They make you apply the skills and knowledge you’re acquiring.

项目工作对于推动您作为Python开发人员的职业发展至关重要。 它们使您可以应用所学的技能和知识。

Projects can help you:

项目可以帮助您:

  • Build confidence: You will believe more in your ability to create software regardless the level of complexity.

  • Explore other technologies: You will learn about other technologies needed in building a complete product such as databases, servers, and other languages.

  • Understand programming concepts better: You will learn to write code better and understand concepts such as design patterns and object-oriented programming.

  • Experience a complete software development life cycle: You will learn how to plan before writing code, manage the coding process and update software.

  • 建立信心 :无论复杂程度如何,您都会更加相信自己的软件开发能力。

  • 探索其他技术 :您将学习构建完整产品所需的其他技术,例如数据库,服务器和其他语言。

  • 更好地理解编程概念 :您将学习更好地编写代码,并理解诸如设计模式和面向对象编程之类的概念。

  • 体验完整的软件开发生命周期 :您将学习如何在编写代码之前进行计划,管理编码过程以及更新软件。

There is a lot to gain from building projects as a Python developer.

作为Python开发人员构建项目有很多收获。

选择项目平台 (Choosing a Project Platform)

You need to build your software to run on a platform so that people who lack certain technical knowledge can use your software. The web, desktop, and command-line are the three major platforms you’ll want to build your projects for.

您需要构建在平台上运行的软件,以便缺乏某些技术知识的人可以使用您的软件。 Web,桌面和命令行是您要为其构建项目的三个主要平台。

网页 (Web)

Web applications are applications that run on the web, they can be accessed on any device without being downloaded, provided there is access to the internet. If you want your projects to be accessible by everyone with internet access, it needs to be a web application.

Web应用程序是在Web上运行的应用程序,只要可以访问Internet,就可以在任何设备上访问它们而无需下载它们。 如果您希望所有人都能访问您的项目,则它必须是一个Web应用程序。

A web application has a back end and front end. The back end is the part where the business logic is: your back-end code will manipulate and store data. The front end is the interface of the application: your front-end code will determine the look of a web application.

Web应用程序具有后端和前端。 后端是业务逻辑所在的部分:您的后端代码将操纵和存储数据。 前端是应用程序的界面:您的前端代码将确定Web应用程序的外观。

As an intermediate Python developer, your major focus will be the back-end code. However, the front-end code is important too, so you will need some knowledge of HTML, CSS, and maybe JavaScript to create a simple-looking interface. Just the basics will be enough.

作为Python的中级开发人员,您的主要重点将是后端代码。 但是,前端代码也很重要,因此您将需要一些HTML,CSS甚至JavaScript知识,才能创建一个简单的界面。 仅仅基础就足够了。

Another option is to use Python for both the front end and back end. Thanks to the anvil library, which eliminates the need for HTML, CSS, and JavaScript, you can focus on Python code alone.

另一种选择是将Python用于前端和后端。 由于有了anvil库,它消除了对HTML,CSS和JavaScript的需求,因此您可以仅关注Python代码。

You can build web applications with Python through web frameworks such as django and flask. The list of frameworks for building web applications using Python is long. There are plenty to choose from, but django and flask remain the most popular web frameworks.

您可以通过djangoflask等Web框架使用Python构建Web应用程序。 使用Python构建Web应用程序的框架列表很长。 有很多选择,但是djangoflask仍然是最受欢迎的Web框架。

桌面GUI (Desktop GUI)

Every time you perform a task on your PC, be it a desktop or laptop, it is through an application. As an intermediate Python developer, you can make your own desktop applications.

每当您在台式机或笔记本电脑上的PC上执行任务时,都是通过应用程序进行的。 作为中级Python开发人员,您可以制作自己的桌面应用程序。

You do not have to learn any front-end technology to create your own Graphical User Interface (GUI) applications, as you saw with web applications. You can build all the parts using Python.

您无需学习任何前端技术即可创建自己的图形用户界面(GUI)应用程序,就像在Web应用程序中看到的那样。 您可以使用Python构建所有零件。

There are frameworks for building your desktop applications. PySimpleGUI is one of them, and it’s pretty user-friendly for an intermediate Python developer.

有用于构建桌面应用程序的框架。 PySimpleGUI是其中之一,对于中级Python开发人员而言,它非常用户友好。

An advanced GUI framework like PyQt5 is quite powerful, but it may have a steep learning curve.

PyQt5这样的高级GUI框架非常强大,但是学习曲线可能比较陡峭。

The software you create for the Desktop GUI is able to work on any of the Windows, Linux, or Mac operating systems. All you have to do after creating the project is compile it to an executable for your operating system of choice.

您为Desktop GUI创建的软件可以在任何Windows,Linux或Mac操作系统上运行。 创建项目后,您要做的所有事情就是将其编译为所选操作系统的可执行文件。

命令行 (Command-Line)

Command-line applications are those applications that work in a console window. This is the command prompt on Windows and the Terminal on Linux and Mac.

命令行应用程序是在控制台窗口中工作的那些应用程序。 这是Windows上的命令提示符,Linux和Mac上的终端。

You’d click to use a web or GUI application, but you’d type in commands for command-line applications. Users of command-line applications need to have some technical knowledge since they’ll need to use commands.

您将单击以使用Web或GUI应用程序,但要键入命令行应用程序的命令。 命令行应用程序的用户需要掌握一些技术知识,因为他们需要使用命令。

Command-line applications may not be as beautiful or easy to use as web or GUI applications, but that doesn’t make them less powerful than web or GUI applications.

命令行应用程序可能不如Web或GUI应用程序那么漂亮或易于使用,但这并没有使它们比Web或GUI应用程序更强大。

You can improve the look of your command-line applications by applying colors to the text. There are libraries you can use for coloring, such as colorama and colored. You can spice things up and use some color.

您可以通过将颜色应用于文本来改善命令行应用程序的外观。 有一些可用于着色的库,例如coloramacolored 。 您可以使事情变得有趣,并使用一些颜色。

You can use frameworks such as docopt, argparse, and click to build your applications.

您可以使用诸如docoptargparse框架,然后click来构建您的应用程序。

网络项目的想法 (Web Project Ideas)

In this section, you’ll see project ideas for the web. These project ideas can be classified as utility and education tools.

在本节中,您将看到网络上的项目创意。 这些项目构想可以归类为实用工具和教育工具。

Here are the project ideas:

以下是项目构想:

  • Content Aggregator
  • Regex Query Tool
  • URL Shortener
  • Post-It Note
  • Quiz Application
  • 内容汇总器
  • 正则表达式查询工具
  • URL缩短器
  • 便利贴
  • 测验申请

内容汇总器 (Content Aggregator)

Content is king. It exists everywhere on the web, from blogs to social media platforms. To keep up, you need to search for new information on the internet constantly. One way to stay updated is to check all the sites manually to see what the new posts are. But this is time consuming and quite tiring.

内容为王。 从博客到社交媒体平台,它在网络上无处不在。 为了跟上步伐,您需要不断在互联网上搜索新信息。 保持更新的一种方法是手动检查所有站点以查看新帖子。 但这很耗时,而且很累。

This is where the content aggregator comes in: A content aggregator fetches information from various places online and gathers all of that information in one place. Therefore, you don’t have to visit multiple sites to get the latest info: one website is enough.

这就是内容聚合器出现的地方:内容聚合器从各个地方在线获取信息,并将所有这些信息收集在一个地方。 因此,您不必访问多个站点即可获取最新信息:一个网站就足够了。

With the content aggregator, all of the latest information can be gotten from one site that aggregates all the content. People can see the posts that interest them and can decide to find out more about them without traipsing all over the internet.

使用内容聚合器,可以从聚合所有内容的一个站点获取所有最新信息。 人们可以看到他们感兴趣的帖子,并且可以决定查找更多关于它们的信息,而无需遍历整个Internet。

Examples of Content Aggregators

内容汇总器示例

Here are some implementations of the Content Aggregator idea:

以下是Content Aggregator创意的一些实现:

Technical Details

技术细节

The main objective of this project idea is to aggregate content. First, you need to know what sites you’ll want the Content Aggregator to get content from. Then, you can use libraries such as requests for sending HTTP requests and BeautifulSoup to parse and scrape the necessary content from the sites.

该项目构想的主要目标是汇总内容。 首先,您需要知道您希望Content Aggregator从哪些站点获取内容。 然后,你可以使用库,比如requests发送HTTP请求和BeautifulSoup解析和刮从网站的必要的内容。

Your application can implement its content aggregation as a background process. Libraries such as celery or apscheduler can help with that. You can try out apscheduler. It’s great for small background processes.

您的应用程序可以将其内容聚合实现为后台进程。 诸如celeryapscheduler图书馆可以帮助您解决此问题。 你可以尝试apscheduler 。 这对于小型后台进程非常有用。

After scraping content from various sites, you’ll need to save it somewhere. So, you’ll use a database to save the scraped content.

从各个站点抓取内容后,您需要将其保存在某处。 因此,您将使用数据库来保存抓取的内容。

Extra Challenge

额外挑战

For a tougher challenge, you can add more websites. This will help you learn how to study and extract information from websites.

如果遇到更严峻的挑战,您可以添加更多网站。 这将帮助您学习如何研究网站中的信息并从中提取信息

You can also have users subscribe to certain sites that you aggregate. Then, at the end of the day, the content aggregator will send the articles for that day to the email address of the user.

您还可以让用户订阅您聚合的某些站点。 然后,在一天结束时,内容聚合器会将当天的文章发送到用户的电子邮件地址。

正则表达式查询工具 (Regex Query Tool)

You and I deal with text daily. This article, which is also text, has a structure. This makes it easier for you to understand. Sometimes, you need to find certain information in text, and using the regular search tool in text editors can be ineffective.

您和我每天都处理文本。 本文也是文本,具有结构。 这使您更容易理解。 有时,您需要在文本中查找某些信息,而在文本编辑器中使用常规搜索工具可能会无效。

This is where the Regex Query Tool comes in. A regex is a set of strings, so the regex query tool will check for the validity of the queries. When the regex matches patterns in the text, it tells the user and highlights the matched patterns. So, your Regex Query Tool will check the validity of the regex strings passed in by the user.

这是Regex查询工具出现的地方。regex是一组字符串,因此regex查询工具将检查查询的有效性。 当正则表达式与文本中的模式匹配时,它会告诉用户并突出显示匹配的模式。 因此,您的Regex查询工具将检查用户传递的regex字符串的有效性。

With the Regex Query Tool, users can quickly check the validity of their regex strings on the web. This makes it easier for them, instead of having to check the strings with a text editor.

使用正则表达式查询工具,用户可以在Web上快速检查其正则表达式字符串的有效性。 这使他们更轻松,而不必使用文本编辑器检查字符串。

Examples of Regex Query Tools

正则表达式查询工具示例

Here are some implementations of the Regex Query Tool idea:

以下是Regex查询工具提示的一些实现:

Technical Details

技术细节

The main objective of this type of project is to tell the user the validity of the inputted query strings. You can make it give a positive or negative response such as Query String Is Valid and Query String Is Invalid, implementing the positive response in green and the negative in red.

这类项目的主要目的是告诉用户输入的查询字符串的有效性。 您可以使其给出肯定或否定的响应,例如“ Query String Is Valid和“ Query String Is Invalid ,以绿色实现正响应,以红色实现负响应。

You don’t have to implement the query tool from scratch. You can use Python’s standard re library, which you can use to run the query strings on the inputted text. The re library will return None when the query string matches nothing, and it’ll return the matched strings when positive.

您不必从头开始实施查询工具。 您可以使用Python的标准re库,该库可用于对输入的文本运行查询字符串。 当查询字符串不匹配时, re库将返回None当查询字符串为正时,它将返回匹配的字符串。

Some users may not understand regex fully, so you can make a page to explain how regex works. You can make documentation that is interesting enough to keep the users excited about learning and understanding regex.

有些用户可能不完全了解regex,因此您可以制作一个页面来解释regex的工作方式。 您可以制作足够有趣的文档,以使用户对学习和理解正则表达式感到兴奋。

Extra Challenge

额外挑战

Making a project that just returns the validity of the regex is fine. But you can also add a replacement feature. This means the application will check for the validity of the regex and also allow users to replace the matched strings with something else. So the tool is no longer a find tool but also a replace tool.

制作一个仅返回正则表达式有效性的项目就可以了。 但是您也可以添加替换功能。 这意味着应用程序将检查正则表达式的有效性,并且还允许用户用其他内容替换匹配的字符串。 因此,该工具不再是查找工具,而是替换工具。

URL缩短器 (URL Shortener)

URLs can be extremely long and not user-friendly. When people share links or even try to remember a URL, it’s difficult because most URLs are filled with more difficult characters and don’t form meaningful words.

URL可能非常长,而且不友好。 当人们共享链接或什至试图记住URL时,这很困难,因为大多数URL充满了更困难的字符并且没​​有形成有意义的词。

This is where the URL Shortener comes in. A URL Shortener reduces the characters or letters in a URL, making them easier to read and remember. A URL like xyz.com/wwryb78&svnhkn%sghq?sfiyh can be shortened to xyz.com/piojwr.

这就是URL Shortener的用处。URLShortener减少了URL中的字符或字母,使它们更易于阅读和记住。 喜欢的URL xyz.com/wwryb78&svnhkn%sghq?sfiyh可缩短至xyz.com/piojwr

With the URL Shortener, URLs become a joy to work with.

使用URL Shortener,URL成为一种令人愉快的工作方式。

Examples of URL Shorteners

URL缩短器的示例

Here are some implementations of the URL Shortener idea:

以下是URL Shortener思想的一些实现:

Technical Details

技术细节

The main objective of this project idea is to shorten URLs. The main task the application will accomplish is to shorten URLs and then redirect users to the original URL when the shortened URL is visited.

该项目构想的主要目的是缩短URL。 应用程序将完成的主要任务是缩短URL,然后在访问缩短的URL时将用户重定向到原始URL。

In the application, the users will input the original URL, and they will get the new, shortened URL as the result. To do this, you can use a combination of the random and string modules to generate the characters for the shortened URL.

在应用程序中,用户将输入原始URL,然后他们将获得新的,缩短的URL。 为此,您可以结合使用randomstring模块来为缩短的URL生成字符。

Since users will visit the shortened URL days, months, or even years after, you’ll need to save the original and shortened URLs in a database. When a request comes in, the application checks if the URL exists and redirects to the original, or else it redirects to a 404 page.

由于用户将在几天,几个月甚至几年后访问缩短的URL,因此您需要将原始的和缩短的URL保存在数据库中。 收到请求时,应用程序将检查URL是否存在并重定向到原始URL,否则将重定向到404页面。

Extra Challenge

额外挑战

Generating a shortened URL with random characters makes for a better URL than the long, random ones. But, you can make the result better for the users. You can add a feature to customize URLs, so the users can customize the generated URLs themselves.

与随机的长URL相比,生成带有随机字符的缩短的URL可以提供更好的URL。 但是,您可以为用户带来更好的结果。 您可以添加自定义URL的功能,以便用户可以自定义生成的URL。

Without a doubt, a custom xyz.com/mysite URL is better than a randomly generated xyz.com/piojwr URL.

毫无疑问,自定义xyz.com/mysite URL比随机生成的xyz.com/piojwr URL更好。

便利贴 (Post-It Note)

It’s human to have many thoughts and ideas in a day, but it’s also human to forget. One way to work around forgetting things is to jot them down before they disappear into thin air. While some of forgotten thoughts and ideas may be trivial, some can be quite powerful.

一天中有许多想法和想法是人类的工作,但忘记也是人类的工作。 解决遗忘问题的一种方法是在它们消失在稀薄的空气中之前先将它们记下来。 尽管一些被遗忘的思想和观念可能是微不足道的,但有些却可能非常有力。

This is where a Post-It note comes in: A Post-It note is a small paper with low-tack adhesive at the back, making it attachable to surfaces such as documents, walls. Post-It notes make it easier to jot things down. The Post-It note project idea is something similar. It allows users to jot things down, making them accessible anywhere, since it’s a web application.

这就是便利贴的来源:便利贴是一种小纸,背面带有低粘性粘合剂,可粘贴到文档,墙壁等表面上。 便利贴可让您轻松记笔记。 便利贴项目的构想与此类似。 它是一个Web应用程序,它使用户可以记下所有内容,使其可以在任何地方访问。

With the Post-It note, people can now jot things down anywhere, without the fear of forgetting things or misplacing the notes—which is a possibility with physical notes.

有了便利贴,人们现在可以在任何地方记下东西,而不必担心忘记东西或放错地方—物理笔记是有可能的。

Examples of Post-It Notes

便笺示例

Here are some implementations of the Post-It Note idea:

这是便利贴想法的一些实现:

Technical Details

技术细节

The main objective of this project is to allow users to jot down thoughts. This means that each user will have their own notes, so the application will need to have an account creation feature. This ensures that the notes of each user remain private to them.

该项目的主要目的是允许用户记下想法。 这意味着每个用户都有自己的注释,因此应用程序将需要具有帐户创建功能。 这样可以确保每个用户的注释对其保持私密。

django comes with a user authentication system, so it may be a good choice. You can use other frameworks like bottle or flask, but you’ll have to implement the user authentication system on your own.

django带有用户身份验证系统,因此它可能是一个不错的选择。 您可以使用bottleflask类的其他框架,但必须自己实现用户身份验证系统。

Since users may need to separate their notes under different sections, implementing a feature to allow users to categorize their notes will make the application more useful.

由于用户可能需要在不同的部分下分开他们的笔记,因此实现一项功能以允许用户对其笔记进行分类将使该应用程序更加有用。

As an example, you may need to have notes on algorithms and data structures, so you’ll need to be able to separate the notes in those categories.

例如,您可能需要有关算法和数据结构的注释,因此您需要能够将这些注释分隔在这些类别中。

You’ll need to store the information and notes of each user, so a database becomes an essential part of this project. The MySQLdb module can be used if you want to use a MySQL database or the psycopg2 module for a PostgreSQL database. There are other modules you can use, but it all depends on the database you choose to use.

您需要存储每个用户的信息和注释,因此数据库成为该项目的重要组成部分。 如果要对PostgreSQL数据库使用MySQL数据库或psycopg2模块,则可以使用MySQLdb模块。 您可以使用其他模块,但这全部取决于您选择使用的数据库。

Extra Challenge

额外挑战

Since it’s human for users to forget their ideas, it’s also human for them to forget that they even made a note somewhere. You can add a feature to remind users of their notes. This feature will allow users to set a time for the reminder, so the application will send the reminder to the users when it’s time, by email.

由于用户忘记他们的想法是很人性化的,因此忘记他们甚至在某个地方做笔记也是人性化的。 您可以添加一项功能来提醒用户他们的笔记。 此功能允许用户设置提醒时间,因此应用程序将在时间到时通过电子邮件将提醒发送给用户。

测验申请 (Quiz Application)

Knowledge is power. There are so many things in the world to learn, and quizzes help in testing the understanding of those concepts. You, as an intermediate Python developer, do not have to understand everything about the language. Taking tests is one way to find out things you don’t fully understand.

知识就是力量。 世界上有很多东西要学习,测验有助于测试对这些概念的理解。 作为Python的中级开发人员,您不必了解有关该语言的所有知识。 进行测试是找出您不完全了解的事情的一种方法。

This is where the Quiz Application comes in. The Quiz Application will present questions to the users and expect the right answers to those questions. Think of the Quiz Application as a kind of questionnaire.

这是测验应用程序出现的地方。测验应用程序将向用户提出问题,并期望对这些问题有正确的答案。 将测验应用程序视为一种问卷。

With the Quiz Application, special users you can call administrators will be allowed to create tests, so regular users can answer the questions and test their understanding of the topics in the quiz.

使用测验应用程序,您可以呼叫管理员的特殊用户可以创建测试,因此普通用户可以回答问题并测试他们对测验主题的理解。

Examples of Quiz Applications

测验应用示例

Here are some implementations of the Quiz Application idea:

以下是测验应用程序构思的一些实现:

Technical Details

技术细节

The main objective of this project is to set quizzes and have people answer them. Therefore, users should be able to set questions, and other users should be able to answer those questions. The application will then display the final score and the right answers.

该项目的主要目的是设置测验并让人们回答。 因此,用户应该能够设置问题,其他用户应该能够回答那些问题。 然后,应用程序将显示最终分数和正确答案。

If you want users to be able to have a record of their scores, you may have to implement an account creation feature.

如果您希望用户能够记录其分数,则可能必须实现帐户创建功能。

Users creating the tests should be able to create tests with the questions and answers by simply uploading a text file. The text file will have a format that you can decide, so the application can convert from a file to a quiz.

创建测试的用户应该能够通过简单地上载文本文件来创建带有问题和答案的测试。 文本文件将具有您可以确定的格式,因此应用程序可以从文件转换为测验。

You’ll need to implement a database for this project. The database will store the questions, possible answers, correct answers, and the scores for each user.

您需要为此项目实现一个数据库。 数据库将存储每个用户的问题,可能的答案,正确的答案以及分数。

Extra Challenge

额外挑战

For more of a challenge, you can allow users to add timers to the quizzes. This way, the creators of a quiz can determine how many seconds or minutes a user should spend on each question in the quiz.

对于更多挑战,您可以允许用户将计时器添加到测验中。 这样,测验的创建者可以确定用户应在测验中的每个问题上花费多少秒或几分钟。

It would be great to also have a quiz-sharing feature, so users can share interesting quizzes with their friends on other platforms.

拥有测验共享功能也很好,因此用户可以与其他平台上的朋友共享有趣的测验。

GUI项目的想法 (GUI Project Ideas)

In this section, you’ll see project ideas for Graphical User Interfaces. These project ideas can be classified as entertainment, finance, and utility tools.

在本节中,您将看到图形用户界面的项目构想。 这些项目构想可以归类为娱乐,金融和实用工具。

Here’s are the project ideas:

这里是项目的想法:

  • MP3 Player
  • Alarm Tool
  • File Manager
  • Expense Tracker
  • MP3播放器
  • 报警工具
  • 文件管理器
  • 费用追踪器

MP3播放器 (MP3 Player)

Audio is as important as text today if not more important. Since audio files are digital files, you’ll need a tool that can play them. Without a player, you’ll never be able to listen to the contents of an audio file.

如今,音频与文本同样重要,甚至更为重要。 由于音频文件是数字文件,因此您需要一个可以播放它们的工具。 没有播放器,您将永远无法收听音频文件的内容。

This is where the MP3 Player comes in. The MP3 Player is a device for playing MP3s and other digital audio files. This MP3 Player GUI project idea attempts to emulate the physical MP3 Player. You can build software that allows you play an MP3 files on your desktop or laptop computer.

这是MP3播放器的来源。MP3播放器是用于播放MP3和其他数字音频文件的设备。 这个MP3 Player GUI项目创意试图模仿物理MP3 Player。 您可以构建允许您在台式机或便携式计算机上播放MP3文件的软件。

When you are done building the MP3 Player project, users can play their MP3 files and other digital audio files without having to purchase a physical MP3 Player. They’ll be able to play the MP3 files using their computers.

完成MP3 Player项目的构建后,用户可以播放其MP3文件和其他数字音频文件,而不必购买实际的MP3 Player。 他们将能够使用自己的计算机播放MP3文件。

Examples of MP3 Players

MP3播放器的示例

Here are some implementations of the MP3 Player idea:

以下是MP3播放器提示的一些实现:

Technical Details

技术细节

The main objective of this project is to allow users to play MP3 and digital audio files. To be engaging for users, the application has to have a simple but beautiful user interface.

该项目的主要目的是允许用户播放MP3和数字音频文件。 为了吸引用户,该应用程序必须具有简单但美观的用户界面。

You can have an interface for listing the available MP3 files. You can also give users the option to list other digital audio files that are not MP3.

您可以使用一个界面来列出可用的MP3文件。 您还可以为用户提供列出非MP3的其他数字音频文件的选项。

The users will also expect the MP3 Player to have an interface that shows information on the file that is playing. Some of the information you can include are the name of the file, its length, the amount played, and the amount not played, in minutes and seconds.

用户还将期望MP3 Player具有一个界面,该界面显示有关正在播放的文件的信息。 您可以包括的一些信息是文件的名称,文件的长度,播放的数量和未播放的数量(以分钟和秒为单位)。

Python has libraries that can play audio files, such as pygame, which allows you to work with multimedia files in few lines of code. You can also check out pymedia and simpleaudio.

Python具有可以播放音频文件的库,例如pygame ,它使您可以用几行代码来处理多媒体文件。 您还可以检查出pymediasimpleaudio

These libraries can handle a lot of digital audio files. They can handle other file types, not just the MP3 files.

这些库可以处理许多数字音频文件。 他们可以处理其他文件类型,而不仅仅是MP3文件。

You can also implement a feature that allows users to create a playlist. To do this, you’ll need a database to store information on the created playlists. Python’s sqlite3 module allows you to use the SQLite database.

您还可以实现允许用户创建播放列表的功能。 为此,您需要一个数据库来存储有关创建的播放列表的信息。 Python的sqlite3模块允许您使用SQLite数据库。

The SQLite database is a better option in this case, because it is file based and easier to set up than other SQL databases. While SQLite is file based, it is better for saving data than a regular file.

在这种情况下,SQLite数据库是一个更好的选择,因为它是基于文件的,并且比其他SQL数据库更易于设置。 虽然SQLite是基于文件的, 但与常规文件相比,保存数据更好

Extra Challenge

额外挑战

For a more exciting challenge, you can add a feature to allow the MP3 player to repeat currently playing files or even shuffle the list of files to be played.

对于更具挑战性的挑战,您可以添加一项功能,以允许MP3播放器重复当前正在播放的文件,甚至重新整理要播放的文件列表。

It’s also possible to implement a feature that allows users to increase and decrease the playing speed of the audio file. Users will find this interesting, as they’ll be able to play files at a slower or faster pace than usual.

也可以实现允许用户增加和减少音频文件的播放速度的功能。 用户会发现这很有趣,因为他们将能够以比平时更快或更慢的速度播放文件。

报警工具 (Alarm Tool)

As they say, “Time and tide wait for no man.” But with a lot of things going on in our lives, it’s difficult to not lose track of time. To be able to keep track of time, a reminder is needed.

正如他们所说:“时光流逝,没有人在等待。” 但是,随着我们生活中发生的很多事情,很难不失时间。 为了能够跟踪时间,需要提醒。

This is where the Alarm Tool comes in. An alarm is a device that gives an audio or visual signal about a certain condition. This Alarm Tool project idea is an attempt to build an alarm as software. The Alarm Tool gives an audio signal when a certain condition is met. The set time is the certain condition in this case.

这是警报工具的用处。警报是一种提供有关特定状况的音频或视觉信号的设备。 此警报工具项目的想法是尝试将警报构建为软件。 满足特定条件时,警报工具会发出音频信号。 在这种情况下,设定时间是一定条件。

With the Alarm Tool, users can set alarms to remind them of things at certain times of the day. The Alarm Tool project will work from the user’s laptop or desktop device, so they do not have to purchase a physical timer.

使用警报工具,用户可以设置警报以提醒他们一天中的某些时间。 “警报工具”项目将在用户的便携式计算机或台式机设备上运行,因此他们不必购买物理计时器。

Examples of Alarm Tools

报警工具示例

Here are some implementations of the Alarm Tool idea:

以下是“警报工具”概念的一些实现:

Technical Details

技术细节

The main objective of this project is to activate audio signals at certain times of the day. So, timing and the audio signal to be played are the most important parts of the Alarm Tool.

该项目的主要目的是在一天中的特定时间激活音频信号。 因此,定时和要播放的音频信号是警报工具最重要的部分。

The Alarm Tool should allow users to create, edit, and delete alarms. It should also have an interface that lists all the alarms, provided they have not being deleted by the user. So, it should list the active and inactive alarms.

警报工具应允许用户创建,编辑和删除警报。 如果没有被用户删除,它还​​应该具有列出所有警报的界面。 因此,它应该列出活动和不活动的警报。

Since it is an alarm, the application has to play tones at the set time. There are libraries for playing audio, like the pygame library.

由于是警报,因此应用程序必须在设置的时间播放提示音。 有一些用于播放音频的库,例如pygame库。

In your code logic, the application has to keep checking for set alarm times. When the time is reached, it triggers a function to play the alarm tone.

在您的代码逻辑中,应用程序必须继续检查设置的警报时间。 到达时间后,它将触发播放警报音的功能。

Since the application will check for set alarm times, it means the application has to save the alarms in a database. The database should store things like the alarm date, time, and tone location.

由于应用程序将检查设置的警报时间,因此这意味着应用程序必须将警报保存在数据库中。 数据库应存储警报日期,时间和提示音位置等信息。

Extra Challenge

额外挑战

As an extra feature, you can allow users to set recurring alarms. They’ll be able to set alarms that will ring at a certain time on certain days of the week, every week. As an example, an alarm can be set at 2:00 PM every Monday.

作为一项附加功能,您可以允许用户设置重复警报。 他们将能够设置警报,该警报将在每周的某些天的某个特定时间响起。 例如,可以在每个星期一的下午2:00设置警报。

You can also add a snooze feature, so your users can snooze alarms instead of only dismissing them.

您还可以添加暂停功能,以便您的用户可以暂停闹钟,而不是仅将其关闭。

文件管理器 (File Manager)

The number of files on the personal computer of an average PC user is pretty high. If all of those files were placed in a single directory, it would be difficult to navigate and find files or directories. So, there is a need to arrange the files and manage them properly.

普通PC用户在个人计算机上的文件数量非常高。 如果所有这些文件都放在一个目录中,将很难导航和查找文件或目录。 因此,需要整理文件并适当地管理它们。

This is where a file manager comes in. A file manager allows users to manage files and directories through a user interface. While files can be managed through the command-line, not all users know how to do that.

这是文件管理器的用武之地。文件管理器允许用户通过用户界面管理文件和目录。 尽管可以通过命令行管理文件,但并非所有用户都知道如何执行此操作。

With a file manager, users can arrange, access, and administer their files and directories properly without knowing how to use the command line. Some of the tasks a file manager allows users to perform includes copying, moving, and renaming files or directories.

使用文件管理器,用户可以正确地排列,访问和管理其文件和目录,而无需知道如何使用命令行。 文件管理器允许用户执行的某些任务包括复制,移动和重命名文件或目录。

Examples of File Manager Tools

文件管理器工具示例

Here are some implementations of the File Manager idea:

以下是文件管理器概念的一些实现:

Technical Details

技术细节

The main objective of the file manager project is to give users an interface to manage their files. Users want a file manager that has a file management tool that looks good and is easy to use.

文件管理器项目的主要目的是为用户提供一个界面来管理他们的文件。 用户需要一个文件管理器,该文件管理器具有看起来不错且易于使用的文件管理工具。

You can use the PySimpleGUI library to create unique user interfaces with a powerful widget, without having to deal with a lot of complexity.

您可以使用PySimpleGUI库通过功能强大的窗口小部件创建唯一的用户界面,而不必处理很多复杂性。

Your users should be able to perform simple tasks like creating new directories or empty text files. They should also be able to copy and move files or directories.

您的用户应该能够执行简单的任务,例如创建新目录或空文本文件。 他们还应该能够复制和移动文件或目录。

The sys, os, and shutil libraries will be quite useful for this project, as they can be used to execute actions on the files in the background, while the user clicks away.

sysosshutil库对于该项目将非常有用,因为当用户单击时,它们可用于对后台文件执行操作。

The grid and list views are popular views today, so you can implement both in the application. This gives the user the option to choose which view option is suitable for them.

网格视图和列表视图是当今流行的视图,因此您可以在应用程序中实现它们。 这使用户可以选择适合他们的视图选项。

Extra Challenge

额外挑战

To make the file manager a bit more advanced, you can implement a search feature. So users can search for files and directories without having to find them manually.

为了使文件管理器更高级,可以实现搜索功能。 因此,用户无需手动查找即可搜索文件和目录。

You can also implement a sort feature. This will allow users to sort files according to different orders, such as time, alphabetical order, or size.

您还可以实现排序功能。 这将允许用户根据不同的顺序(例如时间,字母顺序或大小)对文件进行排序。

费用追踪器 (Expense Tracker)

We have daily expenses, from groceries to clothing to bills. There are so many expenses that it’s normal to lose track of them and keep spending till we’re almost out of cash. A tracker can help people watch their expenses.

我们的日常开支从杂货到衣服再到账单。 有太多的支出,通常会迷失方向并继续支出,直到我们几乎没有现金为止。 跟踪器可以帮助人们观看他们的费用。

This is where the expense tracker comes in. An expense tracker is a software tool that allows users to keep track of their expenses. It can also analyze the expenses, depending on how advanced it is, but let’s keep it simple for now.

这就是费用跟踪器的用处。费用跟踪器是一种软件工具,它使用户可以跟踪其费用。 它还可以根据费用的高低来分析费用,但是现在让我们保持简单。

With the expense tracker, users can set a budget and track their spending so as to make better financial decisions.

使用费用跟踪器,用户可以设置预算并跟踪他们的支出,以便做出更好的财务决策。

Examples of Expense Trackers

费用追踪器示例

Here are some implementations of the Expense Tracker idea:

以下是Expense Tracker想法的一些实现:

Technical Details

技术细节

The main objective of this project is to keep track of the user’s expenses. Some statistical analysis has to be done to be able to give users correct information on their expenses and help them spend better.

该项目的主要目的是跟踪用户的支出。 必须进行一些统计分析才能为用户提供有关其支出的正确信息,并帮助他们更好地支出。

While tracking the expenses is the key thing, a good interface is also important. With PySimpleGUI, you can create a unique interface to improve the experience of the users.

尽管跟踪费用是关键,但良好的界面也很重要。 使用PySimpleGUI ,您可以创建一个独特的界面来改善用户体验。

PyData libraries such as pandas and matplotlib can be helpful for building the expense tracker.

PyData库(例如pandasmatplotlib可有助于构建费用跟踪器。

The pandas library can be used for the data analysis, and the matplotlib library can be used for plotting graphs. Graphs will give the users a visual representation of their expenses, and a visual representation is usually easier to understand.

pandas库可用于数据分析,而matplotlib库可用于绘制图形。 图形将为用户提供其费用的直观表示,并且直观表示通常更易于理解。

The application will receive data from the users. The data here is the inputted expenses. So, you’ll have to store the expenses in a database. The SQLite database is a good database choice for this project since it can be set up quickly. You can use sqlite3 module for the SQLite database.

该应用程序将从用户那里接收数据。 这里的数据是输入的费用。 因此,您必须将费用存储在数据库中。 SQLite数据库是此项目的理想数据库选择,因为它可以快速设置。 您可以将sqlite3模块用于SQLite数据库。

Extra Challenge

额外挑战

For your users to benefit from this project, they’ll have to input their expenses regularly, which might slip their mind. It could be useful for you to implement a reminder feature. So the application will send a notification at certain times of the day or the week, reminding them to make use of the expense tracker.

为了使您的用户受益于此项目,他们必须定期输入费用,这可能会引起他们的注意。 实施提醒功能可能对您很有用。 因此,应用程序将在一天或一周中的某些时间发送通知,提醒他们使用费用跟踪器。

命令行项目构想 (Command-Line Project Ideas)

In this section, you’ll see project ideas for the command-line. The project ideas discussed can be classified as utility tools.

在本节中,您将看到命令行的项目构想。 讨论的项目构想可以归类为实用工具。

Here’s are the project ideas:

这里是项目的想法:

  • Contact Book
  • File Connectivity Checker
  • Bulk File Rename Tool
  • Directory Tree Generator
  • 联络书
  • 文件连接检查器
  • 批量文件重命名工具
  • 目录树生成器

联络书 (Contact Book)

We come across lots of people daily. We make acquaintances and friends. We get their contacts to keep in touch later on. Sadly, keeping the received contact details can be hard. One way to do this is to write the contact details down. But this is not secure as the physical book can easily be lost.

我们每天都会遇到很多人。 我们结识朋友。 我们会在以后与他们保持联系。 可悲的是,很难保持接收到的联系方式。 一种方法是写下联系方式。 但这并不安全,因为实物书很容易丢失。

This is where the Contact Book project comes in. A contact book is a tool for saving a contact’s details, such as name, address, phone number, and email address. With this contact book project, you can build a software tool that people can use to save and find contact details.

这是联系人簿项目的来源。联系人簿是用于保存联系人详细信息(例如姓名,地址,电话号码和电子邮件地址)的工具。 通过此通讯录项目,您可以构建一个人们可以用来保存和查找联系人详细信息的软件工具。

With the contact book project idea, users can save their contacts with less risk of losing the saved contact details. It’ll always be accessible from their computer, through the command-line.

使用联系人簿项目的想法,用户可以保存联系人,而丢失丢失已保存的联系人详细信息的风险较小。 始终可以通过命令行从他们的计算机上访问它。

Examples of Contact Book Tools

通讯录工具示例

There are Contact Book applications, but it’s rare to find command-line Contact Book products, as most are web, mobile, or GUI applications.

有“通讯录”应用程序,但是很少找到命令行“通讯录”产品,因为大多数是Web,移动或GUI应用程序。

Here are some implementations of the Contact Book idea:

这是“联系书”构想的一些实现:

Technical Details

技术细节

The main objective of this project is to save contact details. It’s important that you set up the commands users can use to enter the contact details. You can use the argparse or click command-line frameworks. They abstract a lot of complex stuff, so you only have to focus on the logic to be run when executing commands.

该项目的主要目的是保存联系方式。 设置用户可用来输入联系方式的命令很重要。 您可以使用argparseclick命令行框架。 它们抽象了很多复杂的东西,因此您只需要关注执行命令时要运行的逻辑即可。

Some features you should implement include the commands to delete contacts, update contact information, and list saved contacts. You can also allow users to list contacts using different parameters, such as alphabetical order or contact creation date.

您应该实现的某些功能包括删除联系人,更新联系人信息以及列出已保存的联系人的命令。 您还可以允许用户使用不同的参数列出联系人,例如字母顺序或联系人创建日期。

Since it’s a command-line project, the SQLite database will be fine for saving contacts. SQLite is user-friendly to set up. You may save the contact details in a file, but a file will not offer the benefits you can gain from using SQLite, such as performance and security.

由于这是一个命令行项目,因此SQLite数据库可用于保存联系人。 SQLite易于用户设置。 您可以将联系人详细信息保存在文件中,但是文件不会提供使用SQLite所能获得的好处,例如性能和安全性。

To use the SQLite database in this project, the Python sqlite3 module will be very useful.

要在此项目中使用SQLite数据库,Python sqlite3模块将非常有用。

Extra Challenge

额外挑战

Remember how the database is stored on the user’s computer? What if something happens, like the user losing their files? It means they’ll also lose the contact details.

还记得数据库是如何存储在用户计算机上的吗? 如果发生某些事情,例如用户丢失文件怎么办? 这意味着他们还将失去联系方式。

You can challenge yourself further and backup the database to an online storage platform. To do this, you can upload the database files to the cloud at certain intervals.

您可以进一步挑战自己,并将数据库备份到在线存储平台。 为此,您可以按一定的时间间隔将数据库文件上传到云中。

You can also add a command that allows users to backup the database themselves. This way, the user can still have access to the contacts if the database file is lost.

您还可以添加一个命令,该命令允许用户自己备份数据库。 这样,如果数据库文件丢失,则用户仍然可以访问联系人。

You should note that you may need some form of identification, so the contact book can tell which database file belongs to which user. Implementing a user authentication feature is one way to go about it.

您应该注意,您可能需要某种形式的标识,因此通讯录可以告诉哪个数据库文件属于哪个用户。 实现用户身份验证功能是实现此功能的一种方法。

站点连接检查器 (Site Connectivity Checker)

When you visit a URL, you expect to get the requested pages on your browser. But this is not always the case. Sometimes, sites can be down, so you won’t get the desired results. Instead, you’ll be presented with error messages. You can keep trying a site that is down, till it comes up and you get the information you need.

当您访问URL时,您希望在浏览器上获得请求的页面。 但这并非总是如此。 有时,站点可能会关闭,因此您将无法获得理想的结果。 相反,您将看到错误消息。 您可以继续尝试关闭的站点,直到它出现并获得所需的信息。

This is where the Site Connectivity Checker project comes in. The Site Connectivity Checker visits a URL and returns the status of the URL: it is either live or not. The Site Connectivity Checker will visit the URL at intervals, returning the results of each visit.

这是Site Connectivity Checker项目的来源。SiteConnectivity Checker访问URL并返回URL的状态:它是否有效。 Site Connectivity Checker会定期访问URL,并返回每次访问的结果。

Instead of manually visiting a URL, a Site Connectivity Checker can do all of that manual work for you. This way, you’ll only get the results of the check without having to spend time on the browser, waiting for the site to go live.

Site Connectivity Checker可以代替您手动访问URL,而是可以为您完成所有这些手动工作。 这样,您将只获得检查结果,而不必花时间在浏览器上,等待网站上线。

Examples of Site Connectivity Checkers

站点连接检查器的示例

Here are some implementations of the Site Connectivity Checker idea:

这是站点连接检查器想法的一些实施:

Technical Details

技术细节

The main objective of this project is to check the status of sites. So, you need to write code for checking the status of a website.

该项目的主要目的是检查站点的状态。 因此,您需要编写代码来检查网站的状态。

You can choose to use either TCP or ICMP for your connections. The socket module is one to check out. You can also read Socket Programming in Python (Guide).

您可以选择使用TCPICMP进行连接。 socket模块是一个可以检出的模块。 您还可以阅读Python套接字编程(指南)

Through your chosen framework, be it the docopt, click, or argparse framework, you can add commands to allow users to add and remove sites from the list of sites to be checked.

通过您选择的框架(是docoptclickargparse框架),您可以添加命令,以允许用户从要检查的站点列表中添加和删除站点。

The users should also be able to start the tool, stop it, and determine the intervals.

用户还应该能够启动,停止工具并确定时间间隔。

Since you’ll have to save the list of files to be checked, you can either save it in a file (just a list of sites) or use a SQLite database through the sqlite3 module.

由于必须保存要检查的文件列表,因此可以将其保存在文件中(只是站点列表),也可以通过sqlite3模块使用SQLite数据库。

Extra Challenge

额外挑战

The application can check for the connectivity status of sites and display the results to the command-line. But this will require the user to keep checking the command-line.

该应用程序可以检查站点的连接状态,并在命令行中显示结果。 但这将要求用户继续检查命令行。

You can increase the challenge and implement a notification feature. The notification feature can be a sound played in the background to alert the user when a site’s status changes. You’ll need a database to store the previous status of a site. That’s the only way the tool can tell when the status changes.

您可以增加挑战并实施通知功能。 通知功能可以是在后台播放的声音,以在站点状态更改时提醒用户。 您将需要一个数据库来存储站点的先前状态。 这是该工具可以告知状态何时更改的唯一方法。

批量文件重命名工具 (Bulk File Rename Tool)

Sometimes, you need to name all the files in a directory according to certain conventions. For example, you can name all the files in a directory with File0001.jpg, where the numbers increase based on the number of files in the directory. Doing this manually can be stressful and repetitive.

有时,您需要根据某些约定为目录中的所有文件命名。 例如,您可以使用File0001.jpg命名目录中的所有文件,其中文件的数量根据目录中File0001.jpg的数量而增加。 手动执行此操作可能会造成压力和重复性。

The Bulk File Rename Tool allows users to rename a large number of files, without having to manually rename files.

批量文件重命名工具允许用户重命名大量文件,而无需手动重命名文件。

This saves users a lot of time. It spares them the trouble of having to do boring repetitive work and make mistakes. With the Bulk File Rename Tool, users can rename files in a couple of seconds without any mistakes.

这样可以为用户节省大量时间。 这使他们免于必须进行无聊的重复工作和犯错误的麻烦。 使用批量文件重命名工具,用户可以在几秒钟内重命名文件而不会出现任何错误。

Examples of Bulk File Rename Tools

批量文件重命名工具的示例

Here are some implementations of the Bulk File Rename idea:

以下是批量文件重命名概念的一些实现:

Technical Details

技术细节

The main objective of this project idea is to rename files. So, the application needs to find a way to manipulate the target files. The os, sys, and shutil libraries will be useful for a large part of this project.

该项目构想的主要目的是重命名文件。 因此,应用程序需要找到一种操作目标文件的方法。 ossysshutil库对于该项目的很大一部分很有用。

Your users will be able to rename all the files in the directory, using naming conventions. Therefore, they should be able to pass in the naming convention of choice. The regex module will help match the required naming patterns, if you understand how regex works.

您的用户将能够使用命名约定来重命名目录中的所有文件。 因此,它们应该能够传递所选的命名约定。 如果您了解正则表达式的工作原理, regex模块将有助于匹配所需的命名模式。

A user may want to pass in a naming convention such as myfiles as part of the commands and expect that the tool renames all the files like myfilesXYZ, where XYZ is a number. They should also be able to choose the directory where the files to be renamed are.

用户可能希望将诸如myfiles类的命名约定作为命令的一部分传递,并希望该工具重命名所有文件,如myfilesXYZ ,其中XYZ是数字。 他们还应该能够选择要重命名的文件所在的目录。

Extra Challenge

额外挑战

The major challenge in this project is to rename all the files in a directory. But users may only need to name a certain number of files. To test your skills, you can implement a feature to allow users to choose the number of files to be renamed, instead of all the files.

该项目的主要挑战是重命名目录中的所有文件。 但是用户可能只需要命名一定数量的文件。 要测试您的技能,您可以实施一项功能,允许用户选择要重命名的文件数,而不是所有文件。

Note that renaming only a certain number of files will require the tool to sort the files based on alphabetical order, time of file creation, or file size, depending on the user’s requirements.

请注意,仅重命名一定数量的文件将需要该工具根据用户要求根据字母顺序,文件创建时间或文件大小对文件进行排序。

目录树生成器 (Directory Tree Generator)

Directories are like family trees: each directory has a particular relationship with other directories. No directories ever stays on its own, except an empty root directory.

目录就像家族树:每个目录与其他目录都有特定的关系。 除了空的根目录外,没有任何目录可以保留。

When you’re working with files and directories, it is difficult to see the relationship between directories, as you can only see what exists in the current directory. You’re either using a file manager or working from the command-line.

使用文件和目录时,很难看到目录之间的关系,因为您只能看到当前目录中存在的内容。 您正在使用文件管理器,或者从命令行工作。

With a Directory Tree Generator, you can see the relationship between files and directories like a tree or a map.

使用目录树生成器,您可以查看文件和目录之间的关系,例如树或地图。

This makes it easier to understand the positioning of files and directories. A directory tree map is important when you’re explaining certain concepts, and a Directory Tree Generator makes it easier to get a visual representation of the file and directory relationships.

这使得更容易理解文件和目录的位置。 在解释某些概念时,目录树映射很重要,而目录树生成器使您更容易获得文件和目录关系的直观表示。

Examples of Directory Tree Generators

目录树生成器的示例

Here are some implementations of the Directory Tree Generator idea:

这是目录树生成器思想的一些实现:

Technical Details

技术细节

The main objective of the Directory Tree Generator is to visualize the relationships between files and directories. The os library can be very useful in listing the files and directories in a chosen directory.

目录树生成器的主要目的是可视化文件和目录之间的关系。 os库在列出所选目录中的文件和目录时非常有用。

Using a framework such as docopt or argparse helps abstract a lot of stuff, allowing you to focus on writing code for the application’s logic.

使用诸如docoptargparse类的框架有助于抽象很多内容,使您可以专注于为应用程序逻辑编写代码。

In the application’s logic, you can decide how you want to represent files or directories. Using different colors is a brilliant way to go about it. You can use the colored library to print the files and directories in different colors.

在应用程序的逻辑中,您可以决定如何表示文件或目录。 使用不同的颜色是解决该问题的绝妙方法。 您可以使用colored库以不同的颜色打印文件和目录。

You can also decide how deep you’d like the Directory Tree Generator to go. For example, if a directory has children directories twelve levels deep, you may decide to go only as deep as the fifth level.

您还可以决定目录树生成器的深度。 例如,如果目录的子目录深度为十二级,则您可以决定只进入第五级。

If you wish, you can also let the user decide how deep they want the Directory Tree Generator to go.

如果您愿意,还可以让用户决定他们希望目录树生成器运行的深度。

Extra Challenge

额外挑战

Since the results of the generated directory tree will be on the command-line, you can go one step further. You can have the generator create images of the directory tree, so it’ll basically turn the text into an image.

由于生成的目录树的结果将在命令行上显示,因此您可以再走一步。 您可以让生成器创建目录树的图像,因此基本上可以将文本转换为图像。

You’ll find the pillow library useful for doing this.

您会发现pillow库对此有用。

项目工作技巧 (Tips for Working on Projects)

Working on projects can be difficult. That’s one reason why motivation and interest in a project will make it a less daunting task.

在项目上工作可能很困难。 这就是为什么对项目的动力和兴趣会使它成为一项艰巨的任务的原因。

If you’re interested in a project, you’ll be able to put in the time to research as well as find libraries and tools that will help you with the project.

如果您对某个项目感兴趣,则可以花时间进行研究,并找到对项目有帮助的库和工具。

Here are some tips:

这里有一些提示:

  • Find a source of motivation
  • Break the project into subtasks
  • Do research on the subtasks
  • Build each subtasks, one step at a time
  • Reach out for help if you’re stuck
  • Put the subtasks together
  • 寻找动力来源
  • 将项目分解为子任务
  • 研究子任务
  • 一次建立每个子任务
  • 如果遇到困难,请寻求帮助
  • 将子任务放在一起

结论 (Conclusion)

In this article, you’ve seen a couple of Python project ideas you may find interesting.

在本文中,您已经看到了一些您可能会发现有趣的Python项目构想。

The project ideas cover a range of platforms. You saw project ideas for the Web, GUI, and Command-line platforms.

该项目的想法涵盖了一系列平台。 您看到了针对Web,GUI和命令行平台的项目构想。

You can choose to build a project for different platforms. Using the URL Shortener as an example, you may choose to build one for the Web, GUI, or the Command-line.

您可以选择为不同的平台构建项目。 以URL Shortener为例,您可以选择为Web,GUI或命令行构建一个。

Since you’re an intermediate Python developer, these projects can be quite challenging but interesting.

由于您是Python的中级开发人员,因此这些项目可能非常具有挑战性,但很有趣。

The best way to make a project happen is to just get started. In no time, you’ll be finished and discover how much you’ve benefited from working on a project!

使项目成为现实的最好方法就是开始。 您将很快完成工作,并发现从项目中受益匪浅!

翻译自: https://www.pybloggers.com/2019/03/13-project-ideas-for-intermediate-python-developers/

python开发中级

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值