Re: Bored.

2009-12-03 Thread Ognjen Bezanov
Anssi Saari wrote: Necronymouse writes: Hello, I am learning python for about 2 years and I am bored. Not with python but I have a little problem, when i want to write something I realise that somebody had alredy written it! So i don´t want to make a copy of something but i wanna get better in

Re: Is it possible to get the Physical memory address of a variable in python?

2009-11-10 Thread Ognjen Bezanov
Hey, Thanks for all the responses guys. In hindsight I probably should have explained why on earth I'd need the physical address from an interpreted language. I'm trying to see if there is any way I can make Python share data between two hosts using DMA transfers over a firewire connection,

Is it possible to get the Physical memory address of a variable in python?

2009-11-09 Thread Ognjen Bezanov
Hello all, Say I have a python variable: a = "hello" Is it possible for me to get the physical address of that variable (i.e. where it is in RAM)? I know that id(a) will give me it's memory address, but the address given does not seem to correlate with the physical memory. Is this even pos

Re: Implementing my own Python interpreter

2008-10-13 Thread Ognjen Bezanov
Grant Edwards wrote: On 2008-10-13, Ognjen Bezanov <[EMAIL PROTECTED]> wrote: I am a third year computer science student and I'm the process of selection for my final year project. One option that was thought up was the idea of implement my own version of the python interpreter (I&

Implementing my own Python interpreter

2008-10-13 Thread Ognjen Bezanov
Hello All, I am a third year computer science student and I'm the process of selection for my final year project. One option that was thought up was the idea of implement my own version of the python interpreter (I'm referring to CPython here). Either as a process running on another OS or as a p

Is there a web-editor I can use with Python?

2008-06-13 Thread Ognjen Bezanov
Hello Everyone! I am building an application using WxWidgets, and its job is to manage HTML data in a database. Now I need essentially a HTML editor that I can embed into my program, that will parse the HTML and allow the user to edit it. Many of these 'WYSIWYG' HTML editors exist for other lang

Re: Changing the names of python keywords

2007-06-22 Thread Ognjen Bezanov
[EMAIL PROTECTED] escribió: > Hello again, > > Thanks for everything previously, I was change the grammar and Lib/ > keyword.py, now > Python recognize "koristiti" as a keyword, but that is not enough: > > when I write in my python shell: > koristiti os # "koristiti" get

Making static dicts?

2007-06-18 Thread Ognjen Bezanov
Hello! Just to ask, is it possible to make a static dictionary in python. So that the keys in the dictionary cannot be removed, changed or new ones added, but the value pairs can. Is this possible with python? thanks, Ognjen. -- http://mail.python.org/mailman/listinfo/python-list

Help controlling CDROM from python

2007-03-10 Thread Ognjen Bezanov
Hello, I am trying to control a CD-ROM drive using python. The code I use is shown below. > import CDROM > from fcntl import ioctl > import os > > > class Device: > > CDdevice="" > CDfd = None > > def __init__(self,name): > self.CDdevice = name#we get

Using External Libraries with python?

2007-01-04 Thread Ognjen Bezanov
Hello, I have some external C libraries I would like to use with python. I have been searching on the internet and found many such modules/bindings for libraries (e.g. Py-Lame) but have not yet come across any information of how to actually go about creating such bindings, so I was wondering if a

Re: Converting String to int

2006-05-14 Thread Ognjen Bezanov
Hi all, Another problem, with the same error (error: "invalid literal for int()") code: mynums = "423.523.674.324.342.122.943.421.762.158.830" mynumArray = string.split(mynums,".") x = 0 for nums in mynumArray: if nums.isalnum() == true: x = x + int(nums) else: print "Err

Converting hex to char help

2006-05-14 Thread Ognjen Bezanov
Hi all, I am trying to convert a hexdecimal value to a char using this code: print ' %c ' % int(0x62) this works fine, but if I want to do this: number = "62" print ' %c ' % int("0x" + number) I get an error: Traceback (most recent call last): File "",line 1, in ? ValueError: invalid literal

Re: If - Or statements

2005-06-04 Thread Ognjen Bezanov
Robert Kern wrote: > Ognjen Bezanov wrote: > >> Robert Kern wrote: >> >> >>> Ognjen Bezanov wrote: >>> >>> >>>> Another newbie-ish question. >>>> >>>> I want to create an if statement which will c

Re: If - Or statements

2005-06-04 Thread Ognjen Bezanov
Robert Kern wrote: > Ognjen Bezanov wrote: > >> Another newbie-ish question. >> >> I want to create an if statement which will check if a particular >> variable matches one of the statements, and willl execute the statement >> if the variable matches any of th

If - Or statements

2005-06-04 Thread Ognjen Bezanov
Another newbie-ish question. I want to create an if statement which will check if a particular variable matches one of the statements, and willl execute the statement if the variable matches any of the statements. I have tried the following (the pass is just used for testing) if ext[1] == "mp3"

Formatting Time

2005-06-03 Thread Ognjen Bezanov
I never thought id need help with such a thing as time formatting (admittadly i never did it before) but ok, i guess there is a first for everything. I have a float variable representing seconds, and i want to format it like this: 0:00:00 (h:mm:ss) Now search as I might i am finding this quite

Formatting Time

2005-06-03 Thread Ognjen Bezanov
I never thought id need help with such a thing as time formatting (admittadly i never did it before) but ok, i guess there is a first for everything. I have a float variable representing seconds, and i want to format it like this: 0:00:00 (h:mm:ss) Now search as I might i am finding this quite

Formatting Time

2005-06-02 Thread Ognjen Bezanov
I never thought id need help with such a thing as time formatting (admittadly i never did it before) but ok, i guess there is a first for everything. I have a float variable representing seconds, and i want to format it like this: 0:00:00 (h:mm:ss) Now search as I might i am finding this quite

Help with Queues and Threading

2005-06-01 Thread Ognjen Bezanov
Hi, all Thanks all of you who helped me with the threading and queues issue. I am trying to get it working but I am having problems. When I try to run the following: cmddata = mediaplay.initcommandqueue() #initiates the Queue to send commands down mediathread = threading.Thread( target=mediapl

Re: How to run functions in the background?

2005-05-30 Thread Ognjen Bezanov
Terry Reedy wrote: >"Ognjen Bezanov" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > > >>I need to find a way to 'fork' a function into the background yet still >>be able to send commands to it. >> >> > >

How to run functions in the background?

2005-05-30 Thread Ognjen Bezanov
Hello I need to find a way to 'fork' a function into the background yet still be able to send commands to it. I am writing a media player, and I have a function which plays the media. I want to be able to run this function but to (at the same time) be able to send commands from it (e.g. pause, p