Python入门教程 - 模块、包(八)

目录

一、模块的概念

二、模块的导入方式

三、案例演示

3.1 import模块名

3.2 from 模块名 import 功能名

3.3 from 模块名 import *

3.4 as定义别名

四、自定义模块

4.1 制作自定义模块

4.2 测试模块

4.3 注意事项

4.4 __all__

五、Python包

5.1 包的概念

5.2 快速入门

5.3 安装使用第三方包

安装第三方包 - pip

pip的网络优化

安装第三方包 - PyCharm


一、模块的概念

Python 模块(Module),是一个 Python 文件,以 .py 结尾。 模块能定义函数、类和变量,模块里也能包含可执行的代码。

模块的作用:  python中有很多各种不同的模块,每一个模块都可以帮助我们快速的实现一些功能。比如实现和时间相关的功能就可以使用time模块,我们可以认为一个模块就是一个工具包, 每一个工具包中都有各种不同的工具,供我们使用进而实现各种不同的功能。

大白话:模块就是一个Python文件,里面有类、函数、变量等,我们可以拿过来用(导入模块去使用)。

二、模块的导入方式

模块在使用前需要先导入,导入的语法如下:

常用的组合形式如:

import 模块名

from 模块名 import 类、变量、方法等

from 模块名 import *

import 模块名 as 别名

from 模块名 import 功能名 as 别名

三、案例演示

3.1 import模块名

import 模块名

import 模块名1,模块名2

模块名.功能名()

import time

print("倒计时 开始")
time.sleep(1)
for i in range(5):
    print(5 - i)
    time.sleep(1)
print("时间到!")

time模块是python内置的,有兴趣可以点开看一下:

# encoding: utf-8
# module time
# from (built-in)
# by generator 1.147
"""
This module provides various functions to manipulate time values.

There are two standard representations of time.  One is the number
of seconds since the Epoch, in UTC (a.k.a. GMT).  It may be an integer
or a floating point number (to represent fractions of seconds).
The Epoch is system-defined; on Unix, it is generally January 1st, 1970.
The actual value can be retrieved by calling gmtime(0).

The other representation is a tuple of 9 integers giving local time.
The tuple items are:
  year (including century, e.g. 1998)
  month (1-12)
  day (1-31)
  hours (0-23)
  minutes (0-59)
  seconds (0-59)
  weekday (0-6, Monday is 0)
  Julian day (day in the year, 1-366)
  DST (Daylight Savings Time) flag (-1, 0 or 1)
If the DST flag is 0, the time is given in the regular time zone;
if it is 1, the time is given in the DST time zone;
if it is -1, mktime() should guess based on the date and time.
"""
# no imports

# Variables with simple values

altzone = -3600

daylight = 0

timezone = 0

_STRUCT_TM_ITEMS = 11

# functions

def asctime(p_tuple=None): # real signature unknown; restored from __doc__
    """
    asctime([tuple]) -> string
    
    Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.
    When the time tuple is not present, current time as returned by localtime()
    is used.
    """
    return ""

def ctime(seconds=None): # known case of time.ctime
    """
    ctime(seconds) -> string
    
    Convert a time in seconds since the Epoch to a string in local time.
    This is equivalent to asctime(localtime(seconds)). When the time tuple is
    not present, current time as returned by localtime() is used.
    """
    return ""

def get_clock_info(name): # real signature unknown; restored from __doc__
    """
    get_clock_info(name: str) -> dict
    
    Get information of the specified clock.
    """
    return {}

def gmtime(seconds=None): # real signature unknown; restored from __doc__
    """
    gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,
                           tm_sec, tm_wday, tm_yday, tm_isdst)
    
    Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.
    GMT).  When 'seconds' is not passed in, convert the current time instead.
    
    If the platform supports the tm_gmtoff and tm_zone, they are available as
    attributes only.
    """
    pass

def localtime(seconds=None): # real signature unknown; restored from __doc__
    """
    localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,
                              tm_sec,tm_wday,tm_yday,tm_isdst)
    
    Convert seconds since the Epoch to a time tuple expressing local time.
    When 'seconds' is not passed in, convert the current time instead.
    """
    pass

def mktime(p_tuple): # real signature unknown; restored from __doc__
    """
    mktime(tuple) -> floating point number
    
    Convert a time tuple in local time to seconds since the Epoch.
    Note that mktime(gmtime(0)) will not generally return zero for most
    time zones; instead the returned value will either be equal to that
    of the timezone or altzone attributes on the time module.
    """
    return 0.0

def monotonic(): # real signature unknown; restored from __doc__
    """
    monotonic() -> float
    
    Monotonic clock, cannot go backward.
    """
    return 0.0

def monotonic_ns(): # real signature unknown; restored from __doc__
    """
    monotonic_ns() -> int
    
    Monotonic clock, cannot go backward, as nanoseconds.
    """
    return 0

def perf_counter(): # real signature unknown; restored from __doc__
    """
    perf_counter() -> float
    
    Performance counter for benchmarking.
    """
    return 0.0

def perf_counter_ns(): # real signature unknown; restored from __doc__
    """
    perf_counter_ns() -> int
    
    Performance counter for benchmarking as nanoseconds.
    """
    return 0

def process_time(): # real signature unknown; restored from __doc__
    """
    process_time() -> float
    
    Process time for profiling: sum of the kernel and user-space CPU time.
    """
    return 0.0

def process_time_ns(*args, **kwargs): # real signature unknown
    """
    process_time() -> int
    
    Process time for profiling as nanoseconds:
    sum of the kernel and user-space CPU time.
    """
    pass

def sleep(seconds): # real signature unknown; restored from __doc__
    """
    sleep(seconds)
    
    Delay execution for a given number of seconds.  The argument may be
    a floating point number for subsecond precision.
    """
    pass

def strftime(format, p_tuple=None): # real signature unknown; restored from __doc__
    """
    strftime(format[, tuple]) -> string
    
    Convert a time tuple to a string according to a format specification.
    See the library reference manual for formatting codes. When the time tuple
    is not present, current time as returned by localtime() is used.
    
    Commonly used format codes:
    
    %Y  Year with century as a decimal number.
    %m  Month as a decimal number [01,12].
    %d  Day of the month as a decimal number [01,31].
    %H  Hour (24-hour clock) as a decimal number [00,23].
    %M  Minute as a decimal number [00,59].
    %S  Second as a decimal number [00,61].
    %z  Time zone offset from UTC.
    %a  Locale's abbreviated weekday name.
    %A  Locale's full weekday name.
    %b  Locale's abbreviated month name.
    %B  Locale's full month name.
    %c  Locale's appropriate date and time representation.
    %I  Hour (12-hour clock) as a decimal number [01,12].
    %p  Locale's equivalent of either AM or PM.
    
    Other codes may be available on your platform.  See documentation for
    the C library strftime function.
    """
    return ""

def strptime(string, format): # real signature unknown; restored from __doc__
    """
    strptime(string, format) -> struct_time
    
    Parse a string to a time tuple according to a format specification.
    See the library reference manual for formatting codes (same as
    strftime()).
    
    Commonly used format codes:
    
    %Y  Year with century as a decimal number.
    %m  Month as a decimal number [01,12].
    %d  Day of the month as a decimal number [01,31].
    %H  Hour (24-hour clock) as a decimal number [00,23].
    %M  Minute as a decimal number [00,59].
    %S  Second as a decimal number [00,61].
    %z  Time zone offset from UTC.
    %a  Locale's abbreviated weekday name.
    %A  Locale's full weekday name.
    %b  Locale's abbreviated month name.
    %B  Locale's full month name.
    %c  Locale's appropriate date and time representation.
    %I  Hour (12-hour clock) as a decimal number [01,12].
    %p  Locale's equivalent of either AM or PM.
    
    Other codes may be available on your platform.  See documentation for
    the C library strftime function.
    """
    return struct_time

def thread_time(): # real signature unknown; restored from __doc__
    """
    thread_time() -> float
    
    Thread time for profiling: sum of the kernel and user-space CPU time.
    """
    return 0.0

def thread_time_ns(*args, **kwargs): # real signature unknown
    """
    thread_time() -> int
    
    Thread time for profiling as nanoseconds:
    sum of the kernel and user-space CPU time.
    """
    pass

def time(): # real signature unknown; restored from __doc__
    """
    time() -> floating point number
    
    Return the current time in seconds since the Epoch.
    Fractions of a second may be present if the system clock provides them.
    """
    return 0.0

def time_ns(): # real signature unknown; restored from __doc__
    """
    time_ns() -> int
    
    Return the current time in nanoseconds since the Epoch.
    """
    return 0

# classes

class struct_time(tuple):
    """
    The time value as returned by gmtime(), localtime(), and strptime(), and
     accepted by asctime(), mktime() and strftime().  May be considered as a
     sequence of 9 integers.
    
     Note that several fields' values are not the same as those defined by
     the C language standard for struct tm.  For example, the value of the
     field tm_year is the actual year, not year - 1900.  See individual
     fields' descriptions for details.
    """
    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __reduce__(self, *args, **kwargs): # real signature unknown
        pass

    def __repr__(self, *args, **kwargs): # real signature unknown
        """ Return repr(self). """
        pass

    tm_gmtoff = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """offset from UTC in seconds"""

    tm_hour = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """hours, range [0, 23]"""

    tm_isdst = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """1 if summer time is in effect, 0 if not, and -1 if unknown"""

    tm_mday = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """day of month, range [1, 31]"""

    tm_min = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """minutes, range [0, 59]"""

    tm_mon = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """month of year, range [1, 12]"""

    tm_sec = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """seconds, range [0, 61])"""

    tm_wday = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """day of week, range [0, 6], Monday is 0"""

    tm_yday = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """day of year, range [1, 366]"""

    tm_year = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """year, for example, 1993"""

    tm_zone = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """abbreviation of timezone name"""


    n_fields = 11
    n_sequence_fields = 9
    n_unnamed_fields = 0
    __match_args__ = (
        'tm_year',
        'tm_mon',
        'tm_mday',
        'tm_hour',
        'tm_min',
        'tm_sec',
        'tm_wday',
        'tm_yday',
        'tm_isdst',
    )


class __loader__(object):
    """
    Meta path import for built-in modules.
    
        All methods are either class or static methods to avoid the need to
        instantiate the class.
    """
    def create_module(spec): # reliably restored by inspect
        """ Create a built-in module """
        pass

    def exec_module(module): # reliably restored by inspect
        """ Exec a built-in module """
        pass

    @classmethod
    def find_module(cls, *args, **kwargs): # real signature unknown
        """
        Find the built-in module.
        
                If 'path' is ever specified then the search is considered a failure.
        
                This method is deprecated.  Use find_spec() instead.
        """
        pass

    @classmethod
    def find_spec(cls, *args, **kwargs): # real signature unknown
        pass

    @classmethod
    def get_code(cls, *args, **kwargs): # real signature unknown
        """ Return None as built-in modules do not have code objects. """
        pass

    @classmethod
    def get_source(cls, *args, **kwargs): # real signature unknown
        """ Return None as built-in modules do not have source code. """
        pass

    @classmethod
    def is_package(cls, *args, **kwargs): # real signature unknown
        """ Return False as built-in modules are never packages. """
        pass

    @classmethod
    def load_module(cls, *args, **kwargs): # real signature unknown
        """
        Load the specified module into sys.modules and return it.
        
            This method is deprecated.  Use loader.exec_module() instead.
        """
        pass

    def module_repr(module): # reliably restored by inspect
        """
        Return repr for the module.
        
                The method is deprecated.  The import machinery does the job itself.
        """
        pass

    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    __weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """list of weak references to the object (if defined)"""


    _ORIGIN = 'built-in'
    __dict__ = None # (!) real value is "mappingproxy({'__module__': '_frozen_importlib', '__doc__': 'Meta path import for built-in modules.\\n\\n    All methods are either class or static methods to avoid the need to\\n    instantiate the class.\\n\\n    ', '_ORIGIN': 'built-in', 'module_repr': <staticmethod(<function BuiltinImporter.module_repr at 0x0000023892692320>)>, 'find_spec': <classmethod(<function BuiltinImporter.find_spec at 0x00000238926923B0>)>, 'find_module': <classmethod(<function BuiltinImporter.find_module at 0x0000023892692440>)>, 'create_module': <staticmethod(<function BuiltinImporter.create_module at 0x00000238926924D0>)>, 'exec_module': <staticmethod(<function BuiltinImporter.exec_module at 0x0000023892692560>)>, 'get_code': <classmethod(<function BuiltinImporter.get_code at 0x0000023892692680>)>, 'get_source': <classmethod(<function BuiltinImporter.get_source at 0x00000238926927A0>)>, 'is_package': <classmethod(<function BuiltinImporter.is_package at 0x00000238926928C0>)>, 'load_module': <classmethod(<function _load_module_shim at 0x00000238926917E0>)>, '__dict__': <attribute '__dict__' of 'BuiltinImporter' objects>, '__weakref__': <attribute '__weakref__' of 'BuiltinImporter' objects>})"


# variables with complex values

tzname = (
    'Coordinated Universal Time',
    'Coordinated Universal Time',
)

__spec__ = None # (!) real value is "ModuleSpec(name='time', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in')"

3.2 from 模块名 import 功能名

例如刚才的时间模块,还可以这样写:

from time import sleep

print("倒计时 开始")
sleep(1)
for i in range(5):
    print(5 - i)
    sleep(1)
print("时间到!")

效果是一样的,这里就不展示了。

3.3 from 模块名 import *

from 模块名 import *

功能名()

from time import *

print("倒计时 开始")
sleep(1)
for i in range(5):
    print(5 - i)
    sleep(1)
print("时间到!")

这个写法和直接import time的区别是:后者需要time.类函数变量,而该方式可以直接写模块里面的内容,不需要time.

3.4 as定义别名

# 模块定义别名

import 模块名 as 别名

# 功能定义别名

from 模块名 import 功能 as 别名

# 模块别名
import time as tt
tt.sleep(2)
print('hello')
# 功能别名
from time import sleep as sl
sl(2)
print('hello')

四、自定义模块

4.1 制作自定义模块

Python中已经帮我们实现了很多的模块,不过有时候我们需要一些个性化的模块,这里就可以通过自定义模块实现, 也就是自己制作一个模块。

案例:新建一个Python文件,命名为my_module1.py,并定义test函数。

 

注意:

       每个Python文件都可以作为一个模块,模块的名字就是文件的名字。 也就是说自定义模块名必须要符合标识符命名规则。

4.2 测试模块

   在实际开发中,当一个开发人员编写完一个模块后,为了让模块能够在项目中达到想要的效果,这个开发人员会自行在py文件中添加一些测试信息,例如:在my_module1.py文件中添加测试代码test(1,1)。

问题:

此时,无论是当前文件,还是其他已经导入了该模块的文件,在运行的时候都会自动执行`test`函数的调用。

换句话说,就是导入模块的时候,相当于执行了一遍模块里面的全部内容。

解决方案:

4.3 注意事项

注意事项:当导入多个模块的时候,且模块内有同名功能. 当调用这个同名功能的时候,调用到的是后面导入的模块的功能。

4.4 __all__

如果一个模块文件中有`__all__`变量,当使用`from xxx import *`导入时,只能导入这个列表中的元素。

五、Python包

5.1 包的概念

基于Python模块,我们可以在编写代码的时候,导入许多外部代码来丰富功能。但是,如果Python的模块太多了,就可能造成一定的混乱,那么如何管理呢?

通过Python包的功能来管理。

从物理上看,包就是一个文件夹,在该文件夹下包含了一个 __init__.py 文件,该文件夹可用于包含多个模块文件。

从逻辑上看,包的本质依然是模块

包的作用:

     当我们的模块文件越来越多时,包可以帮助我们管理这些模块, 包的作用就是包含多个模块,但包的本质依然是模块。

5.2 快速入门

步骤如下:

① 新建包`my_package`

② 新建包内模块:`my_module1` 和 `my_module2`

③ 模块内代码如下

Pycharm中的基本步骤:

[New]   →   [Python Package]  →  输入包名  →  [OK]   →  新建功能模块(有联系的模块)

注意:新建包后,包内部会自动创建`__init__.py`文件,这个文件控制着包的导入行为

 导入包

方式一

import 包名.模块名

包名.模块名.目标

方式二:

注意:在`__init__.py`文件中添加`__all__ = []`,控制允许导入的模块列表

from 包名 import *

模块名.目标

 

5.3 安装使用第三方包

我们知道,包可以包含一堆的Python模块,而每个模块又内含许多的功能。

所以,我们可以认为:一个包,就是一堆同类型功能的集合体。

在Python程序的生态中,有许多非常多的第三方包(非Python官方),可以极大的帮助我们提高开发效率,如:

•科学计算中常用的:numpy包

•数据分析中常用的:pandas包

•大数据计算中常用的:pyspark、apache-flink包

•图形可视化常用的:matplotlib、pyecharts

•人工智能常用的:tensorflow

•等

这些第三方的包,极大的丰富了Python的生态,提高了开发效率。

但是由于是第三方,所以Python没有内置,所以我们需要安装它们才可以导入使用哦。

安装第三方包 - pip

第三方包的安装非常简单,我们只需要使用Python内置的pip程序即可。

打开我们许久未见的:命令提示符程序,在里面输入:

pip install 包名称

即可通过网络快速安装第三方包

pip的网络优化

由于pip是连接的国外的网站进行包的下载,所以有的时候会速度很慢。

我们可以通过如下命令,让其连接国内的网站进行包的安装:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 包名称

https://pypi.tuna.tsinghua.edu.cn/simple 是清华大学提供的一个网站,可供pip程序下载第三方包。

安装第三方包 - PyCharm

PyCharm也提供了安装第三方包的功能:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/705392.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

操作系统——信号

将信号分为以上四个阶段 1.信号注册&#xff1a;是针对信号处理方式的规定&#xff0c;进程收到信号时有三种处理方式&#xff1a;默认动作&#xff0c;忽略&#xff0c;自定义动作。如果不是自定义动作&#xff0c;这一步可以忽略。这个步骤要使用到signal/sigaction接口 2.…

2002-2023年款别克君威 君威GS维修手册和电路图资料更新

经过整理&#xff0c;2002-2023年款别克君威 君威GS全系列已经更新至汽修帮手资料库内&#xff0c;覆盖市面上99%车型&#xff0c;包括维修手册、电路图、新车特征、车身钣金维修数据、全车拆装、扭力、发动机大修、发动机正时、保养、电路图、针脚定义、模块传感器、保险丝盒图…

Dorkish:一款针对OSINT和网络侦查任务的Chrome扩展

关于Dorkish Dorkish是一款功能强大的Chrome扩展工具&#xff0c;该工具可以为广大研究人员在执行OSINT和网络侦查任务期间提供强大帮助。 一般来说&#xff0c;广大研究人员在执行网络侦查或进行OSINT信息收集任务过程中&#xff0c;通常会使用到Google Dorking和Shodan&…

晶圆代工市占洗牌,中芯跃居第三名 | 百能云芯

市场研究机构集邦咨询&#xff08;TrendForce&#xff09;最新发布的调查显示&#xff0c;今年第1季前五大晶圆代工厂第1季排名出现明显变动&#xff0c;除了台积电&#xff08;TSMC&#xff09;继续蝉联第一名&#xff0c;中芯国际&#xff08;SMIC&#xff09;受惠消费性库存…

Flutter-使用MethodChannel 实现与iOS交互

前言 使用 MethodChannel 在 Flutter 与原生 Android 和 iOS 之间进行通信&#xff0c;可以让你在 Flutter 应用中调用设备的原生功能。 基础概念 MethodChannel&#xff1a;Flutter 提供的通信机制&#xff0c;允许消息以方法调用的形式在 Flutter 与原生代码之间传递。方法…

光储充一体化充电站:能源革新的绿色引擎

在这个科技日新月异的时代&#xff0c;一场绿色能源的革命正悄然兴起。 光储充一体化充电站&#xff0c;作为这场革命中的璀璨明星&#xff0c;正以其独特的魅力&#xff0c;引领我们走向更加环保、高效的未来。 光储充一体化充电站&#xff0c;顾名思义&#xff0c;将光伏发电…

Chromium源码阅读:Mojo实战:从浏览器JS API 到blink实现

​ 通过在前面几篇文章&#xff0c;我们粗略梳理了Mojo这套跨进程通信的设计思路和IDL细节。 实际上&#xff0c;Mojo不止是跨进程通信框架&#xff0c;而是跨语言的模块通信自动化系统。 在浏览器暴露的JS API&#xff0c;也是需要通过Mojo这个系统进行桥接&#xff0c;最终…

遥感图像地物覆盖分类,数据集制作-分类模型对比-分类保姆级教程

在遥感影像上人工制作分类数据集 1.新建shp文件 地理坐标系保持和影像一致&#xff0c;面类型 2.打开属性表 3.添加字段 这里分类6类&#xff0c;点击添加值添加 添加完毕 开始人工选地物类型&#xff0c;制作数据集 开始标注&#xff0c;标注的时候可以借助谷歌地图…

记录清除挖矿病毒 solrd 过程

1、发现solrd病毒 端午节期间&#xff0c;kafka 服务器被黑客攻击了&#xff0c;植入了挖矿病毒 solrd&#xff0c;这个病毒很聪明&#xff0c;内存&#xff0c;CPU并没有异常升高&#xff0c;以致于上班第一天完全没有察觉。 上班第一天 正常登录服务器查看 flink ,消费kafka…

Eclipse创建Spring项目

第一步&#xff1a;先用Eclipse创建一个tomcat项目 打开eclipse 配置tomcat 这里点击add去添加tomcat 创建项目 写好项目名字&#xff0c;点击next 将这个Deploy path修改一下 配置一下项目&#xff0c;将项目部署到tomcat上面去 写个html测试一下 <html><h1>Hel…

tensorboard终于不报错了!

之前tensorboard笔记,记录2种使用方法&#xff0c;可以参考&#xff01; 有图这也没有数据啊这也。实际是没点对&#xff0c;干了个大噶。选择上方scalars就能看见图了&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&…

GitHub新手使用基本流程(保姆级教程)

GitHub&#xff0c; 一个聚合了海量开源免费的软件、电子书、视频课等资源的神仙网站&#xff0c;如果你还不会用GitHub&#xff0c;这条保姆级教程&#xff0c;您千万不要错过。 首先打开浏览器搜索GitHub, 点击进入官网 如果遇到无法加载的问题&#xff0c;可以试试这个名叫…

机器视觉:工业相机的主要参数

工业相机是将目标物体的表面特征信息转化为数字信号&#xff08;或者模拟信号&#xff09;的一种采集设备。 一、工业相机的成像原理 工业相机主要由光电传感器和转换电路组成。 光线照射到被检测物体的表面&#xff0c;反射光经过透镜&#xff0c;再进入相机的光电传感器&a…

从报名到领证:软考初级【信息系统运行管理员】报名考试全攻略

本文共计9991字&#xff0c;预计阅读33分钟。包括七个篇章&#xff1a;报名、准考证打印、备考、考试、成绩查询、证书领取及常见问题。 一、报名篇 报名条件要求&#xff1a; 1.凡遵守中华人民共和国宪法和各项法律&#xff0c;恪守职业道德&#xff0c;具有一定计算机技术…

flask基础3-蓝图-cookie-钩函数-flask上下文-异常处理

目录 一&#xff1a;蓝图 1.蓝图介绍 2.使用步骤 3.蓝图中的静态资源和模板 二.cookie和session 1.cookie 2.flask中操作cookie 3.session 4.session操作步骤 三.请求钩子 四.flask上下文 1.介绍 2.请求上下文&#xff1a; 3.应用上下文 3.g对象 五&#xff1a;…

STM32高级控制定时器(STM32F103):TIM1和TIM8介绍

目录 概述 1 认识TIM1和TIM8 2 TIM1和TIM8的特性 3 TIM1和TIM6时基和分频 3.1 时基单元 3.2 预分频 3.3 时基和分频相关寄存器 3.3.1TIMx_CR1 3.3.2 TIMx_PSC 概述 本文主要介绍STM32高级定时器TIM1和TIM8的功能&#xff0c;还介绍了与之相关的寄存器的配置参数。包括…

如何在3天内开发一个鸿蒙app

华为鸿蒙操作系统&#xff08;HarmonyOS&#xff09;自2.0版本正式上线以来&#xff0c;在短时间内就部署超过了2亿台设备&#xff0c;纵观全球操作系统的发展史&#xff0c;也是十分罕见的。与其他手机操作系统不同&#xff0c;HarmonyOS自诞生之日起&#xff0c;就是一款面向…

layui一个页面多个table显示时工具栏被下方的table遮挡

记录&#xff1a;layui一个页面多个table显示时工具栏被下方的table遮挡 css代码&#xff1a; [lay-idcurrentTableId] .layui-table-tool {position: relative;z-index: 9999;width: 100%;min-height: 50px;line-height: 30px;padding: 10px 15px;border-width: 0;border-bot…

c#中上传超过30mb的文件,接口一直报404,小于30mb的却可以上传成功

在一次前端实现上传视频文件时,超过30mb的文件上传,访问接口一直报404,但是在Swagger中直接访问接口确是正常的,且在后端控制器中添加了限制特性,如下 但是却仍然报404,在apifox中请求接口也是报404, 网上说: 在ASP.NET Core中,配置请求过来的文件上传的大小限制通常…

jfif格式怎么转换成jpg?关于将jfif转成jpg的几种方法

jfif格式怎么转换成jpg&#xff1f;JFIF格式是一种常见的图像文件格式&#xff0c;通常用于存储数字照片。然而&#xff0c;在某些情况下&#xff0c;你可能需要将JFIF格式转换为JPG格式。JPG格式是一种广泛使用的图像格式&#xff0c;它被支持和接受的程度比JFIF更高。PNG是一…