15,185 Topics

Member Avatar for
Member Avatar for Blair_2

Hi, I am trying to create something which you can type into entry boxes, then save that information to a .txt file. I have got this to work however I wish to name the file as what is stored in one of the entry boxes and cannot figure out how …

0
143
Member Avatar for tayeb d

int* poly = new int[lines.size()]; for(int i=0;i<lines.size();i++)poly[i] = - 1; int curPoly = 0; vector<vector<cv::Point2f> > corners; for (int i = 0; i < lines.size(); i++) { for (int j = i+1; j < lines.size(); j++) { cv::Point2f pt = computeIntersect(lines[i], lines[j]); if (pt.x >= 0 && pt.y >= 0&&pt.x<img2.size().width&&pt.y<img2.size().height){ …

Member Avatar for rproffitt
0
994
Member Avatar for Nether_1

I'm writing a code that requires me to import multiple python files that are similiar to that of a .obj file, in the sense that they will create a 3D figure using vertices and lines, etc. The problem is, the files will have the same name for a list (called …

Member Avatar for rproffitt
0
222
Member Avatar for Crazyscript77

Hi all, I have been trying to use python to automate a sequence of processes on my computer, one of which is starting a hosted network. I have used subprocess to interact with command prompt (windows 10), and am struggling to pass sequential commands. I am trying to first send …

Member Avatar for Gribouillis
0
10K
Member Avatar for <HHH>

Hello, Im trying to install pymongo package to be able to connect to MongoDB using pip pip install pymongo but it produce the below error Could not find a version that satisfies the requirement pymongo (from versions: ) No matching distribution found for pymongo

Member Avatar for ~s.o.s~
0
2K
Member Avatar for <HHH>

Hello, i have a sample web appliaction which get a value from HTML text feild and redirect to HTML page according to the value passed but the problem is that i can't get the value entered in the html text throught (request.form) method I get the below error werkzeug.routing.BuildError: Could …

Member Avatar for snippsat
0
589
Member Avatar for karthik_6

hi all, how to parse an xml attributes using python. I want to read or extract msg values from xml using python. <msg timestamp="20160817 12:46:42.520" level="INFO">Average : 0.14 % CPU (%) 10 Aug 07:00 2 12 Aug 07:00 maximum 5.17 average 0.13</msg>

Member Avatar for snippsat
0
632
Member Avatar for <HHH>

Hello I have created two classes one for the user and the other for address every thing is ok and the tables of the two classes created in my database but when i try to initiate a new object from user class i get the below error "sqlalchemy.exc.InvalidRequestError: Mapper 'Mapper|user|user' …

Member Avatar for <HHH>
0
10K
Member Avatar for Azim_1

Hye I'm new to c++ language. Can anyone suggest me what is the best programming software should I learn ? And how I'm gonna learn coding ?

Member Avatar for rubberman
0
291
Member Avatar for rhys1619

Hi, im trying to add a slapsh screen before my game. It will display a png and the use can either press "e" to continue or "q" to quit. when i run this in my game is says that pygame.display.update() is the problem. Please help thanks. def game_intro(): intro = …

Member Avatar for rhys1619
0
1K
Member Avatar for Maikel

Hi guys, I'm new to Python have get done a lot by searching. Now I try to bind a scroll wheel to canvas, but it doesn't do anything. Will someone look at the code what I do wrong? I tried to keep my snippet clean. Hope It's enough. class Viewer(tk.Toplevel): …

Member Avatar for rproffitt
0
777
Member Avatar for vegaseat
Member Avatar for Zach_2

Whenever I go to transfer a file from my server to my client, I get a new file, but the data does not go through. It prints server side once it is open, but it won't transfer the data to my new file. Here is the code:https://gist.github.com/anonymous/8f70b3e2eca8606dee2c245ce64e9b63 All I want …

Member Avatar for Gribouillis
0
285
Member Avatar for rhys1619

hi, so ive been trying to add a splash screen to the start of my game. the user presses "e" to continue and "q" to quit. it's not working, could anyone help. import os import pygame import random pygame.init() #Colours im using in the game white = (255,255,255) black = …

0
262
Member Avatar for lewashby

I've tinkered with php in the past but I'v also enjoyed playing around with python. I have been wanting to give python a try as a possible alternative to php but I haven't had much luck. All of the videos I find on the subject are about setting up Django …

Member Avatar for lewashby
0
1K
Member Avatar for <HHH>

Hello, I'm trying to write my first cookie on python but when i import cookie or even http.cookie it gives me the below error import cookie c = cookie.SimpleCookie() c["value"] = "first" print (c) ImportError: No module named 'cookie' [Finished in 0.3s with exit code 1] [shell_cmd: python -u "C:\Users\hohait\Desktop\test.py"] …

Member Avatar for <HHH>
0
5K
Member Avatar for rhys1619

hi, im making a game in pygame game and i was wanting to add an image (just a png of the story) before my game. I was wondering if anyone can help me with how i would do this. thanks

Member Avatar for rproffitt
0
274
Member Avatar for lewashby

python3 pythonscript.py Traceback (most recent call last): File "pythonscript.py", line 1, in <module> import pysftp as sftp File "/usr/local/lib/python3.4/dist-packages/pysftp/__init__.py", line 12, in <module> import paramiko File "/usr/local/lib/python3.4/dist-packages/paramiko/__init__.py", line 30, in <module> from paramiko.transport import SecurityOptions, Transport File "/usr/local/lib/python3.4/dist-packages/paramiko/transport.py", line 32, in <module> from cryptography.hazmat.backends import default_backend ImportError: No module named …

Member Avatar for Gribouillis
0
2K
Member Avatar for rhys1619

Hi, i'm making a maze game. As you can see i have added an image for my floor and i'm trying to add an image to my walls. I am having trouble adding the image to the walls. Could anyone start me on my path on how to do this …

0
318
Member Avatar for vegaseat

Use Python module threading to count intervals (in seconds) in the background. You can use this to time any relatively slow event like the time it took to finish a game or play some music. You can also peek at the current interval value as the event goes on. Go …

Member Avatar for Viresh_2
0
9K
Member Avatar for Andrew_33

I am looking for a Backend as a Service (hosted solution) that provides a free starter plan. Firebase provides the ideal features I am looking for however it appears they have no C# client that supports their authentication system or any Python client at all. (Correct me if I am …

Member Avatar for rproffitt
0
231
Member Avatar for AssertNull

I am pretty much brand new to Python. I'm cramming this week trying to learn it and I've been handed some code samples to try them out and familiarize myself with them. Problem is that they were written years ago in Python 2. It's my own C++ code that I …

Member Avatar for AssertNull
0
1K
Member Avatar for influx

I am using this code to get all synonyms from the text in document named "answer_tokens.txt" it is only listing the words in the document without the synonyms. can someone check it out? from nltk.corpus import wordnet with open('answer_tokens.txt') as a: #opening the tokenised answer file wn_tokens = (a.read()) #printing …

Member Avatar for influx
0
411
Member Avatar for Nether_1

I'm writing a simple server allowing me and my friends to send information to each other. Currently I've got the client down easy enough, it's all set up and I can communicate with servers. The problem is I can't get the server to work for some reason, I use working …

Member Avatar for Nether_1
0
344
Member Avatar for ajit.nayak

Dear all I am trying to send request to client device in Hex format and receive data into decimal format. By seeing forum and tutorial class. I could able to send and receive data from client device.Now I wanted to check the data i received valid or not. In order …

Member Avatar for ddanbe
0
553
Member Avatar for tkpanther

Hello, it is me once more. I am using Python 2.3, and I must use Zelle's graphics class (and I must agree with many of you. Tkinter is much better). We have been tasked with creating a Graphical Scientific Calculator. In addition to the normal operators, it must contain the …

Member Avatar for Gribouillis
0
22K
Member Avatar for Mariano_1

Hey I'm coding Tron which is basically a two player snake game, I'm a noob when it come to pygame and python and need help with the collision logic and would love it if you could help me. (the comments are just ideas I had for the loops for the …

0
271
Member Avatar for Dennis_9

I'm knida new to Python and I made a program that works the way I want by renaming files in bulk, however it will only work in the current folder and will not go into sub directories. i already have import os from os import rename, listdir is there any …

Member Avatar for Gribouillis
0
169
Member Avatar for _1_6

I know this should not be difficult, probably I've been too lazy to figure it out. When I execute the python script below, I get this message: <bound method Forces.Sums of <__main__.Forces instance at 0x7fcecfb56a28>>. What is wrong? import numpy class Forces: """ Forces between particles""" def __init__(self, l1, l2): …

Member Avatar for Gribouillis
0
265
Member Avatar for rhys_2

Hi, i have been making a maze game in pygame. I have made every level and have them all in different folders so i can find them easily. I have been trying to make a menu for the game where you are able to pick any level and play it. …

0
169

The End.