15,190 Topics

Member Avatar for
Member Avatar for philipshoe

I got my code to check for how many digits that i type in my raw input [CODE]num = int(raw_input("Enter, ")) import math digits = int(math.log10(num))+1 print digits [/CODE] example 1587898 then it prints 7 digits I need my code to calculate the digits i type in my raw input …

Member Avatar for TrustyTony
0
178
Member Avatar for zygimantelis

I scripting chating program in python... And i'm on chating program scripting auth with mysql. But no know how to script authentication on python-mysql. How to script chat auth program for chat with python-mysql. -- Sorry with English language.

Member Avatar for zygimantelis
0
211
Member Avatar for TrustyTony

Very trivial program which could be thought as conclusion from the Quiz posts (thanks Gribouillis for inspiration for format)

Member Avatar for TrustyTony
0
193
Member Avatar for pradark

Hello, I am trying to do a simple word count of a text file and output it to a text file. For eg my array looks like this: word_freq = [('test', 1), ('of', 1), ('function', 1), ('first', 1), ('the', 2)] I was able to output to a text file in …

Member Avatar for snippsat
0
192
Member Avatar for Stackheuw

I am trying to count the number of hits a value in one file(column) falls between an interval from another file (two columns). I am completely stuck on how to map it. I tried something like this: for line in file1: if line[0]=line2[0] and line2[1]<line[1]<line2[2]: print line I'm not sure …

Member Avatar for Stackheuw
0
268
Member Avatar for python |

I am trying to work on some code for updating google docs using the python gdata api's. The code works perfectly fine when i try to run the code in a cafe internet or home network without my proxy. When i have to deploy the code in my workplace - …

Member Avatar for ravigup
0
693
Member Avatar for TrustyTony

There was question about encryption in Delphi/Pascal forum and a guy was suggested reversing the bits as additional step (I do not know if he in reality meant XOR 255, that is making 0's 1's and vice versa). As it keeps still same distribution of letters I suggested as better …

0
631
Member Avatar for M09

hello i am a beginner python developer and i am search about python projects for beginners for i learn and know how can i make program in python and thanks

Member Avatar for M09
0
228
Member Avatar for poker158149

I'm trying to using Try, Except to check an input() to make sure it's not blank. I'm using it at a different part of my program to check a float(input()) and it catches it if someone leaves it blank or enters a string, but I assume that's because it's checking …

Member Avatar for poker158149
0
15K
Member Avatar for momartin

I need to run several commands more than 400 times for a mass number of files. Therefore, I'm trying to incorporate the commands in to a python script to automate the processes. Even though the commands run successfully in the the windows command prompt (I have manually tested the commands), …

Member Avatar for Gribouillis
0
1K
Member Avatar for TrustyTony

Dig up this for discussion thread request and some Googling. By little experiment found the different forms for sending message commands. Could no send in Python3 the code of program itself so only simple test "Hello". Sorry that subject is left incorrectly refering program name.

Member Avatar for JoshuaBurleson
3
2K
Member Avatar for Skrell

Newbie here! I am trying to make a simple python program that when called from the command line, would search all the .txt files in a given directory for a given string inside the files by typing something like this > python mygrep.py ":" "C:\" Also, i want to specifically …

Member Avatar for TrustyTony
0
207
Member Avatar for jfussion

hi can't figure out what's wrong with my code. I'm trying to create a frame without a titlebar but still movable. When I run it, I can't drag the frame. hope you can help as soon as possible thanks a lot! cheers! here's my code: [CODE] import wx class MyFrame(wx.Frame): …

Member Avatar for TrustyTony
0
79
Member Avatar for kaskoraja

Hello friends, I have a list similar to ['9.48E+02', '9.42E+02', '9.79E+02', '9.58E+02', '9.28E+02', '9.47E+02'].List has around 9000 elements. I need to convert this list in to file with a format similar to 9.48E+02 9.42E+02 9.79E+02 9.58E+02 9.28E+02 9.47E+02 so that i can access it in another mechanical software i.e without …

Member Avatar for kaskoraja
0
161
Member Avatar for SnackDude

Having problems with the TypeError below: [code]order_list = ['25459 ', '12381 ', '25375 '] cursor.execute("SELECT WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE OHORNO IN (%s)"% tuple(order_list)) TypeError: not all arguments converted during string formatting[/code] The correct SQL should look like: [CODE]SELECT WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE …

Member Avatar for woooee
0
193
Member Avatar for jakethepython

I am new to python and am making a program with the wxpython module and no matter what I try I get a NameError: global name 'outp' is not defined?? Can someone help? Here is the code, it is fairly complex: [CODE]import wx class jake(wx.Frame): def func1(self,event): global foo foo+="1" …

Member Avatar for woooee
0
844
Member Avatar for go_big12

I have searched without success for a way to format the text in a Tkinter OptionMenu List. Specifically, I want to use some subscripted letters. Something like: from Tkinter import * root = Tk() types = ['Kd', 'Koc'] type = StringVar() typewidget = OptionMenu(root, type, *types) typewidget.grid() I need specifically …

Member Avatar for woooee
0
472
Member Avatar for SpiritualMadMan

OK, I have a Class for a Frame that is basically 24 labels in a stack like an old terminal Screen. There are two Functions included in the Class: AddLine and Clear (Will add "Exit") I want to launch an instance of this Class in it's own Thread and Pass …

Member Avatar for SpiritualMadMan
0
159
Member Avatar for zygimantelis

I programming project "ChildrenEditor". This is editor written in python/tkinter. Here write your own mistakes is not resolved. Please help solve them.

Member Avatar for zygimantelis
0
122
Member Avatar for Danielle87

I am trying to search for a word out of these 2 Principles. But by code displays both of the principles not just one. How could I make it display [U]only[/U] the principle where the word is located. [CODE] import re patterns = [ 'work' ] text = """\ 1. …

Member Avatar for TrustyTony
0
170
Member Avatar for kur3k
0
42
Member Avatar for TrustyTony

Here is example how data can be summed to dictionary or you can use numpy.histogram to sum the data as weights of the categorized data.

Member Avatar for Stackheuw
2
2K
Member Avatar for Danielle87

SyntaxError: invalid syntax (on else) Any help? [CODE]import re words = ['cats', 'cates', 'dog', 'ship'] for l in words: m = re.search( r'cat..', l) if m: print l else: print 'none' [/CODE]

Member Avatar for Danielle87
0
77
Member Avatar for Reverend Jim

I thought I'd play around with vPython so I wrote a 3D breakout game (I used to have one on my Amiga and I haven't seen one for Windows). Everything is done except for one wee problem. I want to idle while waiting for the user to click the left …

Member Avatar for Reverend Jim
0
271
Member Avatar for ali13

Hi I thought iI would try to teach myself how to program, so sorry if this has been asked before but I could find it. What I am trying to do is limit an input to of an int to 50 or less with out the program throwing up an …

Member Avatar for ali13
0
3K
Member Avatar for Thropian

I have a script written up that takes an image and displays it. I originally intended to have the image then have parts fall away, but I am having trouble getting parts of the image to move separate. Is there a simple way to do this or am I going …

Member Avatar for Thropian
0
253
Member Avatar for JoshuaBurleson

I'm having issues with a third level Toplevel in tkinter, that is to say having a toplevel popup from another Toplevel. [CODE] self.emailbttn= Button(self, text='Email', command=self.clientchooser) def clientchooser(self): showing.withdraw() client_choose() def client_choose(): global client client=Toplevel() client.title=('Choose Email') client.geometry=('800x600') Client(client) class Client(Frame): '''Choose Email Client''' def __init__(self,master): super(Client, self).__init__(master) self.grid() self.create_widget() …

Member Avatar for TrustyTony
0
199
Member Avatar for Danielle87

I am trying to search for a word or multiple words out of the given text. How could i assign different words to each principles so if the word searched for is amongst the assigned text that particular paragraph will be triggered. Any help will be greatly appriciated. Thank you. …

Member Avatar for TrustyTony
0
141
Member Avatar for tommygee100

Hi All, I'm Trying to solve this puzzle for my script: Let's say we have 3 lists, A,B and C with the following elements 'A' = [5,3,1] 'B' = [6,5,2] 'C' = [2,0,-2] I want to go through all 27 combination sequentially, looking for a combination that is 'valid' AND …

Member Avatar for TrustyTony
0
345
Member Avatar for maddocspace

Hello there, Sorry, unfortunately python parsing is not my main activity, it does not print the last block of the statement. i should get: *elset, elset=top_s1 1, 2, 3, 4 *surface, name=top, type=element top_s1 If i add in the test2 file a line such as *surface, name=bot, type=element then it …

Member Avatar for maddocspace
0
213

The End.