15,190 Topics

Member Avatar for
Member Avatar for Arsal_1

How to make script like this? **$python script.py 1. Register 2. Login 3. View User Choose with number :** I can make a script for Register and Login, but i still confusing make a script for view user. Spoiler For View User: **Choose with number : 3** (If still not …

Member Avatar for Gribouillis
0
550
Member Avatar for IIMorphII

Hey, First: Hello, i'm new here :lol: And here my question: It's a very short question: Is it possible to get the screen size (resolution) with pygame and how do i get it?

Member Avatar for diliupgabadamudalige
0
17K
Member Avatar for suraj32

Hi, I have a python script that I run everyday at 00:00 as a cronjob & its lasts for about 5-6 hours. I want supervisor to monitor the script & restart if it hangs/crashes in the middle. I have done something like this: [program:python_script] command=python run.py directory=/home/user stdout_logfile=/home/user/py_out.log redirect_stderr=true autorestart=true …

Member Avatar for cereal
0
403
Member Avatar for reminem

Hello Everybody, I searched the the internet and this forum, but cannot find the solution for my problem. Started with python and have this code (part of): import requests `def Send_invitation(): data = {"bsn": e3.get(), "initialen": e2.get(), "achternaam": e1.get(), "geslacht": e4.get(), "geboortedatum": e5.get(), "postcode": e6.get(), "emailadres": e7.get(), "screening_type": e8.get()} response …

Member Avatar for reminem
0
330
Member Avatar for anonstu3

Where do I begin? How would I go about forming a code of my own that is 'original'? I have seen everything that has already been done before. I will accept any kind of help with examples and how to go about doing this. I am new at this and …

Member Avatar for Brandon Hatch
0
212
Member Avatar for aaron.breen.50

Alright i am totaly new to python and could really use some help. I need a program that will run and starting at "2:00" count down all the way to "0:00". The left side being minutes and the right side being seconds. so 120 seconds total. I have no idea …

Member Avatar for rproffitt
0
8K
Member Avatar for lavanyarao

I am getting this problem . my python code is for i,j in nltk.pos_tag(words): print i,j if 'JJ' in j: pj=(list(swn.senti_synsets(i,'a'))[0]).pos_score() print "pj:" ,pj elif 'RB' in j: pr =(list(swn.senti_synsets(i,'r'))[0]).pos_score() print "pr:" ,pr elif 'NN' in j: pn =(list(swn.senti_synsets(i,'n'))[0]).pos_score() print "pn:" ,pn elif 'VB' in j: pv =(list(swn.senti_synsets(i,'v'))[0]).pos_score() print "pv:" …

Member Avatar for Brandon Hatch
0
324
Member Avatar for giancan

Dear all, I need help with unicode. After reading a lot on several webpages I still cannot solve my problem. I have a wx window in python. In one field I set a filename, say "áio" (stupid name, but just to give you the idea). If I want to create …

Member Avatar for Gribouillis
0
314
Member Avatar for bumsfeld

Using the wx.lib.pdfwin.PDFWindow one can read Adobe PDF files (.pdf) with wxPython. The PDF file format is popular document file format allowing mixing of text and graphics. The GUI toolkit wxPython's newer wx.activex module allows one to use the ActiveX control, as if it would be one wx.Window. It actually …

Member Avatar for bucefala
0
2K
Member Avatar for eniacpx

I keep getting "List index out of range" when trying to execute this code, but for the life of me I cannot figure out why, If anyone has any experience coding linux gDesklets this would help. File: StockWatcher.display [code] ... parser.dataSet = stockInfo.html ... [/code] stockInfo.html is an object containing …

Member Avatar for Gribouillis
0
5K
Member Avatar for Bashy345

The code checks if the file exists I am struggling to complete this and save my database (gen0values) and make it open to a file in a table. def exportdata(): print("\nYou chose option 4") import os filename = input("Please type in the filename") if os.path.isfile(filename): print("File exists") else: print("File does …

Member Avatar for Gribouillis
0
390
Member Avatar for grand_78

Can someone please help me solve this problem? I've tried 20 different things and have had no such luck. The problem is: The Fast Freight Shipping Company charges the following rates: 2 pounds or less --- $1.50 per pound Over 2 pounds but not more than 6 pounds---$3.00 per pound …

Member Avatar for grand_78
0
229
Member Avatar for vegaseat

The Tkinter GUI toolkit comes with a scrolled text widget that is called ScrolledText. To get access to it you have to import it separately. It allows you to display large amounts of text in a small space.

Member Avatar for toyota_1
0
12K
Member Avatar for zoro007

Hello, I want help in python for checkbox form i use this html code <input name="do" type="checkbox" value="file1" /> <input name="do" type="checkbox" value="file2" /> <input name="do" type="checkbox" value="file3" /> <input name="do" type="checkbox" value="file4" /> ----------- and after submet for i in query.getvalue("do"): print "_%s_<br>" %(i) when i check more than …

Member Avatar for zoro007
0
174
Member Avatar for ashley9210_2

import random import time badmStudentsF = ["FNAME1","FNAME2","FNAME3","FNAME4","FNAME5"] badmStudentsM = ["MNAME1","MNAME2","MNAME3","MNAME4","MNAME5","MNAME6","MNAME7","MNAME8", "MNAME9", "MNAME10","MNAME11"] random.shuffle(badmStudentsM, random.random); random.shuffle(badmStudentsF, random.random); print "HackLab Groups : " + time.strftime("%Y-%m-%d %H:%M") print "++++++++++++++++++++++++++" for i in range(0,len(badmStudentsM),1): if i == 4 or i == 8 or i == 12 or i == 16 : print "------------------------------" for …

Member Avatar for rproffitt
0
375
Member Avatar for Julie_2

Program 8— Social Security Number Validation In this project, you will write a program to prompt the user to enter their social security number in the format ###-##-#### and then determine if the input is properly formatted. A properly formatted social security number will have: • A length of 11 …

Member Avatar for Anton_7
-1
3K
Member Avatar for <HHH>

i'm trying to import random & urllib.request libraries in sublime test but it give my the below error File "C:\Users\7oss\Desktop\print.py", line 47 import random IndentationError: expected an indented block Any ideas ?

Member Avatar for rproffitt
0
164
Member Avatar for Bashy345

Trying to make the user write to a file and seeing if it exists and if they should override it print("Enter a file name to save your database to.") name = input('Enter name of text file: ')+'.txt' if name print ("Would you like to overwrite this file? Yes or No") …

Member Avatar for Gribouillis
0
272
Member Avatar for Niloofar24

Hello. I want to insert data into django db from a function in the **views.py** file. I'm using **linux**, **python 3.4**, **django 1.8.2**, **PyMySQL**

Member Avatar for Niloofar24
0
12K
Member Avatar for render786

I am currently working on a code and there are three tasks. I am struggling on the last task - I have rearched alot and asked my teachers, i'v tried a variety of codes but there hasnt been any luck. Here is the task: complete all tasks and provide evidence …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Niloofar24

Hello. With running this command: `python manage.py validate` I faced with this error: `Unknown command: 'validate'` What should I do now? For more explanations: - Linux - Virtualenv - Python 3.4.3+ - Django (1, 9, 2, 'final', 0)

Member Avatar for Niloofar24
0
320
Member Avatar for pirulo64

Hello everyone, I'm trying to get a python script to run base on the os release and if its physical or virtual machine. If its virtual the script will NOT run, but if its Physical the script will run base on the os release level. I'm a little bit confusing …

Member Avatar for Gribouillis
0
498
Member Avatar for Matt_20

Hello, I have done a little research as I want to create a piece of software. I discovered that the language I should learn was Python and that it should be easy to learn. I have started to read the information but I learn by doing so I thought I …

Member Avatar for Matt_20
0
386
Member Avatar for seher_2

**i want to normalize these ingredients values to range of 0,1 my question is how to pass how dictionary to function? and recieving as a arguments** sample code def normalize(d, target=1.0): raw = sum(d.values()) factor = target/raw return {key:value*factor for key,value in d.iteritems()} Use it like this: >>> data = …

0
118
Member Avatar for jennga

So I'm starting to learn Python (3.43) code on my own time and my friend who is a major in Comp Sci made up a little assignment for me to try to complete although I have no class experience. So what I need to do is make some code where …

Member Avatar for Gribouillis
0
3K
Member Avatar for vegaseat

If you have a long message to display in a large readable font, then this little Tkinter GUI toolkit code might help.

Member Avatar for Mohamed_65
1
4K
Member Avatar for isla.rose.3

Here is the original task: * The Fast Freight Shipping Company charges the following rates: Weight of Package Rate per Pound 2 pounds or less $1.10 Over 2 pounds but not more than 6 pounds $2.20 Over 6 pounds but not more than 10 pounds $3.70 Over 10 pounds $3.80 …

Member Avatar for ashaa
0
3K
Member Avatar for ALosh99

I am trying to define the archimedean spiral: when im trying to define the inclination angle (incl) of the tangent vector to the orbit ( i.e: tan(incl)) im getting an error :"'numpy.ufunc' object does not support item assignment". the same error when I want to calculate cos(incl), and sin(incl). Any …

Member Avatar for Gribouillis
0
4K
Member Avatar for Ross_1

Currently within my code for my system i can't seem to get my system to only open up in one window. When i run my code it opens with two screens instead of the main one. I know this is due to the inheritance of my classes just not sure …

Member Avatar for Gribouillis
0
311
Member Avatar for Juli_1

How do I change string values in a variable? example: string = 'Hello' print(string) change string to 'Bye' <-- How do I do that? print(string)

Member Avatar for Reverend Jim
0
405

The End.