Re: curses and refreshing problem

2008-12-14 Thread Karlo Lozovina
assumed wget uses curses for the progress bar, so the carriage return didn't even cross my mind ;). -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia

curses and refreshing problem

2008-12-13 Thread Karlo Lozovina
this with curses? Thanks... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman

Bind compiled code to name?

2008-06-22 Thread Karlo Lozovina
trying to do. I want to emulate this: import some_module as some_name but with my code in `some_module` string, and not in file. Thanks... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163

Re: Bind compiled code to name?

2008-06-22 Thread Karlo Lozovina
some_name as a attribute, instead as a dictionary: some_name = d.some_name ? Thanks... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata

Can this be done with list comprehension?

2008-06-07 Thread Karlo Lozovina
;). -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

Re: Can this be done with list comprehension?

2008-06-07 Thread Karlo Lozovina
? -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning to 'try' block after catching an exception

2008-05-22 Thread Karlo Lozovina
. -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning to 'try' block after catching an exception

2008-05-22 Thread Karlo Lozovina
... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

Returning to 'try' block after catching an exception

2008-05-21 Thread Karlo Lozovina
() exception SomeExcpetion gets risen. Then, in except block I do something to fix whatever is causing the exception and then I would like to go back to try block, and execute some_function() again. Is that doable? Thanks. -- ___Karlo Lozovina - Mosor

Re: Returning to 'try' block after catching an exception

2008-05-21 Thread Karlo Lozovina
more elegant and Pythonic ;). -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org

Returning values from function to Python shell/IPython

2008-03-09 Thread Karlo Lozovina
. -- Karlo Lozovina -- Mosor -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning values from function to Python shell/IPython

2008-03-09 Thread Karlo Lozovina
, thanks for your answer ;). -- Karlo Lozovina -- Mosor -- http://mail.python.org/mailman/listinfo/python-list

Order of evaluation in conditionals

2008-02-25 Thread Karlo Lozovina
I'm curious about this ;). Thanks... -- Karlo Lozovina -- Mosor -- http://mail.python.org/mailman/listinfo/python-list

Re: Order of evaluation in conditionals

2008-02-25 Thread Karlo Lozovina
and y' first evaluates x; if x is false, its value is returned; otherwise, y is evaluated and the resulting value is returned. Thanks (to both of you :), that's it. -- Karlo Lozovina -- Mosor -- http://mail.python.org/mailman/listinfo/python-list

Re: Graphical Engine

2007-11-09 Thread Karlo Lozovina
, but then again I'm probably missing something. http://www.ogre3d.org/wiki/index.php/PyOgre -- Karlo Lozovina -- Mosor -- http://mail.python.org/mailman/listinfo/python-list

Keeping track of subclasses and instances?

2007-10-10 Thread Karlo Lozovina
Hi, what's the best way to keep track of user-made subclasses, and instances of those subclasses? I just need a pointer in a right direction... thanks. -- Karlo Lozovina -- Mosor -- http://mail.python.org/mailman/listinfo/python-list

Re: Keeping track of subclasses and instances?

2007-10-10 Thread Karlo Lozovina
to keep track of subclasses and their instances, without the need for user interaction (appending them to a list, or adding to dictionary)? Thanks, -- Karlo Lozovina - Mosor -- http://mail.python.org/mailman/listinfo/python-list

Dynamically creating class properties

2007-10-04 Thread Karlo Lozovina
long list of attributes? I just started working with them, and it's driving me nuts :). Thanks for the help, best regards. -- Karlo Lozovina -- Mosor -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic question

2007-05-12 Thread Karlo Lozovina
Cesar G. Miguel wrote: for j in range(10): print j if(True): j=j+2 print 'interno',j What happens is that j=j+2 inside IF does not change the loop counter (j) as it would in C or Java, for example. Am I missing something? If you want that kind of behaviour then use a

Re: Dynamic subclassing ?

2007-05-12 Thread Karlo Lozovina
manatlan wrote: I can't find the trick, but i'm pretty sure it's possible in an easy way. It's somewhat easy, boot looks ugly to me. Maybe someone has a more elegant solution: In [6]: import new In [13]: class Button: : def buttonFunc(self): : pass In [14]:

Re: Basic question

2007-05-12 Thread Karlo Lozovina
Cesar G. Miguel wrote: - L = [] file = ['5,1378,1,9', '2,1,4,5'] str='' for item in file: j=0 while(jlen(item)): while(item[j] != ','): str+=item[j] j=j+1 if(j= len(item)): break if(str != ''):

Re: How to copy a ClassObject?

2007-03-21 Thread Karlo Lozovina
their names, or base class(es). So I figured I'd just copy the base class and modify the attributes. Instead, this way of subclassing seems to work just right for my purposes. -- ___Karlo Lozovina - Mosor | | |.-.-. web: http

How to copy a ClassObject?

2007-03-20 Thread Karlo Lozovina
copy.copy and copy.deepcopy, but that doesn't work. P.S. Yes, I can do a: class tmp(First): pass but I'd rather make a copy than a subclass. Thanks. -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ

Re: How to copy a ClassObject?

2007-03-20 Thread Karlo Lozovina
Karlo Lozovina [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: how would one make a copy of a class object? Let's say I have: class First: name = 'First' And then I write: tmp = First Silly me, posted a question without Googling first ;. This seems to be the answer to my

Tip: 'Open IPython here' in Windows context menu

2007-02-26 Thread Karlo Lozovina
... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

Re: What is more efficient?

2007-02-19 Thread Karlo Lozovina
Gabriel Genellina [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: It doesn't matter whether you have 0 or a million instances, methods do not occupy more memory. That's what I was looking for! Thanks, to you and all the others. -- ___Karlo

What is more efficient?

2007-02-18 Thread Karlo Lozovina
matter? Thanks... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo

SQLAlchemy, py2exe and Python 2.5 problem?

2006-12-18 Thread Karlo Lozovina
, or py2exe? Thanks in advance... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http

Re: wing ide vs. komodo?

2006-11-05 Thread Karlo Lozovina
of the structures via Stack Data, and you can play with those structures using Debug Probe. Huge productivity boost... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163

Forum written in Python?

2006-11-02 Thread Karlo Lozovina
projects out there, I wouldn't mind contributing. So far I found out about Pocoo, but it seems to immature right now, I was looking for something comparable to PhpBB or IPB? -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net

SQLAlchemy and py2exe

2006-10-20 Thread Karlo Lozovina
... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

MP3 files and Python...

2006-10-10 Thread Karlo Lozovina
I'm looking for a Python lib which can read and _write_ ID3v1 and ID3v2 tags, and as well read as much as possible data from MP3 file (size, bitrate, samplerate, etc...). MP3 reproduction is of no importance... -- ___Karlo Lozovina - Mosor

Re: print without newline halts program execution

2006-04-15 Thread Karlo Lozovina
:). -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

Why aren't these more popular (Myghty Pylons)?

2006-04-15 Thread Karlo Lozovina
... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

print without newline halts program execution

2006-04-13 Thread Karlo Lozovina
with them. Using sys.stdout.write() produces the same behavior, so what can I do? Thanks a lot in advance. -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi

Why optparse wont import?

2006-01-20 Thread Karlo Lozovina
, line 1, in ? from optparse import OptionParser ImportError: cannot import name OptionParser When I try to do that from Python prompt everything works fine. What's the problem? -- ___Karlo Lozovina - Mosor | | |.-.-. web: http

Re: Why optparse wont import?

2006-01-20 Thread Karlo Lozovina
Jorge Godoy [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Rename your file to something other than optparse.py... Oh my :(... I'm so ashamed :). -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ

Re: What's wrong with this code snippet?

2006-01-05 Thread Karlo Lozovina
. -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list

What's wrong with this code snippet?

2006-01-04 Thread Karlo Lozovina
) --- If I remove GenerateRandomColour from class definition, and put it as a separate function, everything works fine. I've been staring at this code for half an hour and can't find what's wrong :(. Any help greatly appriciated :). -- ___Karlo

Re: What's wrong with this code snippet?

2006-01-04 Thread Karlo Lozovina
Gerard Flanagan [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Class methods must have at least the 'self' argument. So Argh! :) Thanks guys! -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ

Re: What's wrong with this code snippet?

2006-01-04 Thread Karlo Lozovina
didn't dig much into random module. Anyway, thanks for pointing this out, appreciated. -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum

Work with Windows workgroups under Python?

2006-01-02 Thread Karlo Lozovina
Pythonic way? Thanks... -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman

Flat file, Python accessible database?

2005-11-01 Thread Karlo Lozovina
, and I'm using Python under Cygwin. Ofcourse, ease of use and simplicity is most welcomed :). I'm currently playing around SQLite+PySQLite and BerkeleyDB, but those two seem like an overkill :(. Thanks in advance... -- ___Karlo Lozovina - Mosor

Re: Flat file, Python accessible database?

2005-11-01 Thread Karlo Lozovina
:). -- ___Karlo Lozovina - Mosor | | |.-.-. web: http://www.mosor.net || ICQ#: 10667163 | || _ | _ | Parce mihi domine quia Dalmata sum. |__|_|__||_|_| -- http://mail.python.org/mailman/listinfo/python-list