Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.

learn more… | top users | synonyms (2) | python jobs

0
votes
2answers
36 views

Re-read an open file Python

I have a script that reads a file and then completes tests based on that file however I am running into a problem because the file reloads after one hour and I cannot get the script to re-read the ...
0
votes
0answers
14 views

python cups import error in django

I am using django_cups in my project, and I am getting import error in the models line 4. Here is the models.py file ...
0
votes
1answer
14 views

Python subprocess module to invoke a program and give it input

i am using python 2.7.4 and need help to call a program kendall.exe kendall.exe uses two inputs which it asks from the console(displaying its messages and reading input). i have to do this through ...
0
votes
0answers
41 views

How to convert python code to php? [closed]

I have the following code that need to be converted to php, Ive found it from here. Do you know any tool to convert it ? I read different answers but could not find a proper solution for it. ...
0
votes
1answer
16 views

Calculating surface area from 3d data points

I am new to python. I have 3d data points , say x ranges from (118 to 123), y ranges from (0 to 10), z ranges from (-4 to 4). So using these data points , how to calculate the surface area (Axyz) ...
0
votes
2answers
20 views

Pay Per Request in Django

Is it possible to implement this in django: In a video site, for every video a user want to watch he/she must pay a fee before watching the video. If it's possible, what's the best way to implement ...
0
votes
0answers
4 views

Django-celery-email - adding date to sent message

I would like to add to database a date after a list of e-mails has been sent with Django celery email. I was trying to add task in celery that checks if the task of sending mails has ended, but I ...
2
votes
3answers
41 views

list index out of range python [duplicate]

I'm trying to do a fairly trivial operation in Python, but am stumped as to why I'm getting the error message in the title on the moment_list.remove(moment_list[i]) line. My code is: for i in ...
1
vote
1answer
13 views

Python Saving Process (closing the file handler)

Please Review this basic example def queue_add(): #this will exit when all lines from the #file are added in the Queue with open('get_from.txt') as f: for line in f: ...
0
votes
0answers
13 views

linking data to a post [migrated]

Probably a noob question. When I post a question, It is easier for the viewers to have some simplistic data to understand the problem. Creating the data with the sample code is only feasible if it ...
0
votes
1answer
15 views

python doctest check for a specific line

I'd like to write a doctest like this: """ >>> checking() some random text some more random text ... test is passed ##ignore all above/below lines except this one more and more randomness ...
2
votes
0answers
7 views

Update pandas DataFrame in stored in a Pytable with another pandas DataFrame

I am trying to create a function that updates a pandas DataFrame stored that I have stored in a PyTable with new data from a pandas DataFrame. I want to check if some data is missing in the PyTable ...
0
votes
0answers
3 views

pyobfuscate for multiple files and porting astrand's code from 2 to 3

Has anyone tried porting the code for pyobfuscate (https://github.com/astrand/pyobfuscate) into python3 ? Also, has anyone used it for multiple files ? (After writing a wrapper class of course). I ...
1
vote
0answers
24 views

How to perform multiple functions on a text file

I am very new to python, and having gone through some exercises I thought it would be a good idea to write my first program! (Perhaps an overly ambitious goal). I have a textfile and want to extract ...
1
vote
0answers
7 views

Celery-Django: Celery vs django management commands

I work for a travel company where we need to send periodic mails to our teams . Since now I have been using django management commands and running them using crontabs. I was reading about what celery ...

1 2 3 4 5 12965
15 30 50 per page