15,193 Topics

Member Avatar for
Member Avatar for WolfShield

I have a wxPython project that I want to add a syntax highlighting feature to the RichTextCtrl. I have the function and the binding, but it doesn't format the words when I type. If I bind the function to a menu item it works just fine. I am using "this" …

0
88
Member Avatar for dnyansagar

Hi all, I have a data which looks like this, Input: man1 car man1 wallet man1 shirt man1 shirt man2 truck man2 house man2 jacket man2 jacket man2 jacjet man2 computer I want to collect the data, but while collecting I want to count them as well So the the …

Member Avatar for TrustyTony
0
399
Member Avatar for MarcusMaximus

Hi, I'm starting to code in python and would like some advice. I'm fairly competent in coding and have been doing alot of VB and shell scripting lately but as python is cross platform I've decided to switch. How do I get python to run programs I have saved in …

Member Avatar for TrustyTony
0
208
Member Avatar for JoshuaBurleson

Hello mates, I was wondering if in that vast amount of knowledge floating around here if any of you knew how I could save an image using Python 3.x. I know that PIL is a great, and easy option for Python 2, but I assume there must be some way …

Member Avatar for JoshuaBurleson
0
588
Member Avatar for Tyler212

hi, I am currently taking a pyton programming class and having some extreme difficulties. I am in quite the pickle with these 3 prompts. I do not know where to start for any of these prompts; if anyone has any code or solutions to any of these three promps I …

Member Avatar for TrustyTony
-1
442
Member Avatar for preet4fun

"""2) When testing software, it can be useful to count the number of times that a function is called. Without using any lists or dictionaries, define a higher-order function count_calls that returns two functions: - a counted version of the original function that counts the number of times it has …

Member Avatar for TrustyTony
0
223
Member Avatar for paren8esis

Hello everybody. I am trying to learn how to create GUI for my python programs using Glade. Now I'm facing the following problem : I have written something like the code below, and when I run it everything works fine except secondWindow doesn't show up. What am I doing wrong? …

Member Avatar for woooee
0
587
Member Avatar for Gustavo_B

Hi, I'm writing a small application that gets some data from the user and launches a second application related to what process the user is working on. So, sometimes the user needs to choose from different versions of the same aplication. I decided that after the Ok button is pressed …

Member Avatar for JoshuaBurleson
0
1K
Member Avatar for Publius

Hello, I'm writing a program using wxPython. I've got this code: [CODE]class captchaFrame(wx.Dialog): def __init__(self, parent, title, id): wx.Dialog.__init__(self, parent, id, title, size = (390,350)) self.panel = wx.Panel(self) self.vbox1 = wx.Sizer(wx.VERTICAL) self.hbox1 = wx.Sizer(wx.HORIZONTAL) self.hbox2 = wx.Sizer(wx.HORIZONTAL) self.hbox3 = wx.Sizer(wx.HORIZONTAL) self.hbox4 = wx.Sizer(wx.HORIZONTAL) self.yt_username = wx.StaticText(self.panel, label = 'YouTube Username/Email:') …

Member Avatar for woooee
0
509
Member Avatar for Cyrano

On Android phone, I used setEntity() to put the FileEntity to the POST request. [CODE]HttpPost post = new HttpPost(uri); FileEntity reqEntity = new FileEntity(f, "application/x-gzip"); reqEntity.setContentType("binary/octet-stream"); reqEntity.setChunked(true); post.addHeader("X-AethersNotebook-Custom", configuration.getCustomHeader()); post.setEntity(reqEntity);[/CODE] When using bottle, I tried this but it is not working [CODE]f = request.body gzipper = gzip.GzipFile( fileobj= f ) …

0
66
Member Avatar for ericoscarj

Write a function count_digits (s) that counts the number of digits in the string s and returns answer (an integer). The function must internally use a for-loop. Example ; [CODE]>>> count_digits("1q2w3e4r5t") 5 >>> count_digits("42") 2 >>> count_digits("tea")[/CODE] , Id appreciate any help:)

Member Avatar for Enalicho
0
110
Member Avatar for ande-s

Hi Guys, I am currently looking for a Python solution to a project I am working on. I am VERY new to Python so please go easy on me. Currently, I have a server setup, only running Windows 7, and on that server, Thunderbird is constantly running checking for new …

Member Avatar for TrustyTony
0
264
Member Avatar for tzho11

hi, right now i'm working on a program that prints parabolic shapes on the screen. And i want to be able to type a formule, and than i need python to understand that formule :? I have heard from many people that this is extremely hard But is there a …

Member Avatar for JoshuaBurleson
0
154
Member Avatar for huntin4hitters

program takes 2 integers and then finds how many divisors each integer between the original 2 has. then prints out which number has the highest number of divisors. any help is appreciated. im just starting to learn this stuff

Member Avatar for TrustyTony
0
119
Member Avatar for Jburton881

I cant seem to figure this out. I need to write a while loop to output the numbers from 1 to 10, but no matter what I put it will not run. Here is what I have been stuck on: a = 0 while a < 10 : a += …

Member Avatar for JoshuaBurleson
0
168
Member Avatar for g_amanu

if a file that has multiple columns, like [CODE]1 7 3 8 5 6 3 4 5 6 7 8 1 7 6 4 4 3[/CODE] i want to read the first row and see if there numbers that are grater than 6. Then add that number to all the …

Member Avatar for TrustyTony
0
172
Member Avatar for TrustyTony

Learned about hook functions [URL="http://www.daniweb.com/software-development/python/threads/383164/1650339#post1650339"]for a thread[/URL] having problem with bad user input from the documentation. This is result which skips bad inputs.

Member Avatar for TrustyTony
0
950
Member Avatar for M09

Hello everyone I am new programmer ,and i decided learn python and i learned basics in python and i have read book 'Think python' , and other books But now i look to develop my level , and i ask you how can i do that? thank you

Member Avatar for JoshuaBurleson
0
389
Member Avatar for pam1003

Hello! could i ask where there's any error in my code for testing prime numbers? cos i tried testing 21 and 49, and they were tested as prime. thanks! [CODE]import math y = int(raw_input("Please input a number: ")) if y < 2: print "It is not a prime number." elif …

Member Avatar for TrustyTony
0
194
Member Avatar for WhooeyBob

Hi, I am brand new to programming all together and was kind of thrown into a programming class without much help and I have struggled with my homework for this week. I have to create a code to write an ASCII table using Python 2.6 . Here is the actual …

Member Avatar for woooee
0
269
Member Avatar for Aprile79

Hi I am busy working with biological sequences, but I am having some problems to finilize my script Let's say that I want to compare two dna sequences i.e seq1='ATGGAGGCAATGGCGGCCAGCACTTCCCTGCCTGACCCTGGAGACTTTGACCGGAACGTG CCCCGGATCTGTGGGGTGTGTGGAGACCGAGCCACTGGCTTTCACTTCAATGCTATGACC TGTGAAGGCTGCAAAGGCTTCTTCAGGCGAAGCATGAAGCGGAAGGCACTATTCACCTGC CCCTTCAACGGGGACTGCCGCATCACCAAGGACAACCGACGCCACTGCCAGGCCTGCCGG CTCAAACGCTGTGTGGACATCGGCATGATGAAGGAGTTCATTCTGACAGATGAGGAAGTG' seq2='ATGGAGGCAATGGCGGCCAGCACTTCCCTGCCTGACCCTGGAGACTTTGACCGGAATGTG CCCCGGATCTGTGGGGTGTGTGGAGACCGAGCCACTGGCTTTCACTTCAATGCTATGACC TGTGAAGGCTGCAAAGGCTTCTTCAGGCGAAGCATGAAGCGGAAGGCACTATTCACCTGC CCCTTCAATGGGGACTGCCGCATCACCAAGGACAACCGGCGCCACTGCCAGGCCTGCCGG CTCAAACGCTGTGTGGACATCGGCATGATGAAGGAGTTCATCCTGACAGATGAGGAAGTG CAGAGGAAGCGGGAGATGATCCTGAAGCGGAAGGAGGAGGAGGCCTTGAAGGACAGTCTG CGGCCCAAGCTGTCTGAGGAGCAGCAGCGCATCATTGCCATACTGCTGGACGCCCACCAT AAGACCTACGACCCCACCTACTCCGACTTCTGCCAGTTCCGGCCTCCAGTTCGTGTGAAT GATGGTGGAGGGAGCCATCCTTCCAGGCCCAACTCCAGACACACTCCCAGCTTCTCTGGG GACTCCTCCTCCTCCTGCTCAGATCACTGTATCACCTCTTCAGACATGATGGAC---TCG' Thus my aim is to identify …

Member Avatar for TrustyTony
0
140
Member Avatar for jhartley3

Problem 4 – makeScarf(scarf) Let’s knit a scarf! With Python today we are knitting recursively. Your main program should be contained in a recursive function called makeScarf() which takes a string: your scarf that will be printed out in the end. You may use other helper functions as needed, but …

Member Avatar for absdef
0
160
Member Avatar for david_wislon

Hello, I have been looking at using Beautifulsoup python module to make changes to some static html files a total of 167 files, but being a newb in programming was wondering first how to open, read/process the file, then write it, close it and then open the next file thus …

Member Avatar for paxton91
0
705
Member Avatar for Bosterk

hello great community of developers, I have a problem with my code. I am new ... wx.panel want to put () to the main mdi window code. and I would like to know how to open and close a main module is mainly run and then open medi.py nada.py and …

Member Avatar for Bosterk
0
514
Member Avatar for deepmala8

Hi I am using cli parser script to build a user interface, in pythin script i want to use the linux system calls but facing problem. I am calling system("./abc.sh'); please help!!!

Member Avatar for TrustyTony
0
148
Member Avatar for felix001

Im using pexpect to output some terminal commands, but im facing the following issue. The code is [CODE]porttype = "Gi" print expectSw.sendline ("sh int counters errors | i %.*/1 ") % porttype expectSw.expect ('.*#') print expectSw.after[/CODE] But when I run the code i get ... [CODE]Traceback (most recent call last): …

Member Avatar for felix001
0
571
Member Avatar for syjytg

Write an expression whose value is the result of converting the str value associated with s to an int value. I tried typing int('s') in python2.7, and I got an error.

Member Avatar for syjytg
0
744
Member Avatar for TrustyTony

Inspired by password entry discussions, I did this simple entry. You must of course find safe way to store the passwords, for example hashlib ([url]http://stackoverflow.com/questions/4820043/basics-of-python-encryption-w-hashlib-sha1[/url]) or [URL="https://www.dlitz.net/software/pycrypto/"]PyCrypto[/URL] and replace the simplistic example match for real life usage. The print at line 23 is just to check the attempts and to …

Member Avatar for Enalicho
0
10K
Member Avatar for TrustyTony

The [URL="http://pypy.org/"]PyPy [/URL]development team has announced the release of version 1.6 of its "very compliant" Python interpreter with integrated tracing just-in-time (JIT) compiler. According to the developers, the latest update fully implements Python 2.7.1 and brings speed and stability improvements. Code-named "kickass panda", PyPy 1.6 is said to be between …

Member Avatar for dresses623
0
181
Member Avatar for peeta

hello friends i just start learning Python and i am going through book "how to think like a computer scientist", in forth chapter it start using "GASP" which needs to be installed and book totally ignored the need of a newbies regarding installation. so after some mucking around i did …

Member Avatar for rlayne2
0
694

The End.