A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
<?php | |
# Fill our vars and run on cli | |
# $ php -f db-connect-test.php | |
$dbname = 'name'; | |
$dbuser = 'user'; | |
$dbpass = 'pass'; | |
$dbhost = 'host'; | |
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
To use Pyside2 as a framework to build a Windows GUI Program.
Build pages as class containers of pages simliar to how Sentdex has done this beautifully with Tkinter here https://www.youtube.com/watch?v=A0gaXfM1UN0&list=PLQVvvaa0QuDclKx-QpC9wntnURXVJqLyk&index=2
The first listed resource is a Stack Overflow answer from a while ago and mostly what my code is
from odoo import models, fields, api | |
from json_field import JsonField | |
class Person(models.Model): | |
_name = 'example.person' | |
_description = 'Person with json details' | |
details = JsonField() # a json object represented as dict / list / python primitives |
''' | |
Project: curinga | |
Time: 2020/03/07 01:37 | |
''' | |
import win32api | |
import win32print | |
import traceback | |
from tkinter.filedialog import askopenfilename | |
from tkinter import * |