15,181 Topics

Member Avatar for
Member Avatar for krystosan

Does anyone have idea how to fetch a file split into defined number of ranges using the requests module instead of urllib2 ?

Member Avatar for snippsat
0
124
Member Avatar for awahqn

Hi, I have a code in perl that does some mail things and I would like to translate it to perl can someone help me please? I dont know perl so i want it in python so i can edit it. here is the code: #!/usr/bin/perl -w # USAGE : …

Member Avatar for TrustyTony
0
214
Member Avatar for kxjakkk

I'm trying to modify this code: class Tree: def __init__(self, cargo, left=None, right=None): self.cargo = cargo self.left = left self.right = right def __str__(self): return str(self.cargo) def print_tree_inorder(tree): if tree is None: return print_tree_inorder(tree.left) print(tree.cargo, end=" ") print_tree_inorder(tree.right) So that it adds parentheses around every operator and pair of operands. …

Member Avatar for kxjakkk
0
470
Member Avatar for caltech

Hi, I've had a rather ambitious project on my mind for as long as I've been at my job (almost a year) -- to pretty much rewrite their central application, which is a listing database/"portal", around and upon which their entire IT infrastructure and web and computing tasks and operations …

Member Avatar for il_doc
0
305
Member Avatar for yuimikazuki

print "Let's practice everything." print 'You'd need to know 'bout escapes with \\ that do \n newlines and \t tabs.' poem = """ \tThe lovely world with logic so firmly planted cannot discern \n the needs of love nor comprehend passion from intuition and requires an explanation \n\t\twhere there is …

Member Avatar for HiHe
0
160
Member Avatar for lewashby

(Linux) I just installed eyed3 for python using apt-get, everything installed fine but when I tried to import eyed3 I got a trackback error, no such module. Do I need to do something special to let python know where the module is at or do I need to move the …

Member Avatar for Gribouillis
0
1K
Member Avatar for henry.moore.319247

this is my first attempt on python and i would really love some help heres my code class Customers(object): def __init__(self, Surname = None, FirstName = None, Address = None, Town = None, Postcode = None, PhoneNumber = None, Date = None, Email = None): self.Surname = Surname self.FirstName = …

Member Avatar for TrustyTony
0
314
Member Avatar for Jack_9

I'm still kinda uncertain about python. But if you can, How would you go about making a instant messaging webapp? This isn't for any homework or paid jobs, just curious for my website.

Member Avatar for Hiroshe
-1
104
Member Avatar for abaddon2031

Im working on a project where i have to get the number of printers that are allocated to a certain job and need to split the file name up so that i can read the type and the number of printers and if its a half bed or not. The …

Member Avatar for snippsat
0
266
Member Avatar for yuimikazuki

from sys import argv from os.path import exists script, from_file, to_file = argv print "Copying from %s to %s" % (from_file, to_file) # we could do these two on one line too, how? in_file = open(from_file) indata = in_file.read() print "The input file is %d bytes long" % len(indata) print …

Member Avatar for David W
0
220
Member Avatar for analys

Hi, I'm new to python. I'm creating python script that will copy file from different destination to another destination. It will copy as well the access for different user. I'm trying to output any results to the logfile but it didn't seem to output it. Here's my code. Hope anyone …

Member Avatar for analys
0
417
Member Avatar for analys

Hi, I want to develop Python script for server automation (server backup) that able to copy the files with user access permission as well. I want to do it with Python but I'm not sure how to start on the active directory scripting with Python. Can somebody help me?

0
185
Member Avatar for Jack_9

I honestly think that the python programming language will take over other languages such as c# and maybe even c++. Why do I say this? Because a python interpreter can easily be embedded in the game. I have also written an engine to make python as fast as C++ (true …

Member Avatar for iamthwee
0
408
Member Avatar for kxjakkk

I'm trying to write a boolean function that takes two Mytime objects, t1 and t2 as arguments, and returns True if the object falls inbetween the two times. This is a question from the How to Think Like a Computer Scientist book, and I need help. What I've gotten so …

Member Avatar for David W
0
449
Member Avatar for Jack_9

In my opinion, python is a fantastic language, but is it possible to develop an operating system with python, BUT one thing that I do know is that if you were going to develop something with python it would probably have to be the gui. Because python dosen't even really …

Member Avatar for mike_2000_17
0
260
Member Avatar for kxjakkk

I wanted to format this string but I don't know how I can do the formatting part at all. class MyTime: def __init__(self, hrs=0, mins=0, secs=0): self.hours = hrs self.minutes = mins self.seconds = secs if self.seconds >= 60: self.minutes += self.seconds // 60 self.seconds = self.seconds % 60 if …

Member Avatar for sepp2k
0
261
Member Avatar for kxjakkk

This is my code: class MyTime: def __init__(self, hrs=0, mins=0, secs=0): self.hours = hrs self.minutes = mins self.seconds = secs if self.seconds >= 60: self.minutes += self.seconds // 60 self.seconds = self.seconds % 60 if self.minutes >= 60: self.hours += self.minutes // 60 self.minutes = self.minutes % 60 if self.hours …

Member Avatar for kxjakkk
0
283
Member Avatar for tanuja vykuntpu

i want to create online discussion forum using python but i dont know what type of tools to use,i want to maintain database and builtin board myself without interference of third parties,please anyone help me

Member Avatar for tanuja vykuntpu
0
117
Member Avatar for abaddon2031

I am working on a code that searches a folder gets a specific part of the file name and adds 1 to a file counter. There are some files in tehre that have a special character that indicates that is is only half. I ahve got it to count the …

Member Avatar for flebber
0
199
Member Avatar for flebber

I am having an error file object when opening and reading a text file(csv). I must be misusing the with so that when I call the function race table its getting a file object and not a readline. How can I get the with to correctly hand over the file? …

Member Avatar for flebber
0
150
Member Avatar for EnergeticJet

Hello there DANIWEB! Now I know that there are already many different discussions asking for python ideas for beginners, but I thought maybe this could be a discussion for all different abilities. For example, if I wanted to reply with a Beginner idea, I would type: **BEGINNER** And the same …

Member Avatar for DragonMastur
0
375
Member Avatar for mark103

Hi all, I need some help regarding how to cancel the connection from my server using the urllib2 library. I want the database to stop writing the data away as soon as the connection has been cancelled. The `allchannels_timer` will be called when I hit the 'enter' button, which will …

Member Avatar for DragonMastur
0
451
Member Avatar for moone009

First off this is my second day writing in Python. My manager switched us off SAS and moved us to Python and R which I actually am starting to like the flexibility. I have a few datasets that I work with on a regular basis that require a lot of …

Member Avatar for moone009
0
7K
Member Avatar for Vikram_2

Hello all, I have a Hindi Text file, from which i want to access the maximum repeated words and other similar operations. I went through many articles which help in accessing English text files. But i need to use the same operations on the Hindi text file, i am not …

Member Avatar for Gribouillis
0
2K
Member Avatar for krystosan

Hi need help passing an argument through signal emitted from a function at module level, when the function is executed I want to emit a signal with an argument whose value i want to pass to the method that is connected to that signal in the class in that same …

Member Avatar for woooee
0
329
Member Avatar for kxjakkk

I need to make an object called Accounts that can be used as a banking system. It requires 3 inputs, first name, last name, and initial deposit and 4 member functions: withdraw, deposit, fee and interest. The fee is $20 a month if the amount in the account is less …

Member Avatar for Hiroshe
0
612
Member Avatar for lewashby

I know that all you really need to execute a python program is the python interpriter, what what if your program uses config files that might be in /etc, ~/.program, or C:\users\Name\Appdata ? How would you go about creating an installer for you python program and all of it's files …

Member Avatar for snippsat
0
428
Member Avatar for sandhya1202

[QUOTE]I would like to search for more than one word in a text file and if the word found i would like to save it to a group in which i have files belonging to English,Entertainment etc.The thing is Im unable to search for more than one string in a …

Member Avatar for Vikram Kolla
0
335
Member Avatar for Keith_4

Hello, I need to make a python scrip to perform the following: *I have a list of IP's 1. Read from a text/csv file to input IP #1 into a telnet session. 2. Once the telnet session is initiated I need to run a GET cmd 3. Output the result …

Member Avatar for rubberman
0
50
Member Avatar for pizzaaaa

I can't go back to a submenu. Using continue or break will make me go back to the main menu. Can you get what I'm saying? New to Python. Thanks!

Member Avatar for rubberman
0
148

The End.