How to use multiple instances of the same COM object at the same time

2013-03-22 Thread Jan
etter way? I'm new to COM objects in Python! The program runs fine, it is very basic and I tested it with 3 devices connected at the same time. In production this will be 40! Thanks in advance Jan Source code: # Based on eventappartmentthreading from the win32com demo import sys, os, t

reseting an iterator

2009-05-20 Thread Jan
Wouldn't it be easy for Python to implement generating functions so that the iterators they return are equipped with a __reset__() method? Here is the context of this question. Python documentation defines a "iterator" as an object ITERATOR having methods __next__() and __iter__() such that the

Re: reseting an iterator

2009-05-20 Thread Jan
On May 20, 2:35 pm, Jan wrote: OOPS, I have pressed some keys and the message went out before It was finished. Here is the last fragment: So, one can define iterators by defining a class whose objects have methods __iter__ and __next__ -- with this approach it is easy to add some __reset__

Re: reseting an iterator

2009-05-20 Thread Jan
On May 20, 2:48 pm, Jan wrote: Iterators can also be produced by iter(ITERABLE) which could mnufacture them with a __reset__. Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: reseting an iterator

2009-05-22 Thread Jan
t; as a resettable iterable. > y = Y() This does not work. With this, y is not an interator, and not even an iterable. > for c in y: This produces an error because by definition of for-loops it is executed the same way as: temp_iterator = iter(y) # temp_iterator is y while True: try: print(next(temp_iterator)) # temp_iterator does not support __next__() except StopIteration: break Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Game Development?

2013-06-08 Thread Jan Riechers
from pygame.locals import * gameApp() #-------- Regards Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: A certainl part of an if() structure never gets executed.

2013-06-18 Thread Jan Riechers
d the code flow 2. Understand mistakes 3. Save yourself a big time by searching targeted for code parts which are executed.. ..and ignore not directly connected code - for example when looking at other peoples code without documentation, comments or introduction. This can spare loads of headaches. And all this can be done in a couple of minutes.. Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this PEP-able? fwhile

2013-06-26 Thread Jan Riechers
On 26.06.2013 16:28, William Ray Wing wrote: On Jun 26, 2013, at 7:49 AM, Fábio Santos mailto:fabiosantos...@gmail.com>> wrote: On 26 Jun 2013 11:45, mailto:jim...@aol.com>> wrote: > > On Tuesday, June 25, 2013 9:30:54 PM UTC+5:30, Ian wrote: > > In my experience the sorts of people who preach

Basic question about speed/coding style/memory

2012-07-21 Thread Jan Riechers
briefly, what is the better way to proceed in terms of execution speed, readability, coding style? Letting out the fact that, in order to prevent "doSomethingElseInstead"-Block to execute, a return has to provided. Thank you for reading and hope someone brings light into tha

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Jan Riechers
On 21.07.2012 11:02, Andrew Berg wrote: On 7/21/2012 2:33 AM, Jan Riechers wrote: Block ... versus this block: ... Now, very briefly, what is the better way to proceed in terms of execution speed, readability, coding style? Using if/else is the most readable in the general sense. Using return

Re: Basic question about speed/coding style/memory

2012-07-21 Thread Jan Riechers
les the task on lower level. But fare enough for me :) But I agree, the return in my example is misleading and it would be illegal outside of a function call. I just added it to make clear that the fellow code below the return should not be executed in comparison to the 2nd example. Thank you very much Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a list of strings into a list of integers?

2012-07-22 Thread Jan Riechers
uot;str" for string.. et cetera) on sequenceY, returning a sequence. More in the help file. And if I'm not completely mistaken, it's also the quicker way to do performance wise. But I can't completely recall the exact reason. Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a list of strings into a list of integers?

2012-07-22 Thread Jan Riechers
On 22.07.2012 20:03, David Robinow wrote: On Sun, Jul 22, 2012 at 12:20 PM, Jan Riechers wrote: On 22.07.2012 18:39, Alister wrote: looks like a classic list comprehension to me and can be achieved in a single line MODUS_LIST=[int(x) for x in options.modus_list] Hi, I am not sure why

Re: Converting a list of strings into a list of integers?

2012-07-22 Thread Jan Riechers
writing code. Thanks for your explanation, clarifies a lot! Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: the meaning of rユ.......ï¾

2012-07-23 Thread Jan Riechers
to Py2to3. Outside for display usage it has a right place to make usage of Unicode, like for French with all the accents Danish, Swedish and other languages, but some "old"-standards should stay in place, meaning to use English, so it stays accessible and understandable. Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: New image and color management library for Python 2+3

2012-08-19 Thread Jan Riechers
) it would be interesting so. :) But no offence by that and respect for you work so! Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: New image and color management library for Python 2+3

2012-08-23 Thread Jan Riechers
On 20.08.2012 20:34, Christian Heimes wrote: > Am 19.08.2012 19:35, schrieb Jan Riechers: > > Hello Jan, > > we decided against ImageMagick and pgmagick for several reasons. For one > we were already using FreeImage in other projects (Delphi projects and > through ctypes bin

Re: Objects in Python

2012-08-23 Thread Jan Kuiken
rong with having six variables called 'q'. Sometimes you don't want only six variables called 'q' but a hundred of them :-) def fac(q): if q < 1 : return 1 else: return q * fac(q-1) print(fac(100)) Jan Kuiken -- http://mail.python.org/mailman/listinfo/python-list

Re: Objects in Python

2012-08-23 Thread Jan Kuiken
ent. btw. I like the idea of simultaneously instantiation :-) Jan Kuiken -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes - python2.7.3 vs python3.2.3

2012-08-29 Thread Jan Kuiken
ain, i'm not very familiar with ctypes) Jan Kuiken -- http://mail.python.org/mailman/listinfo/python-list

z-buffer mlab

2012-12-05 Thread Jan Kurzawski
Hi Guys! I am plotting an object in mlab (isoSurface) and then I am adding 2 image_plane_widgets. Till now everything is ok but when I am changing the opacity of the object to lower than 1 it is suddenly appearing behind the planes? Why so? Is it dependant on the order of adding objects? But i

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-05 Thread Jan Riechers
On 05.01.2013 03:11, someone wrote: On 01/03/2013 12:27 PM, Chris Angelico wrote: On Thu, Jan 3, 2013 at 10:19 PM, someone wrote: Doesn't this "[ ... ]" mean something optional? What does {2,30}$ mean? I think $ means that the {2,30} is something in the end of the sentence...

Re: Need Pattern For Logging Into A Website

2013-01-28 Thread Jan Wąsak
On Friday, January 25, 2013 2:29:51 AM UTC+1, Tim Daneliuk wrote: > I need to write a Python script to do the following: > > > >- Connect to a URL and accept any certificate - self-signed or > authoritative > >- Provide login name/password credentials > >- Fill in some presented f

[RFC] PEP 3143: supplementary group list concerns

2012-03-10 Thread Jan Pokorný
ght into effect. [2] http://groups.google.com/group/paste-users/browse_thread/thread/2aa651ba331c2471 [3] http://0pointer.de/public/systemd-man/systemd.exec.html [4] http://pubs.opengroup.org/onlinepubs/95399/utilities/newgrp.html Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: [RFC] PEP 3143: supplementary group list concerns

2012-03-11 Thread Jan Pokorný
On 12/03/12 09:27 +1100, Ben Finney wrote: Jan Pokorný writes: in the light of a recent spot in Python Paste [1], I've come across the python-daemon [2] implementation and found it also lacks support for supplementary groups. Thank you for your interest in ‘python-daemon’. To

Re: functions which take functions

2012-04-12 Thread Jan Kuiken
mind. Jan Kuiken -- http://mail.python.org/mailman/listinfo/python-list

Appending to []

2012-04-20 Thread Jan Sipke
Can you explain why there is a difference between the following two statements? >>> a = [] >>> a.append(1) >>> print a [1] >>> print [].append(1) None Best regards, Jan Sipke -- http://mail.python.org/mailman/listinfo/python-list

Re: Help doing it the "python way"

2012-05-29 Thread Jan Kuiken
g like this (copied from an IPython shell, could be shorter) Regards, Jan Kuiken In [1]: first_list = np.arange(0, 10).reshape((5,2)) In [2]: above = np.array([0,-1]) In [3]: below = np.array([0,+1]) In [4]: N,d = first_list.shape In [5]: second_list = np.empty((N*2,d)) In [6]: second_lis

Re: Generator Frustration

2011-06-05 Thread Jan Decaluwe
pong yield statements, but that solutions seems even uglier than having a very flat, single main routine with repeating sequences. In MyHDL, this is supported by the possibility to yield generators, which are then handled by the simulation engine. Jan -- Jan Decaluwe - Resources b

Fwd:

2022-09-09 Thread Jan Poort
error by starting up windows 10 i get this message -- Forwarded message - Van: Jan Poort Date: do 8 sep. 2022 om 15:49 Subject: To: -- *Jan Poort* -- https://mail.python.org/mailman/listinfo/python-list

RE: Python installation not full and python not working 3.11.0

2023-03-10 Thread Jan Vasko
3.11.0 (full 64bit installer from python.org) * Downloaded from: Python Release Python 3.11.0 | Python.org<https://www.python.org/downloads/release/python-3110/> cmd: [cid:image006.png@01D953B0.4E12E170] This is resulting that I cannot use interpreter in VS Code and continue development.

Re: Non-GUI, single processort inter process massaging - how?

2018-07-22 Thread Jan Claeys
y other HTTP client... -- Jan Claeys -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Python on a fork-less POSIX-like OS

2018-07-29 Thread Jan Claeys
> > My question is that the _posixsubprocess.c can be prepared to > use posix_spawn(3) instead of fork(2)? Maybe the UNIX/Linux version > can also benefit from it, see: https://salsa.debian.org/ruby- > team/ruby-posix-spawn You might want to ask this on the python-dev mailing list. -- Ja

Re: What is precision of a number representation? (was: Curious Omission In New-Style Formats)

2016-07-11 Thread Jan Coombs
tion that does indicate the precision of a number [1]. It also resolves other problems of current float representation. Bad news?:In doing so unums becomes incompatible with current hardware floating point engines. Jan Coombs -- [1] slides: http://sites.ieee.org/scv-cs/files/2013/03/Right-Sizing

Re: cell and row

2005-10-25 Thread Jan Niestadt
Because you're inserting items into your existing list instead of a new list. What you probably mean is: b = [] for x in a: b.append(x) which creates a new list b that contains all elements whose length is greater than four. A better way to write this would be: b = [x for x in a if l

Re: cell and row

2005-10-25 Thread Jan Niestadt
Doh, the first example should of cours be: b = [] for x in a: if len(x) > 4: b.append(x) -- http://mail.python.org/mailman/listinfo/python-list

modifying source at runtime - jython case

2005-11-05 Thread Jan Gregor
. Thanks for response, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: modifying source at runtime - jython case

2005-11-05 Thread Jan Gregor
In article <[EMAIL PROTECTED]>, Alan Kennedy wrote: > [Jan Gregor] >> I want to apply changes in my source code without stopping jython >> and JVM. Preferable are modifications directly to instances of >> classes. My application is a desktop app using swing library

Re: modifying source at runtime - jython case

2005-11-06 Thread Jan Gregor
In article <[EMAIL PROTECTED]>, Kent Johnson wrote: > Jan Gregor wrote: >> Hello folks >> >> I want to apply changes in my source code without stopping jython >> and JVM. Preferable are modifications directly to instances of >> classes. My applicati

Re: modifying source at runtime - jython case

2005-11-07 Thread Jan Gregor
Kent Johnson wrote: > Jan Gregor wrote: > >> my typical scenario is that my swing application is running, and i see >> some error or chance for improvement - modify sources of app, stop and >> run >> application again. >> so task is to reload class defitions

special method in module

2005-11-16 Thread Jan Procházka
Hello, can have modules special methods? althouht i think that no, i tried following example and i don't, why it don't works: file m2.py (imported module) class Module: def __getitem__(self,index): return index module=Module() __getitem__=module.__getitem

Re: special method in module

2005-11-16 Thread Jan Procházka
Thanks, probably you are right, hacking python in my situation is not neccessary... >Jan Procházka wrote: > > > >>can have modules special methods? >> >> > >no, but you can replace the module object with something that can have >special methods: &

Re: about polygon

2005-11-20 Thread Jan Voges
Hi! Am Sun, 20 Nov 2005 03:55:21 -0800 schrieb Shi Mu: > Why I got a black polygon in the following code? > How can I make it no-color filled? Use create_line instead: c.create_line(60,60,100,60,100,100,60,120,60,60) Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: about polygon

2005-11-20 Thread Jan Voges
Hi Am Sun, 20 Nov 2005 04:45:52 -0800 schrieb Shi Mu: > If so, what is the difference between create_line and create_polygon? create_polygon only creates closed polygons. Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Any Python XML Data Binding Utilities Avaiable?

2004-12-31 Thread Jan Dries
ject. It does support Python object mapping generation, but the usefulness of the result is limited outside the context of web services. See http://pywebsvcs.sourceforge.net/ Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Another look at language comparisons

2005-01-08 Thread Jan Dries
h a beard :-) http://www.tbray.org/ongoing/When/200x/2004/12/08/-big/IMG_3061.jpg Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Integration with java (Jpype vs. JPE)

2005-01-17 Thread Jan Dries
ed a more elaborate real life example of how to do this. Search Google Groups for more details. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Solutions for data storage?

2005-01-18 Thread Jan Dries
very clean. See: http://www.sqlobject.org/docs/SQLObject.html#adding-magic-attributes-properties Or am I missing something here? Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Zen of Python

2005-01-19 Thread Jan Dries
Luke Skywalker <[EMAIL PROTECTED]> schreef: > On Wed, 19 Jan 2005 14:13:47 -0500, Timothy Fitz > > While I agree that the Zen of Python is an amazingly concise list > > of truisms, I do not see any meaning in: > > For those interested, here's the list: > http:

Re: redirect of standard output of jython to JTextArea

2005-01-27 Thread Jan Gregor
# This is a sucky hack. Fix printResult self.console.textArea.append(data) Jan Jan Gregor wrote: Hello I want to redirect output of jython's functions print and println to JTextArea component. Is it possible ? I tried this (swingConsole.textArea is instance): In my class

redirect of standard output of jython to JTextArea

2005-01-27 Thread Jan Gregor
tream) class MyPrintStream (PrintStream): def println (str): swingConsole.textArea.append(str) def print (str): swingConsole.textArea.append(str) Output is still directed to standard output. Thanks for help, Jan -- http://mail.pytho

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-04 Thread Jan Dries
a coincidence we've never seen or heard Timothy "autocoding" Rue again? Be afraid, Xah, be very afraid. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Graphs/statistics using wxPython

2005-06-29 Thread Jan Danielsson
Hello all, I wanted to plot some statistics, so I wrote a simple wxPython class to do it. Then I realized that I would like to draw bar graphs, so I added that too. Since I'm a complete Python newbie, I haven't done much of it the "Python way", I suspect. So, I'm wondering if someone would

Re: Graphs/statistics using wxPython

2005-06-29 Thread Jan Danielsson
Robert Kern wrote: >>I wanted to plot some statistics, so I wrote a simple wxPython class >> to do it. Then I realized that I would like to draw bar graphs, so I >> added that too. >> >>Since I'm a complete Python newbie, I haven't done much of it the >> "Python way", I suspect. So, I'm won

Re: Graphs/statistics using wxPython

2005-06-29 Thread Jan Danielsson
Robert Kern wrote: [---] > It's okay. Just about every Pythonista in the sciences has, at one time > or another, started a plotting library. It's a rite of passage. Welcome > to the club. :-) Question: I need to install SciPy in order to use matplotlib, but on the download page I see that ther

Re: Graphs/statistics using wxPython

2005-06-29 Thread Jan Danielsson
Robert Kern wrote: >> [---] >> >>> It's okay. Just about every Pythonista in the sciences has, at one time >>> or another, started a plotting library. It's a rite of passage. Welcome >>> to the club. :-) >> >> >>Question: I need to install SciPy in order to use matplotlib, > > No you don't.

Question about Python

2005-07-01 Thread Jan Danielsson
Hello all, I recently started using Python, and I must say I like it. Both the language and libraries available for it. Background: I have written an application which I use to keep track of my personal economy. I wrote it in Java because I wanted to learn the language for a course in progr

Stupid question: Making scripts python-scripts

2005-07-21 Thread Jan Danielsson
Hello all, How do I make a python script actually a _python_ in unix:ish environments? I know about adding: #!/bin/sh ..as the first row in a shell script, but when I installed python on a NetBSD system, I didn't get a "python" executable; only a "python2.4" executable. Adding "#!/usr/

Data available on socket?

2005-07-22 Thread Jan Danielsson
Hello all, How do I find out if a blocking socket has data available [for reading] on it? I assume I could do something like this: tmp = self.read(1, socket.MSG_PEEK) if len(tmp) > 0: # Data available But is there a better way? A call which specifically checks if data is available? --

Lists & "pointers"

2005-07-23 Thread Jan Danielsson
Hello all, I have written a simple whiteboard application. In my application, I want to be able to set draw attributes. This part works. I have a dictionary object which contains stuff like: self.attr['Pen.Color'] = ... self.attr['Pen.Thickness'] = ... Now, the problem is that I want to be

First app, thanks people

2005-07-25 Thread Jan Danielsson
Hello all, I have written my first Python application (apart from small test programs). It's a (distibuted) white board application. I'm going to assume that there already are a thousand of them, written in Python, but just in case someone would find it useful: http://user.it.uu.se/~jada3673/a

Re: First app, thanks people

2005-07-25 Thread Jan Danielsson
Dark Cowherd wrote: [---] > In case you are interested in bug report. Always! > class LineTool > method OnLeftUp > needs > self.done = True > > or else if you are in Line mode and you just click with out moving the > mouse you get an error. Many thanks; I can't believe I hadn't stumbled a

Re: First app, thanks people

2005-07-25 Thread Jan Danielsson
Will McGugan wrote: [---] > You should use the keycode constants. > > http://www.wxwidgets.org/manuals/2.6.1/wx_keycodes.html#keycodes [---] Excellent! Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Escaping certain characters

2005-07-30 Thread Jan Danielsson
Hello, I'd like to encode the string that outputs: Hello World! to 'Hello\x0aWorld!', and the string that outputs: Hello\World! to 'Hello\\World!'. Obviously, I want to be able to reverse the process. I'm going to assume this has already been solved in Python.. But how? -- http://mail.pytho

Re: Escaping certain characters

2005-07-30 Thread Jan Danielsson
Robert Kern wrote: [---] > In [3]: s.encode('string_escape') > Out[3]: 'Hello\\nWorld!' > > In [4]: Out[3].decode('string_escape') > Out[4]: 'Hello\nWorld!' > > Not *quite* what you asked for, but it ought to be close enough. That'll do just fine. Many thanks! -- http://mail.python.org/mailman/

Re: Escaping certain characters

2005-07-31 Thread Jan Danielsson
Jan Danielsson wrote: >>In [3]: s.encode('string_escape') >>Out[3]: 'Hello\\nWorld!' >> >>In [4]: Out[3].decode('string_escape') >>Out[4]: 'Hello\nWorld!' >> >>Not *quite* what you asked for, but it ought to be close

Re: Escaping certain characters

2005-07-31 Thread Jan Danielsson
Robert Kern wrote: [---] >> Hmm... On second thought, I need to escape more characters. >> >> Is there no other way to escape characters in strings? > > Which characters? I need to escape '\n', '"', '[' and ']'. I finally went with a few of these: string.replace('\n', '\\n') string.replace('"'

Re: Escaping certain characters

2005-07-31 Thread Jan Danielsson
tried searching for it, but could only find UTF/Unicode-related information. Is it in the normal python documentation? Semi-Offtopic: The "search" facility in the Python help has stopped functioning for me (I'm using XP on this system). No matter what I search for, I get no resul

Documentation

2005-08-10 Thread Jan Danielsson
Java does), but what do I need to do to support it, and how does it work? -- Kind Regards, Jan Danielsson Te audire no possum. Musa sapientum fixa est in aure. -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-08-12 Thread jan V
> Xah is very well known as the resident troll in many NGs and his 'contributions' are less then useless. > > Best is to just ignore him. Did you know that some deranged people take sexual pleasure out of starting fires? Apparently some of the latest forest/bush fires in southern Europe were even

Re: Jargons of Info Tech industry

2005-08-22 Thread jan V
> +---+ .:\:\:/:/:. > | PLEASE DO NOT |:.:\:\:/:/:.: > | FEED THE TROLLS | :=.' - - '.=: > | | '=(\ 9 9 /)=' > | Thank you, | ( (_) ) >

Re: What are new-style classes?

2005-08-29 Thread Jan Danielsson
ply written a setText() method, but imho properties are neater - but that's just a matter of opinion. -- Kind Regards, Jan Danielsson Te audire no possum. Musa sapientum fixa est in aure. -- http://mail.python.org/mailman/listinfo/python-list

python script under windows

2005-09-09 Thread Jan Gregor
Hello I run python script on another computer and want to "survive" that script after my logout. the script also uses drive mapping to network drive. Can you help me ? Or better is there some info for unix person how to survive with python on windows ;-) thanks, jan grego

Re: Pypy - Which C modules still need converting to py?

2005-02-08 Thread Jan Dries
Caleb Hattingh wrote: Anyone have that page ref handy listing the C modules that the pypy team need translated into python? http://codespeak.net/pypy/index.cgi?doc/cmodules.html Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Jan Dries
oherence of writing" between two sentences, then maybe you shouldn't type them as different paragraphs. If you would have written: """ Should I take answers serious? Answer from people which do not respect coherence of writings? """ it would have been much more coherent. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Install problem Windows xp HE

2005-03-11 Thread Jan Ekström
a problem but can'not understand the message. Sincerely Jan Ekström Here is the error.IDLE 1.1  >>> python   Traceback (most recent call last):  File "", line 1, in -toplevel-pythonNameError: name 'python' is not defined>>> -- http://mail.python.org/mailman/listinfo/python-list

[OT] Re: SysLogHandler is drivin me nuts PEBCAC

2004-11-29 Thread Jan Dries
Slightly OT, but regarding the title, shouldn't it be PEBKAC, since it's keyboard and not ceyboard? Regards, Jan michael wrote: Vinay Sajip <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... michael wrote: Yep it was incomplete heres the complete config as it

Re: [OT] Re: SysLogHandler is drivin me nuts PEBCAC

2004-11-30 Thread Jan Dries
[Jan Dries] > Slightly OT, but regarding the title, shouldn't it be PEBKAC, > since it's > keyboard and not ceyboard? [Vinay Sajip] > PEBCAC: Problem Exists Between Chair And Computer Interesting. I thought it was "Problem Exists Between Keyboard And Chair"

Re: jython and concatenation of strings

2004-12-13 Thread Jan Gregor
Ok, thanks. I didn't think that += operator is nondestructive operation - but strings are immutable so this makes sense. On 2004-12-13, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> I found that price of += operator on string is too high in jython. For >> example 5000 such operations took 90 se

Re: Accessing DB2 with Python

2004-12-16 Thread Jan Dries
as I am at work. Is there any commonly used module for this? You could try mxODBC. It has support for DB2. You can find it at: http://www.egenix.com/files/python/mxODBC.html You can download it for free and use it for a 30 day evaluation period. After that, you must pay for a commercial license

jython and concatenation of strings

2004-12-13 Thread Jan Gregor
x27;s alternative way to do that ? (similiar parts of my code are terribbly slow and such simple solution as above didn't help). Thanks, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: jython and concatenation of strings

2004-12-15 Thread Jan Gregor
StringBuffer class from java was right solution - yours looses encoding, and in jython I was unable to get it back - in python it worked fine. Jan > I don't use Jython, but are you not able to do something like: > > string_list = [] > for ... in ...: > ... >

Re: BASIC vs Python

2004-12-18 Thread Jan Dries
ake Excel accessible from Python, instead of the other way round. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-19 Thread Jan Dries
A2 G4 B2 B4 A4 F2. G4 E2 F2. """ ) midi.generate(somefilepath,notes) to generate MIDI-files from a simple notes description. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: MIDI library recommendations, please?

2004-12-20 Thread Jan Dries
ce/midi/midi.py It's simple, but it handles the basics (reading and writing MIDI). I've easily built the rest I needed on top of it. Regards, Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-21 Thread Jan Dries
Andrew Dalke wrote: Jan Dries If you just want to play notes, you could look at MIDI. [snip] It's hard to compare that to the current era. Sound clips are much more common, it's easy to record audio, keyboards and other specialized devices are cheap, and there's plenty of mixe

python2.6 needed as an aptitude package as dependency

2014-01-17 Thread Jan Hapala
all three versions of python. Still I get the same error: dpkg: dependency problems prevent configuration of macs: macs depends on python2.6; however: Package python2.6 is not installed. I will be grateful for your suggestions, Jan -- https://mail.python.org/mailman/listinfo/python-list

How do I get curses to work in Python 3.2 on win-64?

2011-10-15 Thread Jan Sundström
How do I get curses to work in Python 3.2 on win-64? I'm new to Python and when exploring Python in console I want to use some simple functions for console programming that don't emulate a typewriter terminal but rather a text screen terminal. I want to be able to clear the screen, position the cu

Re: How do I get curses to work in Python 3.2 on win-64?

2011-10-17 Thread Jan Sundström
On 16 Okt, 06:59, Christoph Gohlke wrote: > On Oct 15, 1:13 pm, Jan Sundström wrote: > > > > `import curses` should work. What exactly is the error message? Does > `import curses` work outside your program/program directory? > > The curses package is part of the stan

Re: "monty" < "python"

2013-03-20 Thread Jan Oelze
From the docs[0]: "Strings are compared lexicographically using the numeric equivalents (the result of the built-in function ord()) of their characters. Unicode and 8-bit strings are fully interoperable in this behavior." [0] http://docs.python.org/2/reference/expressions.html#not-in On 20.03.

Re: "monty" < "python"

2013-03-20 Thread Jan Oelze
Interesting. Thanks! On 20.03.2013, at 15:17, Ian Foote wrote: > On 20/03/13 13:38, Jan Oelze wrote: > >> "Strings are compared lexicographically using the numeric equivalents >> (the result of the built-in function ord()) of their characters. Unicode >>

Re: Python GUI questions

2013-03-31 Thread Jan Riechers
f you call a proper "StringVar/yourVariableName".set method of that particular class. As for the UI creation, have a look at that documentation, its very easy to navigate inside if you know what you are looking for. Regards Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorating functions without losing their signatures

2013-04-02 Thread Jan Riechers
t you wanted to archive? Regards Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: can anyone help me in developing a simple webpage in jinja2

2013-04-06 Thread Jan Riechers
a bit more detailed, this will help giving you any advice. If you know the code part raising the error and you post it, this will also help. Jan -- http://mail.python.org/mailman/listinfo/python-list

Puzzled by py.test output

2006-01-18 Thread Jan Decaluwe
pwatch/test.py:7] _ == tests finished: 2 failed in 0.02 seconds == Regards, Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium From Python to silicon: http://myhdl.jandecaluwe.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANNOUNCE] MyHDL 0.5 released

2006-01-20 Thread Jan Decaluwe
Michael wrote: > Jan Decaluwe wrote: > > >>I'm pleased to announce the release of MyHDL 0.5. >> >>MyHDL is an open-source package for using Python as a hardware >>description and verification language. Moreover, it can convert >>a design to Verilog.

Re: MyHDL 0.5 released

2006-01-20 Thread Jan Decaluwe
Randall Parker wrote: > Jan, > > What do you see as the main advantage for using MyHDL rather than VHDL > for coding up a chip design? The fact that MyHDL is technically just another Python application. So it makes all typical Python advantages available to hardware designers

Component framework

2006-08-11 Thread Jan Svec
Hi all, some time ago I've seen an interesting component framework for Python but I don't remember the name. I remember only one example. There were two components: Wheel and Car, Wheel were then inserted four times into Car and so on. This framework has had lazy instantiation of child components.

Re: Read a file with open command

2006-08-11 Thread Jan Svec
Hi, simply use file_obj = open ("D:\My documents\File.ods",'rb') for opening file in binary access mode, which is required for binary files on MS Windows. Honza jean-jeanot wrote: > I can access to a file with the command: > file_obj = open ( " D:\My documents\Textfile.txt",'r') > > When I now try

Newbie: trying to twist my head around twisted (and python)

2006-10-11 Thread Jan Bakuwel
either return success or failure. I've been looking at the twisted way of using twisted :-). According to the book "its a little confusing for a start" and I have to agree :-) Does anyone know how I need to complete the code below so it returns this mysterious "Deferr

  1   2   3   4   5   6   7   8   >