15,194 Topics

Member Avatar for
Member Avatar for kelokely

I have a list of files of similar format. I want to extract all lines form each file that are containing exact character for example I need to extract only lines with TPO and saving to another file also I need to extract only lines with HOH and saving to …

Member Avatar for baki100
0
118
Member Avatar for vlady

Hello, I make an exercise from a book : Think Python: How to Think Like a Computer Scientist by Allen B. Downey, Version 1.1.22, random words exercise 7. I made a script like this (see below) but how can I make list (named book) just once and since then after …

Member Avatar for TrustyTony
0
160
Member Avatar for SoulMazer

Hi, so I'm having quite the difficulty here. Let me start by explaining the architecture of my scripts. My "Listener.py" is a script that uses asyncore in order to listen for connections and receive commands from them. If it receives the text "play" from a connection, it calls another script, …

Member Avatar for SoulMazer
0
275
Member Avatar for Gargen

im just curious im currently learning all major programming languages that are usefull to me and i am wondering what is python useful for in a realistic sense

Member Avatar for Orion2k
0
526
Member Avatar for kurtiskain

Hi everybody! I am currently working on a low level console/text based python phonebook. I have a working program and i can add and search entries just fine, but what I want to know is...can I remove entries? I am using the OS package...so i 'import os' at the beginning, …

Member Avatar for griswolf
0
138
Member Avatar for ihatehippies

I wrote this function to compare two strings and find their similarity. It returns the percent of their letters in common in place. ie "hello" and "yellow" share the "ello" (8 of 11 characters) and thus are 72.72 % similar. I feel like there is a better way to write …

Member Avatar for TrustyTony
0
2K
Member Avatar for Syphilis

What's Up? I can't seem to post this in the PyQt section (No post new thread button) Anyway I've started using PyQT to design a UI for my python script, I've googled around for ages and racked by brain, But to no avail, Nothing I've found is specificy tailored to …

Member Avatar for vello
0
120
Member Avatar for i-teq

Whilst having 20+yrs in IT I'm brand new to Python programming... I'm trying to reference an object in a different class as a lookup... I have a class which describes items and their prices I have a class which describes a currency code and a conversion rate I'm trying to …

Member Avatar for i-teq
0
4K
Member Avatar for photoyid

Is there a way to determine which shift key is pressed? I am writing a program that shows an image and I want the user to say which side of the screen it is showing up on.... I thought of using the mousekeys but realized that not all computers have …

Member Avatar for TrustyTony
0
866
Member Avatar for lstensland

I am new to programming and have been reading a few books on Pyhton but can't seem to grasp what I believe is probably a simple process. I need someone to show me briefly a sample script that would allow me to open a CSV file and edit it line …

Member Avatar for lstensland
0
443
Member Avatar for foco

I have a simple script to POST a pdf to a server. It works great when I use Ubuntu to run it. However, when I run it in Windows, I get this error: Error: <urlopen error [Errno 10035] A non-blocking socket operation could not be completed immeditately> Could this be …

0
66
Member Avatar for Pineapplesf

I am having a lot of trouble sorting an array. The array contains 140 inner arrays of 3 points (x y z). I would like to sort all arrays based on lowest x coordinate to the highest. I have googled many methods and none of them have worked so far. …

Member Avatar for vegaseat
0
13K
Member Avatar for daanh

i'm reading a an excel file with xlrd. When i'm running the code a warning pops up: 'WARNING *** format u'"*"' produces constant result ' I think that u'"*"' stands for unicode, is that correct? But what does 'produces constant result' mean and what implications can it have? Thanks

Member Avatar for Gribouillis
0
133
Member Avatar for Syphilis

What's Up? So, In my first python script, If a button is pressed, Then it defines a variable called var, With the content of "0" and then sends it over the net to another python script, And here's the problem. When it comes to receiving the content of var. [code]var …

Member Avatar for Syphilis
0
140
Member Avatar for pixeldroid

Hi folks: Once again, working w/Python in Maya, a 3D animation app. I'm using a potentially time-consuming procedure to generate a list of commands, and I want to store the list in the Maya file. The best solution I can think of is to convert the list to a string, …

Member Avatar for pixeldroid
0
174
Member Avatar for onizuka1

Hi all, I have used some forum browsing and the WxDemo to create my desired GUI and struggling to find some good reference material to add functionality to my design. This GUI will ideally pull / send information to other programs (in python and/or c) in the future but for …

Member Avatar for onizuka1
0
385
Member Avatar for vlady

I study manual "Think Python: How to Think Like a Computer Scientist by Allen B. Downey, Version 1.1.22, chapter 13, 13.6 Dictionary subtraction. There is an exercise 6. I did it by not using set types. The result will be the same? Pls can you show me how to use …

Member Avatar for vlady
0
81
Member Avatar for MrAlshahawy

Hi all , How can I get the number of MissedCalls and Unread SMS'. EX :Reminder: You have received 6 MissedCalls and 2 Unread SMS'. And ofcourse I'm not talking about all calls that I didn't answer and loged in log. How can I get the numbers and time for …

Member Avatar for Beat_Slayer
0
93
Member Avatar for MrAlshahawy

Hi all , I got some questions about wrapping my applicatio so it can work when I hand it out to the user : First : How can I have an icon that appears in "Installed" folder and in the top of my application window instead of Python Icon ?? …

Member Avatar for Beat_Slayer
0
98
Member Avatar for tzushky

Hi everybody, New adventure question: if you know how macros act in C, is there such a behavior in C? Basically the most important feature I'm looking for is similar to this: [CODE] #define MY_C_MACRO(x) {if (x>0) x++; else return} [/CODE] Such a macro would cause the function where it …

Member Avatar for tzushky
0
275
Member Avatar for Chupakun

Hi there, I have a simple piece of software written up that I'm running off the terminal's command line interface. Very recently, it was asked of me to create a GUI for it. So I basically made one to reflect how I would use the software but I actually haven't …

Member Avatar for Chupakun
0
1K
Member Avatar for zjjca

Hi all, I just want to know if it is possible to add a background image in text widget Thanks ps: I got python version 2.4.4

0
28
Member Avatar for evaristegalois

Hello I am new to python. I am looking for resources with good examples for learning python. I need python for data processing. thanks

Member Avatar for SgtMe
0
37
Member Avatar for Pinchanzee

Hey guys, new here. Decided to start learning Python and this community looks like a perfect place to learn with the help of others. A bit of a forum-related problem at the moment though, when the browser is loading "ad.amgdgt.com" it takes about 4 minutes to load each time I …

Member Avatar for Pinchanzee
0
95
Member Avatar for G_S

Hi people, the title says it all: The user manual of my program is an HTML document, and I want the OS's default browser to open it directly once the user clics on help. The function that the help menu entry invokes is this: [CODE=python]os.popen("/usr/local/firefox/firefox ./html/index.html")[/CODE] Now this only works …

Member Avatar for G_S
0
4K
Member Avatar for G_S

Hello, I've been looking for this here but haven't been able to find an answer that fits my case: I have a tkinter GUI consisting in a button and a Text (a textbox). You write the whole text in the textbox, then press the button and it uses the get() …

Member Avatar for G_S
0
106
Member Avatar for ic_m

Need help to code a program which: - validate user input, accept values that a user has entered (ex, a, b, c, d, e) - any other values other than these are to be treated invalid with a message and block it from processing. - Prompt the user to enter …

Member Avatar for baki100
0
184
Member Avatar for cyon

I'm trying to import a module that checks an .ini config file for correct syntax (via regex patterns). If the syntax is wrong, I want the main code to crash (and hopefully log the error, too). I need some guidance on how I should do this. My current approach doesn't …

Member Avatar for TrustyTony
0
378
Member Avatar for jinjonBoo

Hi there everyone. I'm new to Python, and i'm programming a game application, using pyOpenGL. The thing is, the program crashes and exits when i push a key (but i don't want (at least for now) help for that), but i wish i could see the error that appears on …

Member Avatar for Tech B
0
348
Member Avatar for G_S

The question is simple: I have two scrolled text widgets (I'm using tkinter and python 3.x), and I want to synchronize them, that is I want both scrollbars to move at the same time when the user moves the mouse wheel. Both widgets are suppossed to contain the same text, …

Member Avatar for SoulMazer
0
486

The End.