Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Assistance with a PHP-based project
Post: RE: Assistance with a PHP-based project

This forum is not related to PHP,its about Python
Mateusz News and Discussions 3 1,127 Oct-31-2022, 09:18 AM
    Thread: can't install python
Post: RE: can't install python

How are you trying to install Python? Please provide more details
Mateusz General Coding Help 3 1,760 Oct-30-2022, 07:56 PM
    Thread: script that handle windows notifications.
Post: RE: script that handle windows notifications.

Check this out https://github.com/jithurjacob/Windows-1...ifications EDIT: Sorry, you want to detect... my bad. Checkout pywin32 library for detecting window on some x y coordinates on your desktop.
Mateusz General Coding Help 1 2,301 Apr-10-2020, 12:47 PM
    Thread: start interactive pyhton shell with pre-loaded custom modules
Post: RE: start interactive pyhton shell with pre-loaded...

Show us your modules, because it's working. a.py def a(): print("hello")main.py import a import code >>> a.a() hello
Mateusz General Coding Help 2 2,188 Apr-09-2020, 08:18 AM
    Thread: Trouble with Sudoku Solver
Post: RE: Trouble with Sudoku Solver

Quote:Simple is better than complex puzzle = [["3"," "," ", "8"," ","1", " "," ","2"], ["2"," ","1", " ","3"," ", "6"," ","4"], [" "," "," ", "2"," ","4", " "," "," "],...
Mateusz General Coding Help 2 2,142 Apr-08-2020, 06:56 AM
    Thread: email attachement with non-ascii characters will be renamed
Post: RE: email attachement with non-ascii characters wi...

Right, my bad. Go back with your previous version. What is your output of print(msg) before send? Because I tried your code (without sending so far). Do you have information about 'utf-8' and filename...
Mateusz Networking 4 4,359 Apr-07-2020, 06:20 PM
    Thread: Using Dictionaries
Post: RE: Using Dictionaries

Just like you put an example.. user_details = { 1:[some details], 2:[dome details] } if _id in user_details: user_details[_id].append(details)
Mateusz General Coding Help 1 1,453 Apr-07-2020, 03:51 PM
    Thread: Cx Freeze to exe - HELP
Post: RE: Cx Freeze to exe - HELP

Run .exe from command line and show us result - there should be traceback what happend. If not try to make .exe with flag, in PyInstaller is debug option: --log-level LEVEL
Mateusz General Coding Help 5 3,855 Apr-07-2020, 11:55 AM
    Thread: Socket won't connect, giving me a typeerror
Post: RE: Socket won't connect, giving me a typeerror

It seems that you did not convert to int (or did it badly) because below code works properly. clientsocket.connect((host, int(port)))
Mateusz Networking 1 3,385 Apr-07-2020, 10:28 AM
    Thread: installing third-party modules
Post: RE: installing third-party modules

Try to avoid installing via pip outside the virtual environment. python -m venv <you_venv_name> # then activate your venv <your_venv_name>\Scripts\activate.bat # now you can use pip safel...
Mateusz General Coding Help 5 3,422 Apr-07-2020, 09:04 AM
    Thread: email attachement with non-ascii characters will be renamed
Post: RE: email attachement with non-ascii characters wi...

Try something like this: filename=file.encode('utf-8')
Mateusz Networking 4 4,359 Apr-07-2020, 05:47 AM
    Thread: Adding second message to simple loop error
Post: RE: Adding second message to simple loop error

Missed ')' print(magician.title() + ", that was a great trick!")
Mateusz General Coding Help 2 2,075 Apr-06-2020, 11:43 AM
    Thread: dict and __dict__
Post: RE: dict and __dict__

Because your object has no attribute dict when every object in python has attribute __dict__ which maps all objects attribute to it's value. More detaild in doc: https://docs.python.org/3/library/s...
Mateusz General Coding Help 1 2,654 Apr-05-2020, 07:45 PM
    Thread: Get list of Video Device in python on Windows machine
Post: RE: Get list of Video Device in python on Windows ...

Try use pywin32 if Windows: import win32com.client wmi = win32com.client.GetObject ("winmgmts:") for usb in wmi.InstancesOf ("Win32_USBHub"): print usb.DeviceIDMore details here: https://stackove...
Mateusz General Coding Help 1 10,464 Apr-03-2020, 06:57 PM
    Thread: Creating a pdf from file
Post: RE: Creating a pdf from file

Quote:The data from Description and Code_Snippet are multiple lines and are displaying as a single line as shown above Please provide example for multiple lines. What kind of widgets they are? Tkinte...
Mateusz General Coding Help 4 2,317 Apr-03-2020, 04:58 PM
    Thread: Supreme Cop Bot
Post: RE: Supreme Cop Bot

Shouldn't be webbrowser.open("http://www.python.org") ?
Mateusz General Coding Help 2 1,577 Apr-03-2020, 02:09 PM
    Thread: Help! Lists
Post: RE: Help! Lists

Please edit your post end put your code in formatter.
Mateusz General Coding Help 7 2,856 Apr-03-2020, 12:28 PM
    Thread: How to change directory to any folder where python is not installed ?
Post: RE: How to change directory to any folder where py...

You have to add directory containing python.exe to system environment variable PATH. Then you can call python from every place you want.
Mateusz General Coding Help 4 2,608 Apr-03-2020, 10:07 AM
    Thread: Creating a pdf from file
Post: RE: Creating a pdf from file

Hi, I tried this code on my computer: from fpdf import FPDF pdf = FPDF(orientation='P', unit='mm', format='A3') pdf.add_page() pdf.set_font("Arial", size = 10) pdf.cell(200, 10, txt = "PBSnippet"...
Mateusz General Coding Help 4 2,317 Apr-03-2020, 06:52 AM
    Thread: exec() in class, NameError
Post: RE: exec() in class, NameError

Because print function set te locals variables. See below: def rysuj(self, frame, tuptus): for bu in tuptus: def foo(): print(locals()) exec('self.'+'y_coord') ...
Mateusz General Coding Help 6 3,963 Apr-02-2020, 12:50 PM

User Panel Messages

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