15,194 Topics
![]() | |
I found [URL="http://www.daniweb.com/software-development/cpp/threads/358674"]this assignment[/URL] on C++ forum as was browsing to see little where I am in my mostly C little C++ thrown in understanding of C++ and if I should try to increase my knowledge in that language. I could not believe my eyes! The OP is completely lost … | |
There is many more stupid things to do than to read words of one of the best if not the best: [URL="http://norvig.com/lispy2.html"](An ((Even Better) Lisp) Interpreter (in Python))[/URL] | |
Hi guys, I tried to run the configure.py in the pyQt folder using command prompt, but it kept coming back with an error that's looks something like this trace back import sipconfigure no module named sipconfigure what do I do now guys, how do I tackle this. | |
Hi I'm having a test suite in python and i would like to email the result through my company server. I used a similar code but the code seems to be hung while waiting for a response from server during socket.connect() call. I traced the code and found that it … | |
Whats up guys? This program has given me nightmares lol. When input is a positive integer, the program should reduce it to prime factors. The integer is less than 900. The program should Output the prime factors as a series that when multiplied together, will return the original integer. If … | |
Hi, how would I login to an HTTPS site? I used the following code to connect to the site, but how do I login? [CODE]import httplib HOSTNAME = 'login.yahoo.com' conn = httplib.HTTPSConnection(HOSTNAME) conn.putrequest('GET', '') conn.endheaders() response = conn.getresponse() print response.read() [/CODE] | |
One part of my program requires that the user enters a date and this date is then checked against each product in the dictionary to see if the date the product arrived plus its shelf life causes the product to expire before or after the date entered by the user. … | |
hi, The problem is that i have one list like [l1 l2 l3 l4 l5 l6 l7 l8 ] no i want to compare l1 with l2 and get some score then l1 with l3.... and then l1 with l3 , l4 , l5.......... so on when i am compareing … | |
Here is experiment of how VM and Swing UI manage the sort test posted previously, instead of CPython and Tkinter. The timing is not so sweet, but at least no Java required! [CODE]K:\jython2.5.2>java -jar jython.jar swing_test.py 256000 words generated in 10.93 s Sorted in 1.68 s List prepared in 22.71 … | |
Hi I have a folder and its contain 5 text files. My question is How can I navigate to folder and read two first line of the txt files in folder with python scripts? I will be very greatful for your help. Reagards Tony | |
hi, i'm using Element Tree API to generate XML. But I'm getting error when opening the xml output. I tried to generate to a file and it worked. No error when running the Python code. Pls advise me why is not workin when i generate to an xml. fyi i'm … | |
I am trying to make a script in Python to recursively list all the files in a folder recursively. This code only shows some of the files in the directory I run it in, and I can't figure out why. Any help you can give me is much appreciated. [CODE] … | |
Hi im trying to write some GUI using wx.python and im nto sure how to do what i want. i have readibotton to choose an operation to execute. i want to have a list of machines which i will need to choose so the action will e done on them. … | |
Here is code to execute these printing commands from file: [CODE]talk("How Are You") bark("I am fine") bark("...and how are you") snarl("...sorry I asked") [/CODE] from file INPUT, do printing of results to screen without tags and to file with tags, and open the html output with webbrowser. | |
I have a generic script in another language which I use to query an ASA5500 firewall. Because of thousands of possibilities in even the 'show' commands, I write small .cmd files which are macro-executed from the main script. A .cmd file looks something like outfile("config.dat") showline("terminal pager 50000",0) makebuff(2000000) showline("show … | |
Hello all, I use eclipse for python and c++. In c++ when the code gets auto completed by the brackets i can skip over them by pressing tab key. But in python it does not skip over the brackets instead gives a tab space. Every time I have to press … | |
I made myself a project which is to make a virtual inventory but I have been having difficulty with pickling the variable: inventory. Could someone please insert the strip of code in order to save the variable in a seperate file and make it able to import it. [CODE]import pickle … | |
I got a look one huge Java code suggestion from one [URL="http://www.daniweb.com/software-development/python/threads/86608/1525822#post1525822"]newbie high jacker of old thread[/URL], so I had to write this code. [url]http://oeis.org/A001235[/url] (for values with [B]minimum [/B]2 ways, first difference is 87539319 with three ways. You can of course change the if part of the print to … | |
Before going into the problem, here is some hardware/software information: Device accessed: Ohaus Scout Pro Digital Weight Machine ([url="http://www.northshorecare.com/ohaus-scout-pro.html"]product link[/url]) Interface used: USB ([url="http://www.carolina.com/product/702448.do?s_cid=ppc_gl_products"]product link[/url]) Serial Port: COM3 OS: WinXP Python Version: Activestate Python 2.7 pyserial version: 2.5 Python recognized this serial port and had no problems opening it. I … | |
I did this code to compare to Delphi code in Delphi forum [URL="http://www.daniweb.com/software-development/pascal-and-delphi/threads/357771"]TListBox and sorting[/URL] which ran in my computer compiled in free Lazarus environment at time 7,235 s for generate and insert to listbox, 13,265 s sorting the listbox. | |
Whats up Guys? How do you make this program work for all string inputs? It reads only 5 and 6 letter words and outputs it in an X formation. 1) For example: Input Hello Output: H o e l l e l H o 2) For example: Input: Doctor Output: … | |
Whats up guys? I need help my code is not working too great could someone please help me? My Input should be : 03/12 hello there My Output should be : March the 12th: hello there It needs to work for January, February, March, April, May and June. And all … | |
[CODE]hi , once gain i need a suggestion from the expert, the prob is that i have 400 folder(folderxyz) in a given directory, and each folder contains some file . now i want to open directory , open each folder one by one and read the files present in it … | |
Hello, I have been using the python dictionary to create a multidimensional array. I recently stumbled upon the numpy module's array which creates a multidimensional list. Can we store string variables in this array module? or is there other ways in python to create a multidimensional list? Thanks | |
I have read that OO supplies it's own python and uno.py [for 3.3 under ..\basis\program] - but there are ways to incorporate it into your current version such that a script can issue [COLOR="Green"]import uno[/COLOR] w/out issue. I have tried scripts that supposedly permit this and tried to work through … | |
Guys I've been reading on PEP 8 and I see that one should use it especially to make sure that programs are standard. Please can anybody help as to how i can install it with my python 3.2 and how to use. Thanks in advance. | |
I was doing some work in python and I typed in ^ instead off ** without thinking and found some confusion as to what ^ does I did a bit of testing to find: 10^2 = 8 0^2 = 2 -5^2 = -7 11^2 = 9 9^2 = 11 -10^2 … | |
I'm attempting to create a one line Caesar cipher decryption program in python and i'm afraid i've come to the end of my knowledge and well past it. this is the closest working code i've got: [code]def test3(): print("The decrypted text is: "+"".join(map(lambda x: chr(ord(x)+y),x)))[/code] as you can see it … | |
Hello. I don't know if somebody has asked this before, but is there any python equivalent to the Java .jar files? I have read about py2exe, freeze, and module distribution, but it's not what I'm looking for. I need a file that can contain everything in my program (and modules … | |
I am new to JES and I wanted to know how to draw a ball going around in a circle. I already know how use the make movie function. I am just confused on how to make a ball go around in a complete circle. Can anyone please help? | |
I was wondering if it's possible for me to create a Digital Sound Processing (DSP) program using Python. Basically, I don't know anything about how I would do this and I would like somebody to point me in the right direction. I don't want somebody to write code, but I … | |
hey what program when given 3 numbers outputs true if the numbers form a pythagorean triplet | |
Hi. I'm new to python, and also have a poor english so...excuse me!:icon_question: Ok, I want to generate a dictionary like this one: [CODE]di={'word1':['tra1','A brief definition.'],'word2':['tra2','Another definition.']} [/CODE] from a txt file containing the word, its translation (tra#) and a definition of the word: [ICODE]word1 trad1 'A brief definition.' word2 … | |
hi, my problem is that i have written script which read a file , take line by line split it and then store it into dictionary. and i am writing the values of dictionary on other file, the problem is that at the end of file , it doesnt print … | |
I've got a small bit of code I need to convert to C#. However my experience with C# is very very limited and a simple python program like the one I'm trying to convert is beyond my experience in C#. If anyone knows of any converters or is willing to … | |
hey i would like a program to help me schedule my lectures and activities for dds. I would like to enter a date and an activity description and get as my output a text string e.g Input 03/13 work on dds assignment Output march the 13th: work on dds assignment | |
Here version of TicTacToe demo [URL="http://www.daniweb.com/software-development/python/threads/357974/1526474#post1526474"]code by wooeee[/URL] with packing style, which is more familiar for me. Also fixed indents and made it run also with Python 3. | |
Hi All, I am trying to start writing a wiki-ish CMS I've been contemplating for a while now. the content will include pics, html content, and should be stored in a database (the current pick is postgres) A few questions for the more experienced folk 'round here: 1. how do … | |
The program I was attempting to make was going to be 1.open notepad 2.fill 1 - 2 pages with text 3.save the file (named "1") 4.loop with a different saved name each time (IE named 1, then named 2, then 3, etc etc) I can open notepad, and loop that, … | |
I recently went and compiled my Tkinter application into a standalone app using py2exe. It seems to work when python is installed on the computer but when it is not installed, it shows the error - 'This application is not configured properly. Reinstalling the application may help', I read elsewhere … | |
I am having a problem setting the initial value in the new Tkinter tix module. Can anyone help me out? [code]# explore the tix.ComboBox() # the Tix (Tk Interface Extension) module comes with the # Python27 and Python31+ installation try: import Tix as tix # Python27 except ImportError: import tkinter.tix … | |
I have a code designed to show the different spaces a knight can move to in a standard chess game. It needs to be a function created that outputs the possible spaces in tuples. I can't figure out how to make the output in tuples and I would appreciate it … | |
hey i need a to write a program that when given an interger reduces it to prime factors. the interger is guarenteed to be less than 900 | |
Could someone point me in the right direction of hopefully a library or code examples, any resources on how to take XML and create a PDF using XSL-FO in Python? If I should have to use an XML renderer, then which XML renderer is recommended? | |
Hi,i want to access the filename of a any file using python.Ex. Suppose a folder contain some files Picture1.jpg,picture2.jpg,mypic.jpg..etx i want to make a program which will print all the file name Picture1.jpg picture2.jpg mypic.jpg of the certain folder.And the folder can have random file name but with .JPG extension. … | |
Hi all, I have an image 300x300. What I need to split into 100 regions or boxes. The code im using is below: [CODE]box = (a1,a2,a3,a4) h8 = bill.crop(box)[/CODE] The values of box I had as 0,0,30,30 for the first one. Next box as 30,30,60,60, next one as 60,60,90,90. But … | |
HI im having some trouble to create new GUI using python Tkinter module. [CODE] from Tkinter import * import Tkinter as tk import tkMessageBox import tkFont class GUIFramework(Frame): """This is the GUI""" def __init__(self,master=None): Frame.__init__(self,master) self.pack(padx=100,pady=100) self.master.title("Lab Management Hosts") self.costumFont = tkFont.Font( family = "Helvetica", size=30, weight="bold") label = tk.Label(master, … | |
I want to create a system to filtering a URL in python hungryforwork.co.nz/company/job/ eg hungryforwork.co.nz/telecom/5/ I want to put out the telecom and lookup this company and then 5 for a reference to a listed job Putting a folder for each company would be a mission. An error 404 might … | |
[CODE]hi there is an interesting problem , as i have almost 500 file in directory ~/work/whole_proteome/analysis_xenopus_takifugu_tetradon/split_result/filtered_domain/big_cluster_fasta_format/, now i want to run a perl script which is present in ~/work/whole_proteome/analysis_xenopus_takifugu_tetradon/split_result/filtered_domain/ORTHOMCLV1.4/ the problem is using os.system(command as it does not take the command properly) [/CODE] [CODE]from sys import * import os import … | |
Hi, I have this cvs file comprising of hex values. But my objective is to have them all converted to normal base 10 Dec format. myfile.csv [QUOTE]0x0000004d,0x00005275,0x37106800,0x000008a2,0x000009a2 0x0000004d,0x00005275,0x370d4e00,0x000008a2,0x000009a2 0x0000004d,0x00005275,0x37106800,0x000008a2,0x000009a2 0x0000004d,0x00005275,0x370d4e00,0x000008a2,0x000009a2[/QUOTE] I tried [CODE]for line in open('myfile.csv'): for word in line: word = int(word,16)[/CODE] word = int(word,16) ValueError: invalid literal for … |
The End.