Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Python Security
Post: RE: Python Security

suggest you start by reading the following: Python Security and Security Considerations
Larz60+ General Coding Help 1 207 Mar-06-2024, 08:24 PM
    Thread: Saving a manytomany form
Post: RE: Saving a manytomany form

Line 7 'Article' never defined The error is for 'Article' not 'articles' not case and plural, not singular.
Larz60+ General Coding Help 2 252 Mar-04-2024, 12:02 PM
    Thread: Organization of project directories
Post: RE: Organization of project directories

FYI: I never start a bona fide project without first creating a virtual environment. One of the main reasons is that each project can have it's own version of python. There are many other benefits, s...
Larz60+ General Coding Help 3 343 Mar-02-2024, 03:34 PM
    Thread: Malicious PyPI Packages Slip WhiteSnake InfoStealer Malware onto Windows Machines
Post: RE: Malicious PyPI Packages Slip WhiteSnake InfoSt...

This is important to know! Everyone should check their repositories for any of the offending packages. pip list | sort Linux, or similar on other OS, can be used to compare against the list on Hacker ...
Larz60+ News and Discussions 3 461 Jan-30-2024, 11:56 AM
    Thread: Produce One file Per PurchaseOrder
Post: RE: Produce One file Per PurchaseOrder

this can be done quite easily with pandas. see: pandas.read_sql pandas.DataFrame.to_csv Working with text data Note CSV is comma separated text file.
Larz60+ General Coding Help 1 275 Jan-26-2024, 11:38 AM
    Thread: Apache Module
Post: RE: Apache Module

you might want to look here: https://pypi.org/search/?q=web
Larz60+ Web Scraping & Web Development 2 437 Jan-26-2024, 11:25 AM
    Thread: Converting .txt to .csv file
Post: RE: Converting .txt to .csv file

how about: >>> import csv >>> fauxfile = [ 'mary had\ta little\tlamb', 'Its Fleece was\twhite as snow'] >>> for n, item in enumerate(fauxfile): ... fauxfile[n] = item.re...
Larz60+ General Coding Help 21 11,630 Jan-20-2024, 10:03 AM
    Thread: SendKeys not working
Post: RE: SendKeys not working

where is your keys class? what did you define there? see docs
Larz60+ General Coding Help 4 367 Jan-16-2024, 11:12 AM
    Thread: Stuck with using lists to solve task
Post: RE: Stuck with using lists to solve task

this is much easier if you define a function: example: # zero = open, 1 = close doors = [1] * 100 # assumption all doors closed at start ... change to 0 if all open def change_door(door_list, ...
Larz60+ Homework 9 716 Jan-15-2024, 11:46 AM
    Thread: Python code to set column width
Post: RE: Python code to set column width

you can set max column width with set_options and also set precision for floats, much more.
Larz60+ General Coding Help 11 847 Jan-14-2024, 04:47 AM
    Thread: If statement question help
Post: RE: If statement question help

deanhystad Wrote:guard will always be True if you type anything for input("True or false the guard is present on the gate")Correct. didn't pay attention to input statement. Normally a boolean value i...
Larz60+ Homework 4 556 Jan-09-2024, 09:31 AM
    Thread: If statement question help
Post: RE: If statement question help

place the parenthesis around the complex condition like if (daytime < 7 or daytime > 17) and guard: note: you don't need guard == True, as the condition will be true without.
Larz60+ Homework 4 556 Jan-08-2024, 07:34 PM
    Thread: Compare folder A and subfolder B and display files that are in folder A but not in su
Post: RE: Compare folder A and subfolder B and display f...

for getting list of files, use pathlib instead of os: from pathlib import Path home = Path(".") base = home / "Folder-Oana" folder1 = base / "extracted" folder2 = base / "translated" def get_folde...
Larz60+ General Coding Help 3 444 Jan-05-2024, 01:07 PM
    Thread: How to run utilities from a Python package?
Post: RE: How to run utilities from a Python package?

venv creates a python virtual environment, which by default isolates your project site packages from system level site packages it has it's own copy of the python interpreter thus allowing different p...
Larz60+ General Coding Help 1 368 Dec-27-2023, 12:00 PM
    Thread: Help needed in finding a library for this project
Post: RE: Help needed in finding a library for this proj...

FYI: you may also want to take a look at Doug Hellmann's PYMOTW3 on datetime here. This is an excellent write-up with many examples.
Larz60+ General Coding Help 7 697 Dec-25-2023, 04:25 PM
    Thread: filtering a list of dictionary as per given criteria
Post: RE: filtering a list of dictionary as per given cr...

what have you tried so far? Please show your code attempt, working or not.
Larz60+ General Coding Help 5 573 Dec-22-2023, 08:12 PM
    Thread: Assigning conditional values in Pandas
Post: RE: Assigning conditional values in Pandas

This code was written using Iron python link here There shouldn't be any massive changes since 2017. I present this link as an aid.
Larz60+ Data Science 3 700 Dec-19-2023, 03:10 AM
    Thread: Assigning conditional values in Pandas
Post: RE: Assigning conditional values in Pandas

you must elaborate, there's not enough information here. what are the error codes? what does train_test_data structure look like, etc. Also, code needs to be a snippet that can be run, or at least, on...
Larz60+ Data Science 3 700 Dec-15-2023, 09:37 PM
    Thread: Enigma Decoding Problem
Post: RE: Enigma Decoding Problem

You might be interested in this old enigma thread.
Larz60+ General Coding Help 4 599 Dec-14-2023, 10:42 AM
    Thread: return none
Post: RE: return none

functions, unless told to do otherwise will return None. Place a return statement in your code to return what you wish. for example: return description2
Larz60+ General Coding Help 7 755 Dec-13-2023, 02:36 AM

User Panel Messages

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