me.sleep(1)
> sys.stdout.write("\nFinised!\n")
Thanks, that's it! I just assumed wget uses curses for the progress bar,
so the carriage return didn't even cross my mind ;).
--
___Karlo Lozovina - Mosor
| | |.-.-.
this with
curses?
Thanks...
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.o
" syntax.
One more thing though, is there a way to access "some_name" as a
attribute, instead as a dictionary:
some_name = d.some_name
?
Thanks...
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || IC
t clear, this is what I'm 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://w
_list]
Are there any other alternatives to this approach?
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
as to be done in one line ;).
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
ch, I think I'll use something like that for avoding
infinite loops. Thanks a lot...
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
doing this kind of try-except loop.
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
Sure, that works, but I was aiming for something more elegant and Pythonic
;).
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata
r executing some_function()
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.
--
___
me, so I
was wondering if there was an alternative...
Anyway, thanks for your answer ;).
--
Karlo Lozovina -- Mosor
--
http://mail.python.org/mailman/listinfo/python-list
cts available in the interpreter.
--
Karlo Lozovina -- Mosor
--
http://mail.python.org/mailman/listinfo/python-list
> The expression 'x 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
ious about this ;).
Thanks...
--
Karlo Lozovina -- Mosor
--
http://mail.python.org/mailman/listinfo/python-list
results, 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
, my question is how 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
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
int a.getitem1
Any idea how to do that with metaclasses and arbitrary 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
Cesar G. Miguel wrote:
> -
> L = []
> file = ['5,1378,1,9', '2,1,4,5']
> str=''
> for item in file:
>j=0
>while(j while(item[j] != ','):
> str+=item[j]
> j=j+1
>if(j>= len(item)): break
>
> if(str != ''):
>L
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]: cla
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
ple, it was the first thing to come to mind.
The idea behind all of this was to create classes dynamicaly, without
knowing in advance 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
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
x27;tmp' a copy
of First, I tried using 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
|
place tcmd.exe path, with cmd.exes'.
Hope this will be usefull to someone...
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
hanks, to you and all the others.
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
esn't matter?
Thanks...
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailma
t has no attribute 'getLogger'
Does anyone have a clue why this happens? And what is responsible for
this? SQLAlchemy, or py2exe?
Thanks in advance...
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
ur code end then you can
inspect all 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.mos
e are
existing 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:
e other packages?
Thanks guys...
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
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 -
m people (if there are such) using it in real world
applications...
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
emical purposes, what are those other ways to do it?
I'm curious :).
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
it to
print parts as it's finished 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
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.mo
\source\python\population\optparse.py", 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
|
anyway, thank
you.
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
ome "random" choices to be made, so I didn't dig much into
random module. Anyway, thanks for pointing this out, appreciated.
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| ||
"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
rror: GenerateRandomColour() takes no arguments (1 given)
---
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 appriciat
less Pythonic way?
Thanks...
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/ma
files, so this will speed me up :).
--
___ Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_|_|
--
http://mail.python.org/mailman/listinfo/python-list
e. Oh, 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 L
44 matches
Mail list logo