15,181 Topics

Member Avatar for
Member Avatar for Delu:sional

Im pretty new to Python (2.7) and no programming experience before. Anyway Im in the process of learning python but have a mysterious error that I can't figure out. Whenever I put equal sign in print statement, I get syntax error. here's an example code [CODE]def main(): f = open('lines.txt') …

Member Avatar for Delu:sional
0
146
Member Avatar for UaBoy

from random import randint correct = 0 for i in range(10): n1 = randint(1,10) n2 = randint(1,10) prod = n1 * n2 ans = input('What's %d * %d? ' % (n1,n2)) if ans == prod: print('That's Right! Well done.') correct = correct + 1 else: print('No, I'm afraid the answer …

Member Avatar for UaBoy
0
123
Member Avatar for remomore
Member Avatar for kumarantechie

Hi, I am a beginner in linux . i am using matchbox virtual keyboard for an application now i want to change the layout to another langauge . How to do it? Is there any way to change the layout from terminal . Kindly advice me suggestions. Any help appreciated …

Member Avatar for deimusmeister
0
152
Member Avatar for GothLolita

Hi everyone! I'm a newbie here. I have a problem: I need to create the address book in python that include name, phone number, email, address, etc...The information in the address book can able to delete or change. I will give more information later! Can you help me? I need …

Member Avatar for techie1991
0
2K
Member Avatar for gsenthil25

Hello, I'm trying to call a Python module in Java application using JEPP. I'm able to invoke the python modules from java Appl, but i'm not able to call the modules in python class from java appl. Python Code Code: [code] class SampleClass: def [b]callPythonModule[/b](self): print 'The Python Class module …

0
28
Member Avatar for lionaneesh

[B][I][U]Introduction[/U][/I][/B] Hey guys today I am writing a tutorial on Lists and tuples in Python.... So lets get started... [B][I][U] Layout:- [/U][/I][/B] 1.What are data sturctures? 2.What are tuples? 3.What are lists? 4.inbuilt functions on lists and tupples [B][I][I][U] What are Data structure?[/U][/I][/I][/B] Anybody familiar with programming or Actually Computers. …

Member Avatar for redyugi
1
3K
Member Avatar for ultimatebuster

Is there any tutorial for Ironpython and Winform out there that's good? A book that's free would be nice. Also if it involves sharpdevelop it would be pretty kickass.

0
105
Member Avatar for Ghostenshell

I read a lot of car classes on several sites and still can't get mine to work. Any ideas? [CODE]##Car class class Car: def __init__(self, y_model, make, speed): self.y_model = y_model self.make = make self.speed = speed def set_year_model(self, y_model): self.y_model = y_model def set_make(self, make): self.make = make def …

Member Avatar for Ghostenshell
0
102
Member Avatar for udev

Hi! I have used the os.walk function to traverse the many files in the directory. Now the problem is that it is listing same words from different files as different keys. How should I go about it?

Member Avatar for udev
0
125
Member Avatar for acrocephalus

Hello! I have designed a dialog with a grid widget. I would like to populate it with data from a MySQL table which has 10396 rows and 5 columns, as the grid widget. How can I do it? Then, how can I select a row from the grid widget and …

Member Avatar for acrocephalus
-1
2K
Member Avatar for Hawkeye Python

When realising the following operation: [CODE]do = 1.0 - 2.718281828**(-(23**2)/730) print do[/CODE] Python returns 0.632120558766 When you do it on the calculator or when google it, it returns 0.515509538 :-O

Member Avatar for vegaseat
0
269
Member Avatar for acrocephalus

Hello! I have created a control using the TimeCtrl widget using this code to insert an hour in a 24h format using the HH:MM format [CODE]self.EndingHour = masked.TimeCtrl(panel, -1, name='24 hour control', format = 'HHMM', fmt24hr = True)[/CODE] However, it keeps showing the time as a 12h clock (in the …

Member Avatar for acrocephalus
-1
194
Member Avatar for funfullson

Hi dears. I want make relation with gsm modem. my first goal and main one is sending and receiving sms. _then I want go front.for example for mms sending and ..._ I want to do it on a linux server. please introduce me a suitable modula with it's tutorial or …

Member Avatar for nazza
0
190
Member Avatar for jerryolive

The below code works, but the default value for the test method will be None. I'm trying to figure out how to read input from the user, convert that into a list (or whatever), and then based on the number of arguments the user inputs, it will be sent into …

0
27
Member Avatar for sphynx_25

Hey everyone, (Hopefully) a rather quick question. I'm currently trying to use regex to search a string for the location of the longest continuous match in a string where the *same* character keeps repeating. It doesn't matter which character it is, as long it is the highest number of consecutive …

Member Avatar for sphynx_25
0
2K
Member Avatar for Offshorejob

Hey Guys I'm looking for a full time offshore Python programmer. It is for a gaming (casino) company that produce slot machines and electronic poker machines among many other. So in so many words it is not web based python, but I'm sure someone who is very good with web …

0
31
Member Avatar for D33wakar

[CODE]def nod(n): c,i=0,0 while n>0: c=n%10 if c!=0: i=i+1 n=n//10 print(i)#prints the number of digits in the given integer 'n' [/CODE] how to make it able to count 'zeros'?

Member Avatar for Beat_Slayer
0
141
Member Avatar for jobs

When I execute the following sql,select id from people, inside python and print the result, I get this: ((11L,), (12L,), (13L,), (14L,), (15L,), (16L,), (17L,), (18L,), (19L,), (20L,)) Why does python print L beside the numbers. Just to indicate Long type?

Member Avatar for timogoosen
0
3K
Member Avatar for PythonNewbie2

Hey guys, thanks a lot for the help. Here's the code I have for going through each file in a directory I specify: [CODE] for root, dirs, files in os.walk('%s'%(DOSEnvironVar)): for this_file in files: if this_file.find('.csv')>-1: filepath = os.path.join(root, this_file) currentfile=open(filepath,'r') filelines = currentfile.readlines() [/CODE] I would like to add …

Member Avatar for Reverend Jim
0
284
Member Avatar for sphynx_25

Hey there everyone, I'm working in windows, writing a python program which runs various programs through command line and pipes the outputs of one into the next program. All the programs accept all instructions in one line then run. I've been using the os.system command to run these. One program …

Member Avatar for sphynx_25
0
228
Member Avatar for JLYK

So I created this nice PushButton that has a popmenu. Unlike QToolButton, it does not allow me to hide()/show() the button which I find frustrating. I want to be able to hide/destroy this button while the application is in a certain mode and then show/create it in another. How do …

Member Avatar for Beat_Slayer
0
200
Member Avatar for s0ur

HI All, My name is s0ur and I am not a programmer. Isn't that the first step to recovery? I am hoping that the experts can help a noob. I am trying to write a python script that will run on windows login. it should do the following: 1) ping …

Member Avatar for Beat_Slayer
0
297
Member Avatar for Deeplop

Hi all.... How can I create .exe format in python??????? I mean how to change .py to .exe ???? please reply as fast as possible

Member Avatar for snippsat
0
190
Member Avatar for kuchi

Hi, I can log all information from the application but how can I log client information? i.e. server is running in my machine and if any one in my network using my application, I want to get that information in my logs, please your advice is important to me.

0
71
Member Avatar for brown23

Hey Guys! I'm really wanting to start learning a beneficial, but fairly easy-to-use programming language. I've tried to discuss this at other online communities and have also asked this question at a few seminar's I've been to recently. My objective is to create more advanced software that interacts with the …

Member Avatar for vegaseat
0
1K
Member Avatar for shadwickman

I'm not sure if this is the best place to post this, but I've noticed a large request for pyHook for Python 2.6. I had a solution to this in a recent thread [URL="http://www.daniweb.com/forums/thread203368.html"]here[/URL], but people are most likely going to miss that. I built pyHook's source for use with …

Member Avatar for bujisky
0
609
Member Avatar for thinkwell

Hi everyone! My first post on daniweb, although I've often been helped by reading. :) I have a CGI script that is driving me batty. CGI is in python. If I put any python code ABOVE the HTML printout of the script except for import statements & varable assignments, Firefox …

0
126
Member Avatar for kuchi

we got a requirement, im new to Python and recently I did python core code and now got to work on HTTPServer. Is this something like web server? Please check for the following req and give me an idea for each * respond to GET requests by serving pages from …

0
75
Member Avatar for NewbieXcellence

Hello... I've been working on a simple server using the sockets module and threads (just for fun btw ;p). I want to be able to connect to it by specifying a "channel" and then anything the client sends is recieved by all clients connected to the same "channel". Now I'm …

Member Avatar for NewbieXcellence
0
169

The End.