473,544 Members | 2,074 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
3,468
thread by: scoke | last post Dec 12 '12 by: Layvian
This program runs and then at the end where i select the entire database and read it out to the console i see the results. The issue i am having is that when i go to the actual access database there is no changes and it is still blank. import os import adodbapi database = "db1.mdb" constr = 'Provider=Microsoft.Jet.OLEDB.4.0; Data...
5
1,807
thread by: Layvian | last post Dec 12 '12 by: dwblas
I was attempting to change a value within a dictionary list via a list variable. However it does not change. Is this a feature of a Dictionary list or am I doing something incorrect? Thank you in advance for any assistance. user_id = account = {'username':user_id, 'password':user_id, 'first_name':user_id, 'last_name':user_id,...
3
2,636
thread by: mirshany | last post Dec 14 '12 by: eGrove Systems
I am using ubuntu how I write my program from terminal to file and then how I open python file in terminal to run. Where should be file saved
3
1,777
Jory R Ferrell
thread by: Jory R Ferrell | last post Dec 14 '12 by: eGrove Systems
I need to close the session but the debug can't be shut down...wth do I do?
1
4,071
thread by: prii | last post Dec 14 '12 by: Rabbit
Hii guys I'm new to python and I'm trying to import mssql data to mysql using python.. #!/usr/bin/python import MySQLdb import pyodbc
4
3,773
thread by: Aplus212 | last post Dec 19 '12 by: dwblas
Hi guys, Very new to Python and was hoping you guys could give me some help. I have a book about The Great War, and want to count the times a country appears in the book. So far i have this: Accesing the book >>> from __future__ import division >>> import nltk, re, pprint >>> from urllib import urlopen
3
2,208
thread by: waran | last post Dec 19 '12 by: dwblas
def on_button1_clicked(self, widget, data=None): con = MySQLdb.connect('localhost', 'root', 'warriors', 'reg'); with con: cur = con.cursor() sql_st="INSERT INTO regg (username, password) VALUES ('ra','%s')" cur.execute(sql_st) print "It has been inserted successfully "
2
1,816
thread by: Gus1 | last post Dec 19 '12 by: dwblas
def quiz(): for count in range(1): import time print ("hello and welcome to my input output quiz") time.sleep(2) print() print("INTRUCTIONS") time.sleep(2) print() print(" you will a choice of 4 possible answers to chose from")
0
1,375
thread by: 2inshix | last post Dec 19 '12 by: 2inshix
I was successful on embedding a matpotlib bar graph onto tkinter, however I can seem to find a way to disply text underneat each bar. The desired result would be text displaying the content of each bar underneath, for example bar 1, bar 2, bar 3, bar 4, bar 5, any help would be greatly apperciated. Happy holidays to all the programming...
2
6,694
gesqo
thread by: gesqo | last post Dec 22 '12 by: gesqo
I'm trying to run with Python 3.3: import lib2to3 import sys import string import xlrd workbook = xlrd.open_workbook(r'C:\....xlsx',encoding_override="cp1252") worksheet = workbook.sheet_by_name('Sheet1') workbook.sheet_names() ..................
1
6,700
thread by: lome1404 | last post Dec 24 '12 by: dwblas
I try to make scrolling on an Entry in python. when I run program nothing happen. Please any one help me?? this is my code: self.scrollbar = tk.Scrollbar(self,orient="horizontal") self.e3 =tk.Entry(self,xscrollcommand=self.scrollbar.set) self.e3.focus() self.e3.pack(side="bottom",fill="x")
0
1,668
thread by: johngavin78 | last post Dec 29 '12 by: johngavin78
I need to query a printer as to whether it has a bitmap loaded to the memory before printing. Is there a quick command to query if the memory is empty (as in after a power cycle) or data in the memory?
3
2,047
hassandraga
thread by: hassandraga | last post Dec 31 '12 by: eGrove Systems
Hello, I want start a new web project using Python, but i want to know if using CGI is a good idea ? CGI: www.mydomain.com/cgi-bin/index.cgi or Python: www.mydomain.com/index.py
2
4,334
thread by: AClap | last post Jan 2 '13 by: AClap
Hi, I would like to create a 2d array of objects ex. 50 by 40 cells containing a Tile object each, but I can't figure out how to declare this structure. Built-in array structure doesn't seem to be able to contain custom data, but I might be wrong. I'd really appreciate if someone could help me out! Thanks, AClap
6
6,756
thread by: AnneTanne | last post Jan 2 '13 by: bvdet
I need to make a function that determines the overlap between 2 sequences, and then return the overlap. The overlap is a coherent sequence that is in the left end of the first sequence, and in the right end of the second sequence. my sequences are: s1= "CGATTCCAGGCTCCCCACGGGGTACCCATAACTTGACAGTAGATCTC" s2=...
2
2,049
thread by: AnneTanne | last post Jan 3 '13 by: bvdet
I have a dictionary which is made pretty as a matrix: Dictionary: {'1': {'3': 0, '2': 1, '5': 1, '4': 0, '6': 29}, '3': {'1': 0, '2': 0, '5': 0, '4': 1, '6': 1}, '2': {'1': 13, '3': 1, '5': 21, '4': 0, '6': 0}, '5': {'1': 39, '3': 0, '2': 1, '4': 0, '6': 14}, '4': {'1': 1, '3': 1, '2': 17, '5': 2, '6': 0}, '6': {'1': 0, '3': 43, '2': 0,...
1
1,907
kuhey
thread by: kuhey | last post Jan 6 '13 by: bvdet
Hello! Recently I've decided to try something new and started watching the google tutorials for python (http://www.youtube.com/watch?v=haycL41dAhg) ... most of it was very clear and I've learned a lot... but since I am using a Win 7 and the man presenting is using a Mac, there were some difficulties... so my question here is... how do I start a...
2
1,975
roberttonafelix
thread by: roberttonafelix | last post Jan 7 '13 by: roberttonafelix
Hi Friends, I wrote a python script for file transferring through Rabbitmq application and it was working fine. The program was made into run and after 4 days the following error is coming.... timeout : timed out After then if i again run the script it was working and after 3 or 4 days again the same error is coming. The error message...
0
1,430
thread by: miki78 | last post Jan 10 '13 by: miki78
I have implemented the following simple python script by means of the BOA Constructor 0.6.1: #Boa:Frame:Frame1 import wx def create(parent): return Frame1(parent) =
5
22,095
thread by: lepetal | last post Jan 10 '13 by: AndrewM
I need to calculate delta between SYN and SYN-ACK or ACK packet for each http.uri request. Why is my code not working for it? #!/usr/bin/env python import dpkt def ip_decode(p):
1
2,694
thread by: oriweis | last post Jan 11 '13 by: bvdet
Hi, I am using the python27, 64bit version. I have added textCtrl, trying to get the user input, but with no success.. The text box is disabled. Please advice. My code: self.nameTextCtrl = wx.TextCtrl(self) self.nameTextCtrl.Enable(True) self.nameTextCtrl.SetEditable(True) self.nameTextCtrl.SetDimensions(x=150, y=60, width=150,...
3
1,950
thread by: dooja | last post Jan 18 '13 by: Rabbit
hay for all; a try to run the following code in python 2.5 in order to resolve the STP, but i find an error of indent (error: unexpected indent), please; can you help me. # -*- coding: cp1252 -*- import random, sys, os, time class individu: def __init__ (self,nombre_genes,random=-1): self.genes = ...
6
2,411
prettypython
thread by: prettypython | last post Jan 19 '13 by: prettypython
Hi i want to know how to define the seconds into hours and minutes for the media player timer i have already done it in seconds but not sure how to hours and minute. Pls help! ef onTimer(self,event): current = self.mc.Tell() self.info_pos.SetLabel(" %i seconds" % (int(current)/1000)) self.slider.SetValue(current)
4
2,553
prettypython
thread by: prettypython | last post Jan 19 '13 by: Rabbit
Hi went i add things into my database such as: (file name, file path etc) into the database sqlite either i got: sqlite3.OperationalError: no such column: or sqlite3.OperationalError: unrecognized token: ":" when insert path (e.g. 'D:\music\blue.mp3'
3
1,812
thread by: dooja | last post Jan 19 '13 by: Anas Mosaad
good day, I try to run the following code gen.py in python 2.5 in order to resolve the STP with genetic algorithm, but i find an error: Traceback (most recent call last): File "C:\Python25\gen.py", line 55, in <module> class population: File "C:\Python25\gen.py", line 61, in population for v in...

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.