Dev Shed Forums - Python Programming http://forums.devshed.com/ Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language. en Sat, 20 Jan 2018 21:23:22 GMT vBulletin 60 http://forums.devshed.com/images/misc/rss.png Dev Shed Forums - Python Programming http://forums.devshed.com/ <![CDATA[[Python 3, PIP Wheel] Problem with install pip wheel package.... help needed!]]> http://forums.devshed.com/python-programming/979881-python-3-pip-wheel-install-pip-wheel-package-help-new-post.html Fri, 19 Jan 2018 18:05:15 GMT Hey Python Programmers... I try to install the python wheel package on windows 7 and 10... I get the pip wheel package in my python path (in the Lib folder), on my computer... and i use pip with the follow command: ---Quote--- pip install wheel ---End Quote--- But if i call this command in the command prompt, Hey Python Programmers...

I try to install the python wheel package on windows 7 and 10...
I get the pip wheel package in my python path (in the Lib folder),
on my computer... and i use pip with the follow command:
Quote:

pip install wheel
But if i call this command in the command prompt,
i get an big error with red text... I can't let you see
what for error i get, the problem is thad i can't copy
this error to give more information.

Even i get try my pip wheel package into the python36-32 folder
and get the same problem if i install the pip wheel package...

Can anyone help me to give strict information, about how i
can lost the problem thad i get ?...

Please give me all steps (incl. screenshots) to lost the problem,
just i can install the pip wheel package and the .whl librarys
i want install for my projects !....

Even numpy and opencv will not be installing on my computer...
I want to install it, but i get many problems with the pip wheel package...

Thanks for help, Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/python-3-pip-wheel-install-pip-wheel-package-help-979881.html
PyQt5 http://forums.devshed.com/python-programming/979875-pyqt5-new-post.html Thu, 18 Jan 2018 23:26:39 GMT Hi all. I've sort of got my head around Tkinter and managed to build a gui that accepts values, saves them to a SQLite3 database, manipulates the data then present it in the same gui. I decided to try to do the same thing with PyQt5 as I thought it would be interesting to see if I could then convert it to an Android app. The only tutorials that I've found so far have either returned the data in a pop-up window or on the console. Can someone please direct me to a tutorial or other information that can help me please.

I realise that this might be a pretty dumb question, but it is really bugging me at this time. ]]>
Python Programming Bushranger http://forums.devshed.com/python-programming-11/pyqt5-979875.html
<![CDATA[[Python 3] writing for loop txt file give strainge result, help needed!]]> http://forums.devshed.com/python-programming/979866-python-3-writing-loop-txt-file-strainge-result-help-new-post.html Wed, 17 Jan 2018 16:23:36 GMT Hey Python Programmers...

I try to write an for loop file as an .txt document... but it will be give an strainge result...
This is my code, writting in python 3:

Code:

file = open("Doc.txt", "w")


names = ["Jamie", "Vinnie", "Bennie", "Liesbeth", "Dylan", "Marvin", "Malaicka", "Chelsea"]

for names in names:
    file.write(names)


file.close()

print(file)


But my writting .txt document result as this:
Quote:

JamieVinnieBennieLiesbethDylanMarvinMalaickaChelsea
If you can see, my list must be writted under each name... but it don't happend...

Here an example for the result thad i want (writting on the forum, this is no .txt file:
Quote:

Jamie
Vinnie
Bennie
Liesbeth
Dylan
Malaicka
Chelsea
This is an example for the just result about how it hearth, but my script doesn't this...
Can anyone help me to correct my code, just i can expiriment with it ?...

Thanks for help, Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/python-3-writing-loop-txt-file-strainge-result-help-979866.html
<![CDATA[[Python 3] Prompt Saver/Loader, help needed!]]> http://forums.devshed.com/python-programming/979845-python-3-prompt-saver-loader-help-new-post.html Tue, 16 Jan 2018 10:52:59 GMT Hey Python Programmers... How can i create an command prompt in python 3, thad my users can start an project to give it an name as example this: Code: --------- # JCads Prompter - By Jamie van Cadsand: Hey Python Programmers...

How can i create an command prompt in python 3, thad my users can start an project
to give it an name as example this:

Code:

# JCads Prompter - By Jamie van Cadsand:

prompt_projectGet = str(input("Choose 'New' or 'Load': "))
prompt_projectName = str(input("Project Name: "))
prompt_projectStart = str(input("Choose bewteen '+', '-' or 'x'...: "))

if(prompt_projectGet = 'New'):
    prompt_projectGet = 'New'
    pStart():
elif(prompt_projectGet = 'Load'):
    # Load your project from the foldername with the given project name...
else:
    print("Error: We don't support other chooses... quit JCads Prompter....")
    quit()



def pStart():
    if(prompt_projectStart == '+'):
        prompt_projectStart = '+'
        startCalculatePlus()
    ....



I know how i can working with if startuments....... but now the problem...

- How can i create an prompt loader or saver like this and the code above ?...:
Code:

prompt_projectSave = str(input("Do you want save our project ?... 'Yes' or 'No': "))

if(prompt_projectSave == 'Yes'):
    prompt_projectSave = 'Yes'
    # Save your project... with the at begin gived project name
elif(promot_projectSave == 'No'):
    # Further with your project...
else:
    print("Error: we don't support this!... quit JCads Prompter")
    quit()




I get help needed to understand how i can create an easy project saver and loader
for an prompt, writted in the current version of python 3.......

Can anyone help me with my wish ?... to give an code so simple as possible ?...

Thanks for help, Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/python-3-prompt-saver-loader-help-979845.html
<![CDATA[[Python 3 + Tkinter] On/Off Checkbutton not works, help needed!]]> http://forums.devshed.com/python-programming/979794-python-3-tkinter-checkbutton-help-new-post.html Mon, 08 Jan 2018 20:24:53 GMT Hey Python Programmers...

I Try to create an on/off check button for winsounds, but it doesn't works.
This is my code:

Code:

import winsound
from tkinter import *

main = Tk()

def addButtons():

    def playExit():
        winsound.PlaySound('SystemExit', winsound.SND_ALIAS)

    def playExc():
        winsound.PlaySound('SystemExclamation', winsound.SND_ALIAS)

    def playTing():
        winsound.PlaySound('*', winsound.SND_ALIAS)
           
    buttonexit = Button(main, text = "Play Exit", command = playExit)
    buttonexc = Button(main, text = "Play Exc", command = playExc)
    buttonting = Button(main, text = "Play All", command = playTing)

    buttonexit.pack()
    buttonexc.pack()
    buttonting.pack()


cvar = IntVar()


checkbutton = Checkbutton(main, text = 'my Test', variable = cvar, onvalue = 1, offvalue = 0, command = addButtons)
checkbutton.pack()

if checkbutton.onvalue == 1:
    cvar.set(addButtons)
else:
    cvar.set(0)


If i run this script, i get an error and my buttons adding again by pressing
the on/off button...

Can anyone help me to correct my code, just i can expiriment with it ?...

Thanks for correct my code, Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/python-3-tkinter-checkbutton-help-979794.html
<![CDATA[[Python 3 + Tkinter] Checkbutton not show]]> http://forums.devshed.com/python-programming/979774-python-3-tkinter-checkbutton-new-post.html Thu, 04 Jan 2018 20:07:56 GMT Hey Python Programmers...

I try to create an checkbox they can convert the image to 'RGB' or to 'L'... but
this checkbutton is not showing... this is my code:

f
Code:

rom tkinter import *
from tkinter import ttk
from tkinter.filedialog import askopenfilename
from PIL import Image, ImageTk



main = Tk()
main.geometry("150x250+300+300")

def Open():
    temp = askopenfilename(parent = main, initialdir = 'C:/', filetypes = [('PNG File: ', '*.png')], title = 'Open Image')

    try:
        with open(temp) as filename:
            img = Image.open(temp)
            photo = ImageTk.PhotoImage(img)
            show = Label(main, image = photo)
            show.image = photo
            show.pack(padx = 10, pady = 10, side = RIGHT)
            show.geometry("20x20")

            var = IntVar()
            c = Checkbutton(main, text = 'Image Mode', variable = var, onvalue = img.convert('RGB'), offvalue = img.convert('L')).grid(row=0, sticky=W)
            c.pack(side = side, anchor = anchor, expand = YES)
           
    except:
        print('Image Not Exit')



menu = Menu(main)
main.config(menu=menu)

filemenu = Menu(menu, tearoff = 0)
filemenu.add_command(label = 'Open', command = Open)
menu.add_cascade(label = 'File', menu = filemenu)
   
main.mainloop()


Can you help me to correct my code, just i can expiriment with it ?...
Thanks for help, Jamie. ]]>
Python Programming JamieVanCadsand http://forums.devshed.com/python-programming-11/python-3-tkinter-checkbutton-979774.html