15,190 Topics

Member Avatar for
Member Avatar for helios0684

Hey guys, first time poster, relatively long time reader -- I am struggling creating a buffer class in python for my class. (relatively new to the language). Here is the basic idea I want to do: Implement a class that buffers text. The write() method adds a string to the …

Member Avatar for helios0684
0
3K
Member Avatar for PhrackSipsin

Hello All, I'm pretty new to python but have been programming, for a few years hobby wise and decided to try python after I found how concise the syntax was and with a computer science bent. So I'm writing a little code for a work related thing, simulating some basic …

Member Avatar for woooee
0
168
Member Avatar for wtzolt

Hi, I've made a small program which has 2 buttons and each does certain thing. Here's a simplified version of the code. Thing is it works fine except that the button freezes and stays in a clicked position and whole GUI freezes until the command is completed. As far as …

Member Avatar for jcao219
0
141
Member Avatar for ultimatebuster

Is it possible to limit a certain variable to only certain type? For example, i have a class named AccurateStr. How can I make sure that the variable "as" is an instance of AccurateStr? Similarly, how can I make sure a variable is a positive int, str etc without the …

Member Avatar for ultimatebuster
0
563
Member Avatar for vineshn

hi, I am new to python :). I am having a file say "test.c" test.c file contains test1 test2 test3 test4 and my output should be write in a file as newtest.c... -h test1 -e temp -x temp2 -o temp3 -h test2 -e temp -x temp2 -o temp3 -h test3 …

Member Avatar for vineshn
-1
133
Member Avatar for leviaeon

i am having an error with this simple bluetooth console it has error that says: NameError: name 'sys' is not defined call') here is the code sorry i am a noob in python i am trying different samples for me to learn hope somebody will enlighten me: [code=python] import socket …

Member Avatar for leviaeon
-1
118
Member Avatar for Sync.Void

Hello all, I normally lurk around and solve most of my issues by reading other threads. I have run into an issue and I am trying to figure out what I am missing. I am rather new at this so thanks for any advice. What I am attempting to due …

Member Avatar for Sync.Void
0
172
Member Avatar for leviaeon

i have a problem... i am new to python... and i have found a program that reads an sms directly from the phone's inbox... i am using nokia 6600... i just want to ask how will i be able to copy the sms file to a string? here is the …

Member Avatar for leviaeon
0
102
Member Avatar for jcao219

Most people would do something like this: [icode]input("Press any key to continue") #or raw_input[/icode] This way, if the user presses a key other than the Enter (return) key, then the program will still continue. It looks something like this: [URL="http://i42.tinypic.com/2yvp9hj.png"]http://i42.tinypic.com/2yvp9hj.png[/URL]

0
217
Member Avatar for Tops

US --9--15--13--37 GE --10 --13--7--30 CA-- 14 -- 7 -- 5-- 26 (those dashes are meant to be spaces) How do i remove the first column of the text above so the output would look something like this? 9--15 --13 --37 10 --13--7--30 14 --7-- 5--26

Member Avatar for TrustyTony
0
2K
Member Avatar for klebron23

Hello, I have a question pertaining to Python. I have been using the online book "How To Think Like A Computer Scientist" and have been doing the questions at the end of the chapters. I cannot figure out how to modify "num_digits" so that it works as expected.I have tried …

Member Avatar for woooee
0
201
Member Avatar for thompsonSensibl

Hi folks, ThompsonSensibl, so I'm new to Python. This is probably a noob question... I want to convert a String input to an Integer. I usually do it like this: number = int(someString). However this time this approach doesn't seem to be efficient at all. So far I have: [CODE] …

Member Avatar for megaflo
0
8K
Member Avatar for wtzolt

Question regarding compiling *.py script. Everything works fine when I compile the script except that there is no "theme". It looks like it's using win 98 skin or something. Looks very bad. Would like to know how to preserve [COLOR="Green"][I]gtk-theme-name = MS-Windows" [/I][/COLOR]. Which packages or modules should I include …

Member Avatar for wtzolt
0
119
Member Avatar for LabPsycho

Please can u read two list of numbers into an array and merge sort them in an ascending order into 1dimensional array

Member Avatar for jlm699
0
81
Member Avatar for qq263020776

now i have a finished template which wrote by j2ee,like this: <#list dailyStarList as dailyS> <li <#if (dailyS_index % 2) == 0>class="list_color_w"<#else>class="list_color"</#if>><h2><#list chatAvatarList as cal> <#if dailyS.avatarid == cal.id> ${(cal.name[0..1])!''}之星 <#break> </#if> </#list></h2><h3><#if (dailyMemberList)??> <#list dailyMemberList as dm> <#if dailyS.idx == dm.idx> ${(dm.myname)!''} <#break> </#if> </#list> </#if></h3><h4>${(dailyS.dailyNum)?c!''}</h4></li> </#list> And Now …

0
48
Member Avatar for sebcbien

Hello everybody I'm currently working on a project for visualizing spectrum acquisition. I actually am unable to stretch the axes. The result is a poor representation: [URL="http://farm3.static.flickr.com/2763/4505197080_b308ec603b_o.png"]http://farm3.static.flickr.com/2763/4505197080_b308ec603b_o.png[/URL] The time axis is not expanded as I'd like to which make a slim 3D representation. This is my code used to draw …

0
61
Member Avatar for zolakt

Hi, I'm having a lot of problem making a SAOP client in Python. I have tried various methods, but non of them seems to work for me. I have a .Net web service, available from an IIS server on another machine. I can access it trough browser, and everything works …

0
99
Member Avatar for n.utiu

I have been recently experimenting with Python embedding, but I stumbled across some problems. [CODE]#include <python3.1/Python.h> int main (void) { Py_Initialize (); PyRun_SimpleString("print (\"Hello World\")"); Py_Finalize (); return 0; } [/CODE] As you see it is not the most complicated code :). I have compiled in Code::Blocks using g++. I …

Member Avatar for n.utiu
0
722
Member Avatar for Roberto9

so what i have is a list of lists each individual list is a list of cards cards1 = [AS, 10H, 3D, ...ect.] cards2 = [4H, KS, 6S, 9D,....ect] ColumnList = [cards1, cards2, cards3...etc] It should print out a spider solitare tableau, but as you play the game, this columns …

Member Avatar for TrustyTony
0
235
Member Avatar for TomD22

Hey, I am trying to use Tkinter to provide a gui to a simple python script. No matter what I try, my tkinter window always ends up maximised, filling the entire screen. Specifying the height and width has no effect. I have tried a simple label, and tried putting the …

Member Avatar for SgtMe
0
571
Member Avatar for jpob

Hey, i am new to python. I am making a translator in python 2.6 using basic commands. The translator is english to german. I need to use a i need to use a text file like this... at an brown braun cat raze etc. so far i have created lists …

Member Avatar for jpob
0
260
Member Avatar for SoulMazer

Hi, I'm writing a GUI app with wxPython and I am wondering how I would insert and read/parse accented letters (Spanish accents, for that matter) from a TextCtrl widget. Also, I would like this would be compatible with all platforms (Windows, Linux, etc.). How could I do this? Thanks very …

0
76
Member Avatar for dilbert_here00

Hi All, Is there any python module which provides the capability to connect & configure WiFi on Microsoft Windows? Thanks

Member Avatar for jcao219
0
87
Member Avatar for vsagarmb

I have a funny problem. I am trying to split a string. [code=python] DEVICE_IP = '164.178.7.30' ip = DEVICE_IP.spilt('.') print ip[0]+'-'+ip[1]+'-'+ip[2]+'-'+ip[3] [/code] The above code throws the error [code] Traceback (most recent call last): File "/home/englotk/test", line 2, in <module> ip = str(DEVICE_IP).spilt('.') AttributeError: 'str' object has no attribute 'spilt' …

Member Avatar for jice
0
2K
Member Avatar for cairnsww

OK so i have written my fun Crossword assistant for Linux - I use Glade and it works like a dream. Well nearly ... I also have Gramps working well under Linux and would like to help my Windows friends use it too. But I want to port it to …

0
112
Member Avatar for norrisp90

Hi, I've been trying to write a Python client to access a SOAP webservice through our companys authenticated proxy server using the SUDS lib. The proxy uses basic username:password authentication not NTLM and I have been able to get basic downloads working through it using URLLIB2 like this: [CODE]passmanager = …

0
97
Member Avatar for elmaami

Hi all I want a help from you about how to make web server and client ,send and receive data over network securely by using encryption algorithms like DES,3DES and hash techniques. I want the encryption to use a shared secret key which is valid for one session.This is generated …

0
35
Member Avatar for d.devendran

hi expert, i got data when execute the python, then i have send it to the server, how this can be done, i.e I got wireless ssid, so i need to send as follow http://22.42.13.58:8080/ProcessData?ssid="guest" how this can be done i found snippet as follow import urllib import urllib2 #PROXY …

0
83
Member Avatar for ab_too

HEIP!! I want get ip address and mac address on router use OID and module pysnmpwalk example ip address mac 172.14.4.233 0:b:86:cb:f3:b5 172.14.4.250 0:22:57:81:9f:81 172.14.4.251 0:22:57:bb:b7:41 172.14.4.252 0:24:73:18:ca:81 203.158.207.99 0:1a:64:79:22:c0 203.158.207.100 0:1a:64:96:24:b4 203.158.207.104 0:21:5e:54:80:70 203.158.207.105 0:21:5e:73:8b:f0 203.158.207.106 0:21:5e:73:8a:26 192.168.214.50 0:1a:c1:d8:bb:81 Please post sample code

-1
51
Member Avatar for lmnopt

Hi guys, I have recently decided to start doing some work using PyQt, I've been told its pretty good, however I hit a bit of a block when I installed Python 2.6 and PyQt4 only to find that every time I try to run any code that uses any PyQt …

Member Avatar for lmnopt
0
1K

The End.