473,554 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
2
4,230
thread by: aehakhfdsakj | last post Sep 7 '15 by: dwblas
>>> import numpy >>> def backsub(X, y): l = shape(X) n = l X = mat("1. 2. 3.; 0. 3. 2.; 0. 0. 1.") y = mat(" 2.; 4.; 5.") b = zeros((n,1)) b = y/X for j in range(n-1,0,-1): b = (y - dot(X, b))/X
5
3,265
thread by: Jagdeep | last post Sep 6 '15 by: Jagdeep
TypeError: unbound method decode() must be called with JSONDecoder instance as first argument (got PrintJson instance instead) I am getting this error when I try to parse python object into json. Using following code:- import json from json import JSONDecoder class TestJson():
0
1,347
thread by: george123456 | last post Aug 28 '15 by: george123456
Hay all Please I need some one who knows the direct python api. I am rendering a 3d model to the screen and wants to know how How to move this model to x axis or y axis must i use matrix or vectors? When i use the vector to y axis math.sin(self time) it only Move one direction and disapears what to do? Dont post if you do not have...
3
2,201
thread by: Karam | last post Aug 28 '15 by: george123456
Dear All, I need information about python games any body have link to send to me. I want to learn python games or any information to make Volleyball games like this picture I attach. I appreciate if you help me. Regards, Karam
1
1,450
thread by: george123456 | last post Aug 28 '15 by: george123456
Do you really have to use classes and Functions in directpython api or can you Just write a long script.
0
1,258
thread by: Sana007 | last post Aug 18 '15 by: Sana007
from ctypes import* cdll = "Windll" var = 0x1fffffffffffffffffffffff # I want to send this long variable to character pointer which is in cdll cdll.createBuff (var) cdll function int createBuff (const unsigned char*){
2
1,652
thread by: rockzzz | last post Aug 15 '15 by: Mator
Hi guys, I have 2 variables a and b and the following code a= /user/temp/new b= test I am using os.chdir(os.path.join('a','b'))
1
1,318
thread by: matusiek191 | last post Aug 14 '15 by: Dietrich41
dicc ={ "key" : , ...} How can I access the second value? I can do : for i in dicc: print(dicc) or
2
7,639
thread by: helloR | last post Aug 8 '15 by: helloR
I have a list which contains list of file names, i wanted to sort list of those files based on timestamp encoded in file names. Note: In file, Hello_Hi_2015-02-20T084521_1424543480.tar.gz --> 2015-02-20T084521 represents as "year-moth-dayTHHMMSS" ( Based on this i wanted to sort ) Input file below: file_list = Output should be:
2
2,295
thread by: ShadowCoder11 | last post Aug 3 '15 by: bvdet
I am a student and I am currently working on an assessment. I am using Tkinter buttons to continue the game. Since I am having multiple buttons, I need to be able to exit out of the button window after i press the button. I have asked many sources including my teachers but all appear to be on dismissing the single button. Can i please have help...
4
1,718
thread by: matusiek191 | last post Jul 26 '15 by: bvdet
I have a problem. For me all is correct but when im trying to have a first guess cmd dont print "print("Lower...")" and neither "print("Higher...")" statement. after first try everything works good. Help me just to find a problem because i cant see anything. Thank You Here is my source code: import random print("\t\t\tWelcome to guess...
2
1,745
thread by: thoschu96 | last post Jul 22 '15 by: thoschu96
I wrote a code and wanna update the PATHNAME for E1. The Print show's that the Pathname is updating, but the LabelField is not updating. What i am doing wrong ? #!/usr/bin/python # -*- coding: utf-8 -*-
7
2,181
thread by: helloR | last post Jul 18 '15 by: bvdet
Let's say a input text file "input_msg.txt" file ( file size is 70,000 kb ) contains following records.. Jan 1 02:32:40 hello welcome to python world Jan 1 02:32:40 hello welcome to python world Mar 31 23:31:55 learn python Mar 31 23:31:55 learn python be smart Mar 31 23:31:56 python is good scripting language Jan 1 00:00:01 hello welcome...
3
5,657
thread by: ismail15 | last post Jul 16 '15 by: bvdet
when i use wifiphisher in ubuntu i get the following error : except socket.error: sys.exit(( '\n Unable to start HTTPS server!\n' + ' Another process is running on port ' + str(SSL_PORT) + '.\n' + ' Closing' the problem : Starting HTTP server at port 8080
1
2,755
thread by: hi5hi | last post Jul 11 '15 by: computerfox
When I try to open up IDLE it keeps on telling me that the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection". I've changed networks, tried re downloading the software and checking my firewall settings but nothing seems to work. I have the 3.4.3 version and just...
1
2,040
thread by: stuabs19 | last post Jun 18 '15 by: bvdet
What is the purpose of line 7? 1 class NewClass (OldClassFile.OldClass) 2 3 def __init__(self,variable) 4 5 (Code for what NewClass does) 6 7 OldClassFile.OldClass.__init__(self,variable)
1
8,084
thread by: Coding kid | last post Jun 17 '15 by: computerfox
I would really appreciate it if somebody could give me a link to a video or website that would tell me how to convert Batch files to Python files. Thanks Al
3
1,866
thread by: sudeepto | last post Jun 16 '15 by: bvdet
I have string in the following form: my_string = '(1, 2) (3, 4)' As you can see, the tuples inside the string are space separated. I want to know how can I extract those tuples into separate variables.
3
6,002
thread by: helloR | last post Jun 11 '15 by: bvdet
Lets say I have a Text file (input_file.txt, file size is ~10GB ). Now I need to write a Python code which will read the text file and copy the contents between Start and end to another file. I wrote the following code. import re with open(r'C:\Python27\log\master_input.txt', 'r') as infile, open(r'C:\Python27\log\output', 'w') as...
1
1,962
thread by: dmkmedia | last post Jun 4 '15 by: bvdet
i have a basic window using tkinter with a button that opens hello message but before the hello message i want it to run a basic python script the exit the script then show the message import Tkinter import tkMessageBox top = Tkinter.Tk()
1
1,673
thread by: Begocidi | last post May 30 '15 by: computerfox
Hi there , is there any possibility to search with python the active catia document for the color orange if it s in use for line color ? then there should be a message with an information about the search result. hope someone can help... thanks
3
2,943
thread by: Jethro689 | last post May 25 '15 by: dwblas
I have just started learning programming. I have completed a number of tutorials with regards to Python Basics. I now want to exchange information between python and C++. For example. I have 2 numbers in python which I call a program written in C, which adds those 2 numbers and returns the result to python. Which is the simplest way to do...
4
4,890
thread by: PythonB15 | last post May 21 '15 by: computerfox
Hi all, another question.... I have a data structure which consists of a game players name and their scores, I have use lists within lists (2D): results = , , ] What I want to do is work out the average for each player and then sort by the highest average score.
7
3,883
thread by: PythonB15 | last post May 21 '15 by: PythonB15
Hi all, I am hoping you can help me. I have a data structure which consists of a game players name and their scores, I have use lists within lists (2D): results = , , ] What I want to do is sort the list in alphabetical order with each players highest score. I know how to sort by specifying a specific index using Itemgetter, but...
0
2,200
thread by: thistle | last post May 18 '15 by: thistle
I have 2 files. I have to calculate the monogram (uni-gram) and at the next step calculate bi-gram probability of the first file in terms of the words repetition of the second file. (the files are text files). for this, first I have to write a function that calculates the number of total words and unique words of the file, because the monogram is...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.