15,181 Topics

Member Avatar for
Member Avatar for VelcroMan

I'm trying to use the BlueSoleil SDK with Python. To do this i use ctypes to call the BlueSoleil DLL. Here is the code: [code=python] import ctypes print ctypes.cdll.BsSDK.Btsdk_Init() print ctypes.cdll.BsSDK.Btsdk_StartBluetooth() print ctypes.cdll.BsSDK.Btsdk_StartDeviceDiscovery(0,0,0) ## print ctypes.cdll.BsSDK.Btsdk_GetInquiredDevices(None,None) [/code] The last call should return the number of active BT devices around, which …

0
69
Member Avatar for L_E_G_I_O_N

Hello. I am a relatively new python programmer, but I know my way around the language. I have decided to do some work with PyOpenGL -- I just finished a game that had to be in XNA, now I have a bit more free reign and I prefer to do …

Member Avatar for s_jmp
0
253
Member Avatar for edholden

Hi. I'm having a little difficulty understanding character sets in Python. Basically I'm trying to write a function that will substitute a non-ASCII character with a similar ASCII equivalent. So if given a string like 'ÂBÇD', the function would iterate through the string object, replacing select characters to return a …

Member Avatar for edholden
0
255
Member Avatar for cheechand

Hello, I am trying to split a word into an array For example, "airplane" becomes ['a','i','r','p','l','a','n','e'] Any suggestions?

Member Avatar for lllllIllIlllI
0
69
Member Avatar for Lardmeister

I have started to use the PyScripter IDE and really like the many features it has. However, everytime I make an error in the code, and as a beginner I make a lot of errors, it rather ungraciously exits. There must be something wrong in my settings?

Member Avatar for sneekula
0
127
Member Avatar for cheechand

I am trying to compare a list of words to a dictionary to see if there are any matches. How do I do this, as diction.has_key() does not work for lists?

Member Avatar for woooee
0
110
Member Avatar for simionpetrus

can anybody help me build a function to replace certain language specific characters in a file? for example, i want to replace Ș with &#350, so it will be published correctly in a web page.

Member Avatar for woooee
0
43
Member Avatar for smartdog

Heloo, i have just encountered a problem in comiling a module of a program made by python and um not experienced in it, where should i run the module, in the command prompt of windows or in the shell, i dunno wheather i post this thread in the right place, …

Member Avatar for Fuse
0
200
Member Avatar for Trenholmes

First thanks for taking the time to review my issue. I've been banging my head against a wall the last 24 hours. What I want to do is have a list of labels bound to a list of particular events. I want to be able B1-Motion from one label to …

0
43
Member Avatar for spoksss

Hello, I have a problem with calling a staticmethod from another staticmethod when I try use dictionary {} to handle. My code is very basic, but in the future I will add many other static method: [CODE] # -*- coding: utf-8 -*- import sys class DateFormat(): """Class to format and …

Member Avatar for bvdet
0
127
Member Avatar for TheOneElectroni

Hi everyone, I'm new in this forum. By the way it's not longtime since I started learning python. After a couple o months of studying and tutorialing I'm now nearly finished with my first application. I've used Tkinter as GUI and there's one thing that's making me nervous: I want …

Member Avatar for TheOneElectroni
0
3K
Member Avatar for parmenio79

Hi All, Beginner programmer here with an easy question I hope. I want to be able to compare the value of the first item in a list to the second item in the list to see if they are sequential. so in this list: numblist = [1 , 2 , …

Member Avatar for parmenio79
0
27K
Member Avatar for theOneCalledJef

I am working on making my own chat server and client, but have reached a little hiccup. The first line of text that the client send is not displayed by the server. Everything else is, just not the first line. Client [code=python] import socket uname = raw_input('username:> ') uname = …

Member Avatar for tac
0
160
Member Avatar for preyan

Am trying out the eric ide for python Am not sure how to enable the "." function in the editor i.e when i do >>> import os >>> os. It must list me the contents that can be used against the os module I tried the autocomplete calluptips nothing worked …

Member Avatar for preyan
0
91
Member Avatar for HowardR

Let me preface this by saying that I am not very skilled with computers. With that said... I have written a fairly simple python script that accesses a webpage and downloads some text before writing it to an outside .txt file. The webpage is constantly changing and I would like …

Member Avatar for eibwen
0
79
Member Avatar for atsuko

Hi all, I am trying to write float numbers in a file. But it gave me an error "argument 1 must be string or read only character not float" then i change it to xyz = 0.9878 text = f.write(str(xyz)) now the error is .. 'str' object is not callable" …

Member Avatar for atsuko
0
156
Member Avatar for linux

Is there any way for someone to, using PyGame or SDL, to do, say: [code]00000000 01222100 01112110 01112110 01111110 00000000[/code] And have it display the 0's as a water tile (10x10), the 1's as a grass tile (10x10), and the 2's as a rock tile (10x10)? As to make maps …

Member Avatar for linux
0
139
Member Avatar for ms_melagiri

Hi all, I'm trying to run 'svn update' on a given directory as a subprocess in python. I need to redirect the output of this process (svn update) to a file called updste.txt. And if 'svn update' fails, I'm trying to send out a mail to myself with the file …

Member Avatar for woooee
0
495
Member Avatar for jesouhaite08

I created an exe of my application. When I click on it on my computer, it already has built in for it launch the server and open the site, and it works. When I put it on a drive where other computers in the office I work in can use …

0
51
Member Avatar for elhallouf

hey all. I am trying to assign unique IDs to a list of strings I get from a file Let's say my list (list.txt) is: [CODE] Shoes from Italy 1 Shirts made in Japan Shoes from Italy 2 Shirts made in France Boots made in United Kingdom Socks [/CODE] I …

Member Avatar for slate
0
244
Member Avatar for inkcoder

Hello Everyone! I am new to Python, this is my second project. I am trying to make a program that will take a users input and then output the words into the format where A = 1, B = 2, C =3 ... and so on. I want to start …

Member Avatar for a1eio
0
139
Member Avatar for dinilkarun

How can I read data present in a large XML file into a list using SAX parser?. I want to transfer the data into tables created in MS Access. Please help. Regards, Dinil

0
53
Member Avatar for elhallouf

Hey you all I am starting with python (more familiar with shell in general) I am trying to write a script that replaces a column in a text file with numbers (or IDs) from an other file. Let me rephrase it : I have 2 files: ITEMS.txt and IDs.txt Items.txt: …

Member Avatar for elhallouf
0
158
Member Avatar for Py-er

hi, i want to know how can calculate width value of text for example: (text:'help me', font:'Tahoma 25') i want to calculate the full width value of the text so help me please to find a way to do that or with Tkinter lib or with any lib.

Member Avatar for Py-er
0
116
Member Avatar for bikehike90

I am relatively new to python. I am calling a a function from another script (imported) from the python shell. However, when I call a variable created in that function (after calling it) the variable hasn't been defined. I thought it was a global issue so I made the variable …

Member Avatar for bikehike90
0
89
Member Avatar for lllllIllIlllI

Hi Using a template from the tutorial Fuse offered i made this program: [code=python] import wx import os WINDOW_WIDTH = 700 WINDOW_HEIGHT = 600 class MainFrame(wx.Frame,object): def __init__(self): wx.Frame.__init__(self,None, title = "Paul's Text Editor", pos = (200,75), size = (WINDOW_WIDTH,WINDOW_HEIGHT)) self.menubar = wx.MenuBar() self.menufile = wx.Menu() self.menuinfo = wx.Menu() self.SetMenuBar(self.menubar) …

Member Avatar for lllllIllIlllI
0
636
Member Avatar for jesouhaite08

I created a program and when I click on it, it launches the server and runs at [url]http://127.0.0.1:8000[/url] This is my code for it: pyweb.py: [ICODE]import os, sys sys.path += [r'c:\dev\incidents'] os.environ['DJANGO_SETTINGS_MODULE'] = 'incidents.settings' from django.core.management import call_command from threading import Thread t = Thread(target=call_command, args=('runserver',), kwargs={'shutdown_message':"done", 'use_reloader':False}) t.start() import …

0
52
Member Avatar for Patrick1991

Hello! I'm new in this forum and i have some problems in school. I'm from Germany and my teacher gave me the task to install a dart game in Python. Now i have not much time left. So i want you to ask if you could maybe help me with …

Member Avatar for Patrick1991
0
115
Member Avatar for ronnix

Hi, It is possible to get values from thread , while thread is executing , but not yet complete? if it is possible then how can I realise it in python? with hope to solution

Member Avatar for BearofNH
0
87
Member Avatar for elhallouf

hey all I am trying to write a pogram with arguments and options I want to call it this way: [CODE] python myScript.py -c -f 'C:/Temp/my_file.txt' [/CODE] OR [CODE] python myScript.py -u -f 'C:/Temp/my_file.txt' [/CODE] where [-f filename] is mandatory and exactly one of -c or -u should be there …

Member Avatar for woooee
0
81

The End.