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
0answers
2 views

Error when I try to import Pearsonr from scipy.stats

I got this error, when I tried to import pearsonr from scipy.stats. from scipy.stats import pearsonr Error Shows: Traceback (most recent call last): File "<stdin>", line 1, in <module> ...
0
votes
0answers
5 views

Execute process from the windows command line in Python

I would like to know how to execute this java process using the windows command line, from inside Python 2.7 on Windows 8. I thought I had already solved this problem, but I recently changed ...
0
votes
0answers
9 views

Selecting minimum value and remove maximum

I have a text file having data like EASSDS.txt 2738 EQQSDS7M.txt 394 EOG66.txt 354 EASSDS.txt 292 EQQSDS7M.txt 301 I want that it should only select the minimum and delete the maximum Output.txt ...
0
votes
1answer
21 views

Having problems with the loop function

I have a problem with looping through my lists in my text files. I am missing something but i cant figure out what it is. Here is my script user = open ('users.txt' , 'r') password = open ...
0
votes
2answers
19 views

sorting a counter in python by keys

I have a counter that looks a bit like this: Counter: {('A': 10), ('C':5), ('H':4)} I want to sort on keys specifically in an alphabetical order, NOT by counter.most_common() is there any way to ...
1
vote
2answers
14 views

Tokenizing a string gives some words merged

I use the following code to tokenize a string,read from stdin. d=[] cur = '' for i in sys.stdin.readline(): if i in ' .': if cur not in d and (cur != ''): d.append(cur) ...
0
votes
5answers
29 views

In python, what happens, will the length of a list decrease if I add part of the list to another list?

Consider this list here: example=[] And another: python=["hi","bye","hello","yes","no"] If I decide to add one of the elements from python to example, will a duplicate of that element b ...
0
votes
1answer
6 views

How can I translate local html document using translation API in Python

I have a set of html files, I need to translate their content. On the way out to get the same set of html but translated. All this is handled locally.
-1
votes
1answer
14 views

Downloaded webpage looks different than the original webpage

I am thinking of downloading cplusplus.com's C library by using Python. I want to download it completely and then convert it into a linked document such as Python documentation. This is my initial ...
3
votes
2answers
40 views

Convert float to generic fixed point represented as an int

I'm writing a software driver for some hardware I've built that implements fixed point only arithmetic. I've searched high and low but can't seem to find a generic algorithm that allows me to convert ...
0
votes
2answers
13 views

How to replace all recurrences of something in a list with something else

Sorry if the title is a bit vague, but I would like to go through a list and replace all occurrences of '\\' with '/'. Here's an example: list = ['C:/dir\\file.txt', 'C:/dir\\example.zip', ...
-4
votes
0answers
14 views

Reading and writing records from quickbooks

Folks, Need to write an application to read/modify quickbooks records. What would you recommend to use for doing this? Thanks
0
votes
0answers
6 views

how to make my pl.poly1d(fit) pass through zero, python

My code bellow produces a polyfit of the points in my graph, but I want this fit to always pass through zero, how do I do this? y=(abs((UX2-UY2)+(2*UXY))) a=np.mean(y) y=y-a ...
0
votes
1answer
14 views

Listening on port being used

Is there any way to listen to traffic on a specific port that another program is currently using, through the python socket module? For example: |--> my program external ...
0
votes
1answer
13 views

How to get current Python DLL?

I want to load current Python DLL via ctypes. I can load it like ctypes.windll.python33 but that depends on current version. I know that there is its handle in sys.dllhandle, but I don't know how to ...

1 2 3 4 5 13829
15 30 50 per page