15,181 Topics

Member Avatar for
Member Avatar for Deepak.G

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 …

Member Avatar for rogerkrush
0
1K
Member Avatar for diniboi

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 …

Member Avatar for TrustyTony
0
223
Member Avatar for gsingh2011

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]

Member Avatar for gsingh2011
0
121
Member Avatar for banannamoofin

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. …

Member Avatar for woooee
0
2K
Member Avatar for parijat24

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 …

Member Avatar for Gribouillis
0
322
Member Avatar for TrustyTony

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 …

Member Avatar for TrustyTony
0
502
Member Avatar for tony75

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

Member Avatar for TrustyTony
0
267
Member Avatar for tcl76

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 …

Member Avatar for tcl76
0
228
Member Avatar for dlazzeri

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] …

Member Avatar for dlazzeri
0
161
Member Avatar for levic22

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. …

Member Avatar for woooee
0
85
Member Avatar for TrustyTony

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.

0
309
Member Avatar for stan_l

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 …

Member Avatar for TrustyTony
0
297
Member Avatar for magnetpest2k5

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 …

0
72
Member Avatar for ThePythonNoob

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 …

Member Avatar for woooee
0
75
Member Avatar for TrustyTony

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 …

Member Avatar for TrustyTony
0
4K
Member Avatar for imperialguy

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 …

0
150
Member Avatar for TrustyTony

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.

0
579
Member Avatar for diniboi

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: …

Member Avatar for diniboi
0
194
Member Avatar for diniboi

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 …

Member Avatar for diniboi
0
192
Member Avatar for parijat24

[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 …

Member Avatar for TrustyTony
0
199
Member Avatar for magnetpest2k5

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

Member Avatar for vegaseat
0
2K
Member Avatar for stan_l

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 …

Member Avatar for stan_l
0
142
Member Avatar for e-papa

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.

Member Avatar for e-papa
0
726
Member Avatar for Thropian

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 …

Member Avatar for TrustyTony
0
88
Member Avatar for animanga

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 …

Member Avatar for animanga
0
755
Member Avatar for G_S

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 …

Member Avatar for G_S
0
8K
Member Avatar for nightrev

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?

Member Avatar for TrustyTony
0
63
Member Avatar for SgtMe

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 …

Member Avatar for SgtMe
0
353
Member Avatar for brixton d

hey what program when given 3 numbers outputs true if the numbers form a pythagorean triplet

Member Avatar for TrustyTony
0
110
Member Avatar for dobleseis

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 …

Member Avatar for TrustyTony
0
232

The End.