Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Mapping a value to an interval
Post: RE: Mapping a value to an interval

What have you tried?
menator01 General Coding Help 12 364 Mar-17-2023, 09:04 AM
    Thread: write the password in the Terminal
Post: RE: write the password in the Terminal

Perhaps you can use subprocess. Here is an example from here I'm on my windows box but can be edited for linux import subprocess p = subprocess.Popen(['dir'], shell=True, stdin=subprocess.PIPE, stdo...
menator01 General Coding Help 3 242 Mar-16-2023, 09:25 AM
    Thread: Sent email based on if condition
Post: RE: Sent email based on if condition

You could add it to a list, then send the list after all devices are appended.
menator01 General Coding Help 1 200 Mar-15-2023, 08:54 AM
    Thread: what's wrong? i know this is simple
Post: RE: what's wrong? i know this is simple

Another way. generates a random 10 character password import os from random import choices from string import digits, ascii_letters # Define a function to generate and return a 10 character password...
menator01 General Coding Help 11 399 Mar-15-2023, 08:50 AM
    Thread: what's wrong? i know this is simple
Post: RE: what's wrong? i know this is simple

Here is another way of doing it import os # Set a password variable mypassword = 'test123' # Define a function to clear the terminal def clear(): return os.system('cls' if os.name == 'nt' else ...
menator01 General Coding Help 11 399 Mar-15-2023, 08:34 AM
    Thread: what's wrong? i know this is simple
Post: RE: what's wrong? i know this is simple

Don't know if it's your issue but you are reassigning repeat
menator01 General Coding Help 11 399 Mar-15-2023, 01:07 AM
    Thread: How to append integers from file to list?
Post: RE: How to append integers from file to list?

Just to throw out one more way in_text = "202 137 390 235 114 369 198 110 350 396 390 383 225 258 38 291 75 324 401 142 288 397" nums = [int(n) for n in list(in_text.split())] print(nums)Output:[202,...
menator01 General Coding Help 8 526 Mar-10-2023, 10:37 PM
    Thread: Insert CSV - GUI Window
Post: RE: Insert CSV - GUI Window

A couple of links from duckduckgo https://www.python.org/about/gettingstarted/ https://www.w3schools.com/python/
menator01 General Coding Help 3 296 Feb-27-2023, 07:51 AM
    Thread: tuple indices must be integers or slices, not str
Post: RE: tuple indices must be integers or slices, not ...

What do you get when you print this? image_ext = img['str']
menator01 General Coding Help 15 1,372 Feb-22-2023, 07:02 PM
    Thread: Cannot get started
Post: RE: Cannot get started

Did you try py -m venv venv?
menator01 General Coding Help 4 278 Feb-22-2023, 04:07 PM
    Thread: Flask error sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint
Post: RE: Flask error sqlalchemy.exc.IntegrityError: (sq...

Is the entry already in the database?
menator01 Web Scraping & Web Development 2 423 Feb-20-2023, 07:43 PM
    Thread: Merging multiple csv files with same X,Y,Z in each
Post: RE: Merging multiple csv files with same X,Y,Z in ...

What have you tried?
menator01 General Coding Help 3 260 Feb-20-2023, 06:02 PM
    Thread: input variable choice
Post: RE: input variable choice

As mentioned above read through the docs on input and variables. An example would be choose = input('Will you fight for good or bad?\n>> ').lower() if choose == 'good': print('Good') elif ...
menator01 General Coding Help 7 308 Feb-19-2023, 07:05 PM
    Thread: Python for web apps - where to start?
Post: RE: Python for web apps - where to start?

In my opinion, if you want to learn and build from the ground up, then Flask is the way to go. If you want already built modules, then Django is the way to go. Really depends on where you want to star...
menator01 Web Scraping & Web Development 5 479 Feb-18-2023, 06:26 PM
    Thread: Read text file, modify it then write back
Post: RE: Read text file, modify it then write back

If you're just wanting to remove the line with : in it you could do this I'm using an in file and out file. Can be modified to just use one file. in_file = 'Python/aaa.txt' out_file = 'Python/aaa_cop...
menator01 General Coding Help 5 348 Feb-18-2023, 10:56 AM
    Thread: while loop not working-I am using sublime text editor
Post: RE: while loop not working-I am using sublime text...

Please post code in bb tags to hold formatting. Maybe something like this print('Please enter the name of cities.\nEnter quit when finished') while True: city = input('>> ') if city.l...
menator01 General Coding Help 4 291 Feb-03-2023, 07:43 PM
    Thread: global variables
Post: RE: global variables

The error means that you are trying to use a variable that is not set. Globals are usually frowned upon. If you want a variable used throughout the class use self.variable in the class. class MyClass...
menator01 General Coding Help 3 430 Jan-17-2023, 05:37 PM
    Thread: Newbie here. Create an array from file data?
Post: RE: Newbie here. Create an array from file data?

Have a look at python list
menator01 Homework 2 575 Jan-13-2023, 01:39 AM
    Thread: Python VS Code: using print command twice but not getting output from terminal
Post: RE: Python VS Code: using print command twice but ...

Please post code using bbcode tags. Makes it easier to help.
menator01 General Coding Help 4 361 Jan-12-2023, 07:45 PM
    Thread: First Day using Python. NEED Simple Math CODE HELP!
Post: RE: First Day using Python. NEED Simple Math CODE ...

What have you tried?
menator01 Homework 4 641 Jan-11-2023, 08:37 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020