15,175 Topics

Member Avatar for
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
160
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
716
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
Member Avatar for parijat24

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 …

Member Avatar for vegaseat
0
135
Member Avatar for izabwlla

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 …

Member Avatar for vegaseat
-1
835
Member Avatar for brixton d

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

Member Avatar for brixton d
0
91
Member Avatar for TrustyTony

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.

Member Avatar for e-papa
0
757
Member Avatar for DimaYasny

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 …

0
152
Member Avatar for TwistedVelocity

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

Member Avatar for richieking
0
141

The End.