wxpython + ogl

2005-08-30 Thread Andrzej
Hi!

I'm writing a simple digital circuit simulator in order to familirise with 
(wx)python. I thought it would be an easy task with help from ogl lib. After 
a not so brief encounter with wx specs I've started to code but I just can't 
figure out how to get user-defined attachment points to work. I've tried to 
call SetAttachmentMode(True) for shapes that should be connected and then:

dc = wx.ClientDC(self.canvas)  # ->self.canvas = ogl.ShapeCanvas(self)
self.canvas.PrepareDC(dc)
shape1.MoveLineToNewAttachment(dc, line, x1, y1)

But the line pops up in random place and is changing it's position only 
vertically when moving one of the shapes. I'm probably doing something 
terribly wrong and I'd appreciate any help to solve my little problem . 
Thanks in advance

Andrzej


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Holding until next value change

2016-08-20 Thread andrzej . brozi
Hello

Perhaps this would suffice:

prev = None
for value in main_call():
if value==prev:
pass
else:
prev = value
if prev>0:
print('+v')
elif prev<0:
print('-v')
else:
print('0')

Of course this will work only if subsequent values are exactly the same.
If not - then "value==prev" should be replaced by some other test (for sign or 
for proximity).

Regards
Andrzej Brozi
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [oi-dev] DTrace probes in Python 2.7 (and next 3.3)

2011-11-24 Thread Andrzej Szeszo

Hi Jesus

Just noticed that there is a python 2.7 package in Oracle's userland 
repo here:


<http://hg.openindiana.org/upstream/oracle/userland-gate/file/ea6a3f09379c/components/python/python27>

It includes DTrace patch. Did you see/use that?

Andrzej

On 24/11/2011 16:46, Jesus Cea wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all.

I have spend some time trying to integrate DTrace probes in official
Python: Currently I have a patch to python 2.7, and my plan in to
integrate officially in 3.3.

The initial probes were based on previous work from OpenSolaris, and
similar, but currently I have quite a few more probes. Current details
in
<http://hg.jcea.es/cpython-2011/file/b1a39702dfd8/Doc/library/dtrace.rst>

The probes are tested under Solaris 10 x86 and x86-64. I would need
somebody to try on Solaris 10 Sparc (32 and 64 bits), Solaris 11,
OpenIndiana, FreeBSD (seems to need a kernel recompilation to enable
user mode tracing, check Google), Mac (I doubt it works as is), etc.,
any other platform running DTrace. What about SystemTap compatibility?

Details:<http://bugs.python.org/issue13405>

How to check:<http://bugs.python.org/issue13405#msg147706>.

The easier way to get the patch is to clone my repository at
<https://hg.jcea.es/cpython-2011/>  (with mercurial) and move to the
branch "dtrace-issue13405_2.7". Keep the clone around if you plan to
try future versions of this patch, including the future 3.3 version.

You can manually apply the patch in
<http://bugs.python.org/file23758/a9f4ae43fd85.diff>  to python 2.7.2+
sourcecode. The patch is developed against version 3c3009f63700
(2011-11-14). It might not apply cleanly to 2.7.2 sourcecode (not
checked). I will provide a direct patch to 2.7.3 when available. Maybe
to 2.7.2 if there is demand.

This is still work in progress. I will improve support with your
feedback. I am considering probes to monitor GIL and thinking how to
monitor C function calls from Python in an easy and fast way. Feedback
very welcomed.

Please, if you care about this, test it and provide some feedback :).

PS: Better post feedback in the bug tracker that by personal email :-).

- -- 
Jesus Cea Avion _/_/  _/_/_/_/_/_/

j...@jcea.es - http://www.jcea.es/ _/_/_/_/  _/_/_/_/  _/_/
jabber / xmpp:j...@jabber.org _/_/_/_/  _/_/_/_/_/
.  _/_/  _/_/_/_/  _/_/  _/_/
"Things are not so easy"  _/_/  _/_/_/_/  _/_/_/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/_/_/_/  _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQCVAwUBTs50+Jlgi5GaxT1NAQKWUwQAnl99nFd6nM5yiPGl8yw4/YR81BTIS563
3wyPz74o5wAE3k9quexr+UPCndPogiH6nhnJ9DNXfUpVyaouGG/tGEbZn/x+h7Dv
jc5616IRnHxGAxxuoTscCRRN88zsPVY6i71QMxK2BOS+zXMdcrsBajLrmx1UIzHY
Elr7fq8L988=
=uQM5
-END PGP SIGNATURE-

___
oi-dev mailing list
oi-...@openindiana.org
http://openindiana.org/mailman/listinfo/oi-dev

--
http://mail.python.org/mailman/listinfo/python-list


Re: Python and UML

2007-10-09 Thread Andrzej S.
[EMAIL PROTECTED] wrote:
> I'd like to start working with and learning more with UML. Can anyone
> suggest any freeware design software that I might use to do this? I
> also have
> Visio installed on my computer if thats of any use...


Does not Visio meet your requirements? It's quite powerfull UML design 
  tool.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: database without installation again

2007-02-28 Thread Andrzej S.
[EMAIL PROTECTED] wrote:
> MySQL is a server software. You cannot just drop some files and expect
> the whole thing to work.

Yes, sure. There is mySQL server installed. I can access it from php.


>> I think, the
>> best solution would be db stored in binary file with interface in based on
>> standard Python library, but is there anything like that??
> 
> SQLite ? Gadfly ?

How can I install them? Is it so simple as uploading module files to 
cgi-bin directory? Metakit (http://www.equi4.com/metakit/python.html) 
database works this way, but i haven't tested it yet.

-- 
Andrew S
-- 
http://mail.python.org/mailman/listinfo/python-list