Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Error creating database with python and form?
Post: Error creating database with python and form?

I pass the database name from form to the cdb.py it is successful, but the mariadb query "CREATE DATABASE ?" cannot get the value i think so, this is cdb.py # Get Cursor cur = conn.cursor() # creating...
shams General Coding Help 3 2,351 Aug-01-2021, 11:59 AM
    Thread: Error using mariadb select query with form in python?
Post: RE: Error using mariadb select query with form in ...

I made some changes to the var.py now when run the code get this stuff in the web browser: 4 --> --> ProgrammingError Python 3.9.6: /usr/bin/python Thu Jul 29 16:51:21 2021 A problem occurr...
shams General Coding Help 2 1,989 Jul-29-2021, 12:30 PM
    Thread: Error using mariadb select query with form in python?
Post: RE: Error using mariadb select query with form in ...

There was another python code in the cgi-bin causing the error of "Missing parentheses" i remove that code from the cgi-bin now when run the index.html get the same error in the web browser but the er...
shams General Coding Help 2 1,989 Jul-29-2021, 07:57 AM
    Thread: Error using mariadb select query with form in python?
Post: Error using mariadb select query with form in pyth...

I want to use form with mariadb in python, i want to pass the id from form to mariadb select query to print the selected table row, this is index.html <form action = "/cgi-bin/var.py" method = "ge...
shams General Coding Help 2 1,989 Jul-28-2021, 11:36 AM
    Thread: open the html page from the django dropdown menu?
Post: RE: open the html page from the django dropdown me...

finally the solution was i added this two lines to views.py: hpage= str(city[0]) webbrowser.open('http://example.com/'+hpage)
shams General Coding Help 2 3,319 Jul-17-2021, 08:10 AM
    Thread: open the html page from the django dropdown menu?
Post: RE: open the html page from the django dropdown me...

I made this modification to the views.py: cursorC.execute(query[2]) city=cursorC.fetchone() html="Country : "+str(country[0])+"</br>State : "+str(state[0])+"</br>City : "+str(c...
shams General Coding Help 2 3,319 Jul-17-2021, 06:59 AM
    Thread: open the html page from the django dropdown menu?
Post: open the html page from the django dropdown menu?

I got this django country, state, city dropdown code and changed the mysql db and tables for my use, thisi is views.py: # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.tem...
shams General Coding Help 2 3,319 Jul-14-2021, 12:58 PM
    Thread: how to remove \n from file?
Post: RE: how to remove \n from file?

Thanks for the help i just changed to update the retriever instead of option, now every thing is going ok.
shams General Coding Help 7 3,241 Feb-04-2021, 07:56 AM
    Thread: how to remove \n from file?
Post: RE: how to remove \n from file?

i added the lines as this: my_config="""[options] verbose = 1 read_all = false delete = true received = false delivered_to = false message_log = /home/mail/log message_log_verbose = true [retriever] ...
shams General Coding Help 7 3,241 Feb-04-2021, 07:27 AM
    Thread: how to remove \n from file?
Post: RE: how to remove \n from file?

Thanks for replies, yes also the problem was with the white spaces after \n i remove the all spaces after \n now it working, also special thanks to buran for the perfect code, it is working nice, the ...
shams General Coding Help 7 3,241 Feb-04-2021, 07:00 AM
    Thread: how to remove \n from file?
Post: how to remove \n from file?

This python code writing configuration file for getmail to retrieve the mail, in the first and last f.write code i use the "\n" to break the lines for new line: cur = conn.cursor() query = "SELECT u...
shams General Coding Help 7 3,241 Feb-03-2021, 04:07 PM
    Thread: write mariadb table rows query to each file?
Post: write mariadb table rows query to each file?

I want to query table pop and write each row to a deferent file, this is code, but the code write the last row to all three files: # Create a cursor object cur = conn.cursor() query = f"SELECT user...
shams General Coding Help 1 1,865 Feb-02-2021, 03:45 PM

User Panel Messages

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