15,175 Topics

Member Avatar for
Member Avatar for Gribouillis

This python script prints all the columns of an sqlite database which path is given as argument.

4
872
Member Avatar for maurice.waka

Is there a pythonistic way available to search all the tables and columns of an Sqlite3 database? The only inputs would be the name of the sqlite DB file or a raw input. I am trying to write a forensics tool and want to search sqlite files for a specific …

Member Avatar for Gribouillis
0
345
Member Avatar for maurice.waka

listname = ['bartian', 'lenana', 'kilimanjaro', 'uhuru', 'elgon', 'everest'] while True: if listname[:-1] == everest: print(listname[:-1]+=) I need a way to loop over this list and print the items in the list. I dont know whether this is pythonic since am having trouble printing the items. I want it to print …

Member Avatar for Lucaci Andrew
1
226
Member Avatar for MasterHacker110

I am thinking about making my own social network recently. Now I have a few questions... Q1: I have used php and asp.net before and liked them both, never really used python for web development. I am thinking about making a smallish social network but also want to expand it …

Member Avatar for masterjiraya
0
249
Member Avatar for maurice.waka

from Simhash import Simhash from teamque1.referrences.definitions import define from teamque1.referrences.definitions import teamscore from teamque1.referrences.definitions import teamplayers from teamque1.referrences.definitions import teamtable from teamque1.referrences.definitions import teamposition from teamque1.referrences.definitions import teamsgame import re import sys import difflib name = input def search_soccerteams(): """Searches through the system finding the team stuff e.g. if you …

Member Avatar for maurice.waka
0
251
Member Avatar for dsushmareddy

Gtk-CRITICAL **: IA__gtk_range_set_range: assertion `min < max' failed I am getting this error when running my code wriiten using wxpython. Can anyone please explain what this error is.

Member Avatar for vegaseat
0
365
Member Avatar for rbyrd

How can I capture a mouse click on a wx.Panel so that a circle is drawn wherever the mouse is clicked on the panel?

Member Avatar for vegaseat
0
553
Member Avatar for eplymale3043

Write a program that can read the students records from the file “scores.dat”. This program will find the maximum and the minimum student scores. The first line in the file is a header. Each line (starting from the second line) contains the records of one student separated by spaces. These …

Member Avatar for vegaseat
0
2K
Member Avatar for oh.m.song.1

How to do this? :Write a program to draw a face of a clock that looks as close to the below as possible. (Note that the clock tick-marks are thicker than your usual lines!) Include comments to explain to the reader what you’re doing. Would appreciate very much thank you. …

Member Avatar for slate
0
141
Member Avatar for itsnauman

Hey, I have previously programmed in C, PHP & Javascript and I have recently started out with Python but the syntax of the functions is quite different and confusing? Like if we call `len(abc)` we enter the param inside the function unlike the function `abc.upper()` where we use enter the …

Member Avatar for snippsat
0
385
Member Avatar for james.lu.75491856

import web,re,traceback urls=( "/","displaythreads" "/viewthread","displaythreads", "/viewthread/(.*)","displaythread", "/viewthread/(.*)/Vote/(Up|Down)","vote", "/newthread/(.*)","newthread", "/newthread","newthread" ) entries={}###{entryname:{property:value}} entrylength=0 class displaythreads: pass class newthread: template=web.template.frender("newthread.html") default=template("DEFAULT",0) def initialize(): pass def GET(): return default def POST(): data = web.input() try: username,threadname = data.username,data.threadname except: return template(mode) if threadname in entries: return template("Exists") entries[threadname]={"creator":username,"points":0,"totvotes":0} class displaythread: template=web.template.frender('Thread Viewer Template.html') …

Member Avatar for james.lu.75491856
0
2K
Member Avatar for ram619

Hi, I have a device connected to the USB port of the laptop. This device pumps data to the port which is read by the python script. As per the baudrate of the board I use folowing configuration to open the port. Serial(options.port,921600,timeout=0.2,xonxoff=0,rtscts=1) But when I analyse the collected LOG …

Member Avatar for Ewald Horn
0
2K
Member Avatar for Rebecca_2

Hi, I have an output file (.txt) from a computational chemistry program. At some point in this file, following an unknown number of iterative steps, the following table will be found: Comparison of initial and final structures : -------------------------------------------------------------------------------- Parameter Initial value Final value Difference Units Percent -------------------------------------------------------------------------------- Volume a …

Member Avatar for slate
0
258
Member Avatar for Vish0203

odd mountain is a list of odd numbers going up from 1 and then back to 1. e.g. odd_mountain of size 5 is [1,3,5,3,1] odd_mountain of size 4 is [1,3,3,1] Hint: use the list functions and a builtin function. Can anyone help me in this? all my tries are going …

Member Avatar for wshane796
0
294
Member Avatar for joseph_7

am trying to create a python code that counts words,vowels,consonats,upperand lower case letter,and the frequency which has the option like Do you want to enter the text via the keyboard? Do you want to read in the text from a file? here is how i got but idont if am …

Member Avatar for TrustyTony
0
236
Member Avatar for joseph_7

anyone good at python please can you email me Josephawino@hotmail.co.uk

Member Avatar for Dani
0
68
Member Avatar for flebber

What is the best way to implement a reusable usr confirmation? Basically so that I can embed it in other functions, so that the user will get to confirm if output is ok or whether they want to recall function or quit. So it seems it should be like. def …

Member Avatar for dashing.adamhughes
0
129
Member Avatar for Ryan_8

I appologize if this has been answered elsewhere but the terms I search for do not turn up a good fit. I am new to everything I am trying to do here and need some direction to solve this problem. I have a string that is 'variable1=5&varible2=3&variable3=27&varible4=1' I need to …

Member Avatar for snippsat
0
158
Member Avatar for RikTelner

Is software hackable no matter how perfect it is written? Let's say I will create simple OS, I will spend like 30 years on encrypting every single variable, every code string and insert quadrillions of hacking preventions. Let's say, that there are absolutely no leakings in code, variables, passwords. Is …

Member Avatar for Coloradojaguar
0
353
Member Avatar for MFS NCCCC

I need a python code that collects all even numbers separately, odd numbers separately and displaying into two separate totals. The range of numbers is 1-20 I am new to this language and I keep getting syntax errors, invalid statement errors etc.. So it would be great if you can …

Member Avatar for bryann
0
192
Member Avatar for reuben_1

can i have some advice for making a basic program, and can someone help me through python plz thx

Member Avatar for vegaseat
0
176
Member Avatar for rbyrd

Does anyone know where I can download Python source code for Graham's convex hull algorithm? C and C++ code seems to abound, but I need Python code, and specifically for Graham's method (not Jarvis or others). Thanks in advance.

Member Avatar for dashing.adamhughes
0
158
Member Avatar for ShobanaV

I am trying to make a local python application communicate with the python application in cloud(GAE). I am able to send a string from local appn to cloud appn, which invokes the post method in cloud appn and writes some message to the screen. I want to access the string …

Member Avatar for dashing.adamhughes
0
241
Member Avatar for flebber

What I am trying to do is delete the key value pairs out of a dictionary if the value is = 0. I seem not to be acheiving that so far. Python 2.7.5+ (default, Sep 19 2013, 13:48:49) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more …

Member Avatar for flebber
0
427
Member Avatar for matthew.l.diefenbacher

*Hello. I am not new to the wonderful site - Just lost login credentials* I am resuming work via Python and must make some installs into my Lib. I am having trouble with this - I have not used Python in 2-3 years. Many syntax errors. This is from install …

Member Avatar for HatGuy
1
322
Member Avatar for lewashby

Server #!/usr/bin/python3 import socket from time import ctime HOST = '' PORT = 21567 BUFSIZ = 1024 ADDR = (HOST, PORT) udpSerSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) udpSerSock.bind(ADDR) while(True): print('waiting for message...') data, addr = udpSerSock.recvfrom(BUFSIZ) udpSerSock.sendto(data, addr) print('...received from and returned to:', addr) udpSerSock.close() #END# Client #!/usr/bin/python3 import socket HOST = …

Member Avatar for JasonHippy
0
353
Member Avatar for Sinnocence

building my first cgi website, here is my problem. The code below works but when the condition is met it outputs both pages on the same screen however when the condition is not met it only outputs the Else: statement like its supposed too. I can't figure out why it …

Member Avatar for Sinnocence
0
237
Member Avatar for rbyrd

Is there some place where I can get a list of the "named" colors (i.e., goldenrod) available in wxpython? I'm using osx 10.6.8. Thank you.

Member Avatar for rbyrd
0
685
Member Avatar for peto29

from visual import * sec = arrow(color = color.cyan, pos = vector(0,0,0), axis = vector(0,3,0)) minu = arrow(color = color.red, pos = vector(0,0,0), axis = vector(0,2,0)) hr = arrow(color = color.magenta, pos = vector(0,0,0), axis = vector(1,0,0)) angle = 0 angle2 = 0 while True: rate(1000) angle = angle - …

Member Avatar for Schol-R-LEA
0
214
Member Avatar for rbyrd

I am trying to learn wxpython, but having trouble laying out two buttons that I want to be centered in a horizontal panel. I can get the buttons on the panel, but they are not centered. What I'm trying to do is create a Frame that contains an upper panel …

0
81

The End.