15,175 Topics

Member Avatar for
Member Avatar for petrovitch

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 …

Member Avatar for woooee
0
69
Member Avatar for 4evrmrepylrning

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

Member Avatar for Gribouillis
0
144
Member Avatar for vlady

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

0
59
Member Avatar for floatingshed

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.

Member Avatar for floatingshed
0
68
Member Avatar for Niner710

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 …

Member Avatar for TrustyTony
0
132
Member Avatar for scott_liddle

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 …

Member Avatar for hughesadam_87
0
114
Member Avatar for fafa70

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 …

Member Avatar for woooee
0
206
Member Avatar for vegaseat

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 …

Member Avatar for warunn
1
8K
Member Avatar for ktsangop

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 …

0
148
Member Avatar for shahulsyed88
Member Avatar for TrustyTony
0
38
Member Avatar for fatalaccidents

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 …

0
115
Member Avatar for welshly_2010

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 …

Member Avatar for TrustyTony
0
211
Member Avatar for puddlejumper406

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 …

Member Avatar for woooee
0
311
Member Avatar for suly

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 …

Member Avatar for woooee
0
179
Member Avatar for group256

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 …

Member Avatar for group256
0
176
Member Avatar for LRNPHP

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

Member Avatar for Gribouillis
0
94
Member Avatar for welshly_2010

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 …

Member Avatar for Gribouillis
0
88
Member Avatar for dmv091

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 …

Member Avatar for woooee
0
464
Member Avatar for ozzyx123

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 …

Member Avatar for ozzyx123
0
1K
Member Avatar for nosehat

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

Member Avatar for nosehat
0
1K
Member Avatar for boiishuvo

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

Member Avatar for snippsat
0
284
Member Avatar for boiishuvo

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 …

Member Avatar for boiishuvo
0
446
Member Avatar for inuasha

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 …

Member Avatar for Gribouillis
0
215
Member Avatar for pakiali007

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.

Member Avatar for peter_budo
0
72
Member Avatar for floatingshed

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.

Member Avatar for floatingshed
0
151
Member Avatar for ozzyx123

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 …

Member Avatar for britanicus
0
194
Member Avatar for AJkiter

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 …

Member Avatar for TrustyTony
0
108
Member Avatar for ozzyx123

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 …

Member Avatar for peter_budo
0
652
Member Avatar for Stanzilus

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 …

0
33
Member Avatar for lfmconsummates

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 …

Member Avatar for lfmconsummates
0
186

The End.