15,175 Topics
| |
I've been running a python script successfully on Linux for about a month. Recently, I got a message that says "can not execute", "No such file or directory". I can type python and it runs on command line, but my script will no longer run on the daemon. It has … | |
Hi all. My new job involves writing scripts for people in other departments. I'm pretty much on my own with this and I'm still a beginner with Python(I think my brain is still in PHP mode and I'm still struggling with this object oriented approach). Here is what I have: … | |
Hello, I need help to get all together. Pls see 2 different codes below . 1 code: Represents format for final result paper called "vysvedcenie" (evaluation) for a particular student. code: [CODE]def do_once(f): f() def do_twice(f): f() f() def do_four(f): do_twice(f) do_twice(f) def hlavicka(): print 'x',' '*40+'VYSVEDCENIE'+' '*46+'x' def vertikal(): … | |
Does anyone here have any experience of the notebook widget in PythonCard? I can't figure it out and it is missing from the docs... Thanks. | |
Hi, I created a numpy matrix(1 row, 3 cols) with the following values [4 6 8]. What I want to do is to concatenate all these values into a single entry of binary values. So instead of [4 6 8] I would want to have a numpy matrix of just … | |
Firstly, this is homework for my computing science class, but we are allowed to get help on the internet or using any other way we want. I'm trying to write a program to read in a file with user responses to questions (I.E. an automated handset vote) and then to … | |
hi. i am writing a program in python and i need two things will be processed simultaneously but because i have a lot of global variables i can n't do it with parallel python library. i tried multiprocessing and Multithread too but nothing find yet. can someone suggest me a … | |
This snippet explores the change of a hexadecimal (base 16) string to a denary (base 10) integer and the reverse. Interestingly Python allows the representation of the hexadecimal string in two different forms. For instance 255 can be changed to 'FF' (also 'ff') or '0xff'. Any of these hexadecimal strings … | |
Hi everyone! I have a quick question. Is there any way i can update python package for cygwin manually? The setup.exe which handles cygwin installation and updates, prompts me to update the whole cygwin installation to 1.7.x but i would like to keep using the older version (1.5.25). I only … | |
1 23 456 7891 23456 plz give the code by using while loop................ | |
I have a question about h5py. I've read almost all of the tutorials online but I must be missing something. I'm wanting to read data from an h5 file that already exists. Here is the first part of the file as it looks from being h5dump'ed just so you can … | |
hey i want to put two values into one dict and am not sure how to achieve this. i want it to look like this. what am trying to do is a dictionary that holds the date as the key, and a dictionary as its value. That dictionary will contain … | |
I've been working on this code all night and i can't seen to find out how to do the math i think it needs a loop of some kind on line 17 and 18 also it wont print out the avg mpg please help def main(): 1 print("This program calculates … | |
the project is about a debate, and there are 4 candicates in the debate, and we need to group them into 4 different dict and count the word frequence they said. the debate is line by line, and we should group the sentences by name tage, like PAUL: and then … | |
Hello everyone, I have to code an array that in each row, it has 16 columns! So I called it myself a 17 dimensional array but I was wondering what data sturcture in Python can best represent this keeping in mind that, it should be easily addressable and modifible. For … | |
Hi There, I'm very new to Python. Is there a easy way of looping trhough a file and using the values in a grep command? [code] Value A Value B 2011-12-14 20:54:09, 797410378, 2011-12-14 20:55:52, 734451141, 2011-12-14 20:56:30, 796058907, 2011-12-14 20:59:51, 736280553, 2011-12-14 21:09:42, 729858848, 2011-12-14 21:12:02, 825895818, 2011-12-14 21:13:53, … | |
hey i am trying to find many attacks were logged per day per ip. i am reading from a syslog file. here a line couple lines am reading from [QUOTE]Jan 10 09:32:09 j4-be03 sshd[3876]: Failed password for root from 218.241.173.35 port 47084 ssh2 Jan 10 09:32:19 j4-be03 sshd[3879]: Failed password … | |
Hello I am new to Dani web but here it goes. I am trying to create a game that called Three button monte i am using graphics from zelle but and i will upload the proper code to go alone with mine. My problem is when it comes to checking … | |
hi everyone i have made a program which extracts information from an email account, it extracts the date, the sender, number of copies written in the body, and it extracts the pdf file from the email and puts it into a directory, it also counts the number of pages in … | |
Is there an easy way to modify the contents of a zip file inside the archive, without unpacking everything to a temp directory, making the change, then packing it all up again? I've got a whole bunch of zip files, each one with a bunch of plain text files (html, … | |
[CODE]info = '''<table> <tr align = "center"> <h1> Lachlan Osborn </h1> <p> Address: 5 Smith Street, Manly <br> Date of Birth: 26th April 1993 </p> <a href="semester.html"><b>My Semester Units</b></a> <p><b>Check out my <a href="hobbies.html">hobbies.</a></b></p> </tr> </center>''' def remove_html(text, info): import re text = re.sub(r'<.*?>', '', info) return text remove_html(text.strip())[/CODE] | |
I want this program to read a text file then target and replace anything start with < and end with > for example it finds <html>, replace that into **** but somehow i tested it and it didn't work than i expected. any suggestions? [CODE]def remove_html(text): txtLIST = list(text) i … | |
Alright so I was not sure exactly how to say this, but here is the idea. I have a graph or table I guess you could call that looks like this. [CODE] print ''' ----------------------------- | | | |x | | | |----------------------------- ''' [/CODE] Then I want to make … | |
Create a function that take a full name as a parameter and returns just the middle name regardless of how many words it consists of. | |
I'm running a command line app from a Python script: [CODE]os.system(myapp)[/CODE] myapp contains the path to the app and the required parameters. It works fine but it runs at, I believe, Normal priority which makes the PC sluggish. How can I start the external process at a lower priority? Thanks. | |
hi everyone i am very close to finishing my first program in python, but there are two things in the way. first of all the code highlighted in red reads the number of pages of pdf files in a directory. my problem is that it is in a for loop … | |
Ok some of you might've seen my post from yesterday about the weekend challenge game thing i'm doing with a friend. The link to my post yesterday is [url]http://www.daniweb.com/software-development/python/threads/416633/1777493#post1777493[/url] Anyway, now im trying to make a shop type thing but im having trouble writing a script (or whatever you call … | |
hi everyone i am currently building a program which logs into an email, extracts information like the date, sender, subject, number of copies, and takes any attachments and puts them into a directory, than takes the number of pages of the pdf. i have already built a program which does … | |
Hello all, I am new to python and working on a school project to import an SQL query with python and have it print out results then save them to a file location. This is what I have so far and wanted to know what I am missing or if … | |
So this program is supposed to take a letter the user wants to replace, and store that in a dictionary. At the end, it asks the user to enter a message and it's supposed to decode it, cross-referencing the dictionary and replacing any letters within it to the newly assigned … |
The End.