14,946 Topics

Member Avatar for
Member Avatar for danae.gordon9

Hi everyone, I'm new to programming (and daniweb) and I'm having a small problem with a Caeser Cipher program I'm writing. messageE = input('\nPlease enter string to encrypt: ') offsetE = int(input('Please enter offset value (1 to 94): ')) encryptedE = '' if offsetE < 1 or offsetE > 94: …

Member Avatar for vegaseat
0
258
Member Avatar for harrykokil

hi guys.. im new to this forum and im certain its here that all my problems will be solved. In fact I have a traffic simulation project in python. Im stuck at the very start since ive never programmed in python. I would like to know how to make an …

Member Avatar for TrustyTony
0
10K
Member Avatar for SumTingWong59

http://pastebin.com/embed_js.php?i=TpzkKkYW Here's what I have right now. I am basing it off this ( http://forum.codecall.net/topic/76208-tkinter-ball-snake-game/ ) and trying to change it into what I want, as I'm fairly new to python and wasn't sure how else to start. Could you guys help me make it more simple? I just want …

Member Avatar for TrustyTony
0
899
Member Avatar for cyclopsvs

hello python developers, i recently started working on a simple xml rpc application, the simple version is completly working but when i wanted to extend it and add some more functionality i ran into some troubles. i want to register functions from different classes as server methods, i thought i …

Member Avatar for Benjamin_9
0
697
Member Avatar for Gribouillis

This snippet shows how to find the complex roots of a polynomial using python (tested with python 2.6). You need the scipy or numpy module.

Member Avatar for Gribouillis
2
3K
Member Avatar for vuze

my code has this structure class Mapsframe(wx.Frame): def __init__(self): import application class Example(wx.Frame,listmix.ColumnSorterMixin): def __init__(self, *args, **kwargs): super(Example, self).__init__(*args, **kwargs) self.InitUI() def InitUI(self): def onItemSelected(self,event): frame = Mapsframe() and i need to pass two variables which have been created localy inside the def onItemSelected to another python script called application.py …

Member Avatar for TrustyTony
0
271
Member Avatar for aanchal_1

after importing pygame, when we convert an image an assign it to a variable, what is the type of that variable?

Member Avatar for aanchal_1
0
256
Member Avatar for edogg23

Hello. I am a complete newbit to Python. I am trying to read a text file (which is actually an svg file) and add a line to the text file. I would also like to remove certain text from the file. I am trying to edit some of the tags …

Member Avatar for edogg23
0
365
Member Avatar for alagez

Hi there, Guys I need help in understanding the this code. Because I have been asked my lecturer to use the existing code and propose a problem through any journals which have connection with neural network and demonstrate it using the codes. Before selecting any journal, first I need to …

Member Avatar for alagez
0
573
Member Avatar for Gribouillis

This script computes the formal series expansion of a mathematical function on the command line using the python module swiginac, an interface to the CAS Ginac. Typical invocation in a linux terminal looks like $ serexp.py -n 7 "log(1+x)*(1+x+x**2)**(-1)" 1*x+(-3/2)*x**2+5/6*x**3+5/12*x**4+(-21/20)*x**5+7/15*x**6+Order(x**7) As far as I know, swiginac does not work in …

1
480
Member Avatar for vuze

i have this code import wx import datetime,re,os,time,urllib,errno import sys import wx.lib.mixins.listctrl as listmix musicdata = { 0 : ("Bad English", "The Price Of Love", "Rock"), 1 : ("DNA featuring Suzanne Vega", "Tom's Diner", "Rock"), 2 : ("George Michael", "Praying For Time", "Rock"), 3 : ("Gloria Estefan", "Here We Are", …

Member Avatar for woooee
0
341
Member Avatar for flebber

What I am trying to acheive is to parse an xml file break it up into useful components and push it to a multi table SQL database. But I cannot get off the ground in the basics. Take an xml file like this [Click Here](http://old.racingnsw.com.au/Site/_content/racebooks/20140513HAWK0.xml) Which at the start is …

Member Avatar for Gribouillis
0
1K
Member Avatar for TrustyTony

I [saw interesting problem](http://www.daniweb.com/software-development/legacy-languages/threads/478323/prolog) of generating spiral of numbers and realized I could reuse [my code for rotation](http://www.daniweb.com/software-development/python/code/371536/rotate-sequences-left-or-right) I posted earlier.

3
775
Member Avatar for john123doe

initialize passes to zero initialize failures to zero initialize student to one while student counter is less than or equal to ten input the next exam result if the student passed add one to passes else add one to failures add one to student counter print the number of passes …

Member Avatar for EnergeticJet
0
526
Member Avatar for aanchal_1

Is there any way i can use pygame and Tkinter in python together? I was planning to make a game using both of these modules.i'm trying to make the window and option buttons using Tkinter. the options would let the user choose which game s/he wants to play. then after …

Member Avatar for ZZucker
0
237
Member Avatar for Joe_6

I have a csv script that runs within a sequence on a set of gathered urls like so: threaded(urls, write_csv, num_threads=5). The script writes to the csv but seems to rewrite the first row for each url rather than writing to new rows for each subsequent url. I'm new to …

Member Avatar for Joe_6
0
180
Member Avatar for Gribouillis

A simple way to resize an image programmatically, using the PythonMagick module. This module is a python port of the [the magick++ library](http://www.imagemagick.org/Magick++/).

Member Avatar for Gribouillis
4
3K
Member Avatar for Gaven

Hi I would like to use randint from random to get random numbers, and after doing this I would like to add it to Dict or List and check if the number already added and which Postions this an have so it shoudl print out which possition this number have, …

Member Avatar for ZZucker
0
308
Member Avatar for cahram

Hi, I'm new to Python and have a task of reading a user input text file that is tab-delimited and contains 4 columns in each line: Authors, Year, Title and Journal. I currently am just able to open a file, and now I don't know how to begin parsing the …

Member Avatar for nihad.aziz
0
4K
Member Avatar for ben.juarez.773

Hello, Simple question: how can I command pgs4a to use android-10 (2.2.3) instead of always using android-8 (2.2)? I've tried using the target commands, but to no avail, unless I have missing files? I have my game set up and built, i've successfully created 2.2 apk's but cannot figure out …

0
166
Member Avatar for drayford

#QUESTION ONE person = input('Please enter your name:') print('Hello', person,'. How are you today?') #QUESTION TWO emotion = input('Please enter happy, sad or neither:') if emotion == 'happy': print('Well, it is great to hear that you are so chipper',person,'! Shall we continue?') else: print('Sorry to hear that. Hopefully we can …

Member Avatar for ZZucker
0
319
Member Avatar for jvidinha

Hi all, Would like to hear your approaches on how to parse a large txt file with one single line and writing to another file every block of 180 charaters in a new line.

Member Avatar for snippsat
0
355
Member Avatar for nyfan68

In my program that I have posted below, the user is suppose to click on a circle that is drawn using a specific color. Depending on whether or not the circle is colored yellow or blue, text will display in the same window as "Correct" or "Incorrect". The problem I …

Member Avatar for ZZucker
0
295
Member Avatar for abaddon2031

I have a python code that reads a file into a stringio. This works great but now i need to do is http post from the stringio and i can not figure it out. Any help would be greatly appriciated cause this is really conffusing and i dont know what …

0
251
Member Avatar for MasterHacker110

I'm trying to write a search enigne. Nothing fancy like google or so, just a simple one for educational purposes. I have done a little research and I know that Google uses Python, Java and C++. I on the other hand know C++, PHP, some Java and C# and even …

Member Avatar for kindo
0
243
Member Avatar for alyons

Do anyone know how to set a gif image as the background to my coding below? I just want it for my first window and not Demo1? The gif image is nameed "python_wallpaper.gif". from tkinter import * import threading from graphics import * class Intro(): def __init__(self,master): self.master = master …

Member Avatar for ZZucker
0
9K
Member Avatar for seotheo

Hi, Looking for a bit of advice if possible. I have a Django website I'm trying to deploy onto a new server but the documentation I have been able to find hasnt done me much good. I have all the files loaded onto the server in the same structure as …

Member Avatar for TrustyTony
0
226
Member Avatar for tjames95

I am new to Python and I am trying to import pygame. I am using Python 3.1 and I installed pygame 1.9.1 for python 3.1. When I try to import the module I get the following message: [icode]Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import pygame …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for abaddon2031

I have a block of code that i reads a file and then converts it to a add and update file and im looking to change it to where insead of it having a hard copy created every time for it to use stringio if it is possible. Sence im …

0
136
Member Avatar for abaddon2031

I have a code that i have made that appends a file then uploades the output of the appending to my websites database. In the code i have 2 def statements that i would like to put into modules. I was wondering if omeone could tell me a simple way …

Member Avatar for TrustyTony
0
205

The End.