titlepy 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
titlepy-1.0.0/LICENSE ADDED
File without changes
titlepy-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: titlepy
3
+ Version: 1.0.0
4
+ Summary: A lightweight Python library for changing Windows console titles
5
+ Home-page: https://github.com/SupremeXD4925/TitleLibrary
6
+ Author: SupremeXD4925
7
+ Author-email: neon321ontg@gmail.com
8
+ Project-URL: Homepage, https://github.com/SupremeXD4925/TitleLibrary
9
+ Project-URL: Repository, https://github.com/SupremeXD4925/TitleLibrary
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Requires-Python: >=3.6
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Dynamic: author-email
16
+ Dynamic: home-page
17
+ Dynamic: license-file
18
+ Dynamic: requires-python
19
+
20
+ ### HOW TO USE title.py ###
21
+
22
+ 1) pip install title (If i put on pip pakage)
23
+ 2) Minimum py 3.6
24
+ 3) Create a basic file:
25
+
26
+ ```py
27
+
28
+ from title import *
29
+
30
+ title.init()
31
+
32
+ title("TITLE HERE")
33
+ input("")
34
+
35
+
36
+ ```
37
+
38
+ 4) Run & Done !
@@ -0,0 +1,19 @@
1
+ ### HOW TO USE title.py ###
2
+
3
+ 1) pip install title (If i put on pip pakage)
4
+ 2) Minimum py 3.6
5
+ 3) Create a basic file:
6
+
7
+ ```py
8
+
9
+ from title import *
10
+
11
+ title.init()
12
+
13
+ title("TITLE HERE")
14
+ input("")
15
+
16
+
17
+ ```
18
+
19
+ 4) Run & Done !
@@ -0,0 +1,26 @@
1
+
2
+ [build-system]
3
+ requires = ["setuptools>=77.0.3"]
4
+ build-backend = "setuptools.build_meta"
5
+
6
+ [project]
7
+ name = "titlepy"
8
+ version = "1.0.0"
9
+ description = "A lightweight Python library for changing Windows console titles"
10
+ readme = "README.md"
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ {name = "SupremeXD4925"}
14
+ ]
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Operating System :: Microsoft :: Windows"
18
+ ]
19
+
20
+ [project.urls]
21
+ Homepage = "https://github.com/SupremeXD4925/TitleLibrary"
22
+ Repository = "https://github.com/SupremeXD4925/TitleLibrary"
23
+
24
+ [tool.setuptools.packages.find]
25
+ where = ["."]
26
+ include = ["title*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
titlepy-1.0.0/setup.py ADDED
@@ -0,0 +1,20 @@
1
+ from setuptools import setup
2
+
3
+ setup(
4
+ name="title", # Name of the library
5
+ version="1.0.0", # Version of the library
6
+ py_modules=["title"], # This will include the title.py module
7
+ description="A simple Python library to change the terminal window title", # Short description
8
+ author="SupremeXD", # Your name (can be your real name or handle)
9
+ author_email="neon321ontg@gmail.com", # Your email
10
+ url="https://github.com/SupremeXD4925/TitleLibrary", # URL to the library (GitHub repo, for example)
11
+ long_description=open('README.md').read(), # A long description, usually from README.md
12
+ long_description_content_type="text/markdown", # Content type for the README
13
+ license="MIT", # License for your code
14
+ classifiers=[ # Classifiers help people find your package
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ],
19
+ python_requires='>=3.6', # Specify the minimum Python version needed
20
+ )
titlepy-1.0.0/title.py ADDED
@@ -0,0 +1,30 @@
1
+ import sys
2
+ import os
3
+
4
+ class Title:
5
+ def __init__(self):
6
+ """Initialize the Title object."""
7
+ pass
8
+
9
+ def init(self):
10
+ """Initialize the title object (if not already initialized)."""
11
+ if not hasattr(self, "_initialized"):
12
+ # This ensures the Title instance is created only once
13
+ self._initialized = True
14
+ self.set_title("")
15
+
16
+ def set_title(self, title):
17
+ """Set the console window title for supported platforms."""
18
+ if sys.platform == "win32":
19
+ # For Windows, use the 'title' command
20
+ os.system(f'title {title}')
21
+ elif sys.platform == "darwin" or sys.platform == "linux" or sys.platform == "cygwin":
22
+ # For UNIX-like systems (Linux, macOS), use escape sequences
23
+ print(f"\033]0;{title}\007", end="", flush=True)
24
+
25
+ def __call__(self, title):
26
+ """Allow the title to be set directly as a callable."""
27
+ self.set_title(title)
28
+
29
+ # Initialize a global instance for use in the module
30
+ title = Title()
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: titlepy
3
+ Version: 1.0.0
4
+ Summary: A lightweight Python library for changing Windows console titles
5
+ Home-page: https://github.com/SupremeXD4925/TitleLibrary
6
+ Author: SupremeXD4925
7
+ Author-email: neon321ontg@gmail.com
8
+ Project-URL: Homepage, https://github.com/SupremeXD4925/TitleLibrary
9
+ Project-URL: Repository, https://github.com/SupremeXD4925/TitleLibrary
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Requires-Python: >=3.6
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Dynamic: author-email
16
+ Dynamic: home-page
17
+ Dynamic: license-file
18
+ Dynamic: requires-python
19
+
20
+ ### HOW TO USE title.py ###
21
+
22
+ 1) pip install title (If i put on pip pakage)
23
+ 2) Minimum py 3.6
24
+ 3) Create a basic file:
25
+
26
+ ```py
27
+
28
+ from title import *
29
+
30
+ title.init()
31
+
32
+ title("TITLE HERE")
33
+ input("")
34
+
35
+
36
+ ```
37
+
38
+ 4) Run & Done !
@@ -0,0 +1,9 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ title.py
6
+ titlepy.egg-info/PKG-INFO
7
+ titlepy.egg-info/SOURCES.txt
8
+ titlepy.egg-info/dependency_links.txt
9
+ titlepy.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ title