15,181 Topics
| |
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 … |
The End.