473,609 Members | 2,232 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
1,978
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...
1
1,909
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
2,052
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,...
6
6,766
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
4,339
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
3
2,049
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
0
1,670
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?
1
6,740
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")
2
6,697
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() ..................
0
1,380
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
1,818
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")
3
2,210
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 "
4
3,776
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
1
4,075
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
3
1,779
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?
3
2,640
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
5
1,811
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,...
2
3,470
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...
0
1,429
thread by: ark0116 | last post Dec 9 '12 by: ark0116
hi, in Matlab i can define a function on a interval(use chebfun) the code like this : v=chebfun('c',) x=sin(v)+cos(v) y=sin(v)-cos(v) plot(x,y) then got a figure of x versus y when v is in interval .
5
2,142
thread by: shantharam | last post Dec 9 '12 by: shantharam
Can anyone tell me how to write a regular expression that will match strings that either has only lower case or only upper case characters in it. For example, it will match AM, PM, am or parrot but not match Am, aM, Pm or Parrot.
2
1,830
thread by: alcarnielo | last post Dec 9 '12 by: alcarnielo
Hello, I'm having some problems with python 2.6 and I fount the same problem with python 3.2.2 I've never noted that before until today. When I referenciate an array to a var and after that referenciate part of this array to another var and finely change an item of this second var, the first var have the item changed also. For instance...
2
2,401
thread by: shaggy89 | last post Dec 8 '12 by: dwblas
Hi all, I would like to send an email from my Gmail account using python so when i have an error ill receive an auto email. At current the program handles the errors internally and keeps trying to do its task. That part is fine but when it hits an error I would like to receive an email. So i did some googling and found this nice script import...
2
1,778
thread by: muin | last post Dec 6 '12 by: bvdet
my dictionary looks like this pri={2000:{0.233:0,0.444:0}} i want to store it in below given format 2000 0.233 0.444 how to do that?? thanks in advance
2
2,671
thread by: mcff | last post Dec 3 '12 by: bvdet
If this is the input: a b c I want to have this: 1 a 2 b 3 c
0
1,756
Jory R Ferrell
thread by: Jory R Ferrell | last post Dec 1 '12 by: Jory R Ferrell
I am using PyOpenCL. I pass a array of floats to the OpenCL kernel. When the floats are returned, python can't use the types C types and has strange values:8.27548023e-36 8.27548310e-36, etc. float myFunc(float number, float iter_val) { float output; // Beginning of FOR loop #1 for(0;iter_val-1>0;){

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.