searching python/gui developper in germany

2005-10-11 Thread Hans Georg Krauthaeuser
Dear all, for the measurements in our labs we have developed python scripts that are pretty fine for our needs. Basically, we have classes and call the appropriate methods from the command line (or by other scripts). So, we don't have any GUI. Now, an external customer want to use our software an

Re: how to execute .exe file ?

2005-10-11 Thread Larry Bates
There are several ways. The easiest is to use os.system('program.exe') If you require more control on the output, etc. take a look at popen and the new subprocess modules. A more complex method that is mostly for Windows GUI applications and allows finer grain control over window size, environme

Re: Can module access global from __main__?

2005-10-11 Thread Steve Holden
Neal Becker wrote: > Everything you said is absolutely correct. I was being lazy. I had a main > program in module, and wanted to reorganize it, putting most of it into a > new module. Being python, it actually only took a small effort to fix this > properly, so that in B.py, what were global va

Re: subprocess and non-blocking IO (again)

2005-10-11 Thread Thomas Bellman
Marc Carter <[EMAIL PROTECTED]> writes: > The problem with the above is that the subprocess buffers all its output > when used like this and, hence, this automation is not informing me of > much :) You may want to take a look at my asyncproc module. With it, you can start subprocesses and let

python interpreter

2005-10-11 Thread g.franzkowiak
Hi everybody, my interest is for the internals of the Python interpreter. I've used up to now FORTH for something and this indirect interpreter is very smart. --- ASM --- NEXT: LODSW ; WA <- [IP] ;

Re: Jargons of Info Tech industry

2005-10-11 Thread Mike Meyer
[EMAIL PROTECTED] writes: > I don't know how much spam other people receive but on one account I > hardly receive any as I reserve it for friends and business. On another > I had about 40 spam messages which took all of ten seconds to delete. > Hardly a serious matter. You don't have a spam proble

scipy.plt legend?

2005-10-11 Thread gurkesaft
Hello, Does anyone know how to use scipy.plt? The documentation is wrong or out of date at the scipy website, and I can't join their mailing lists for some reason. Most importantly, I need to be able to make and manipulate a legend. The scipy.plt.legend('whatever') command doesn't seem to exist.

Re: Python's Performance

2005-10-11 Thread Ognen Duzlevski
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Alex Stapleton wrote > > Except it is interpreted. > except that it isn't. Python source code is compiled to byte code, which > is then executed by a virtual machine. if the byte code for a module is up > to date, the Python runtime doesn't even look a

small outsource project: change host for gnuTellaVision

2005-10-11 Thread Michael Douma
This is about a small subcontracting project. This is an interesting project which produces interactive graphs of the gnutella network. We are updating a python project written by students at Berkeley a few years ago. This project is to switch from an out-dated data host to a new one. The followin

Re: Looking for info on Python's memory allocation

2005-10-11 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ... > > s = [k for k in iterable] > > > > if I know beforehand how many items iterable would possibly yield, would > > a construct like this be faster and "use" less memory? > > > > s = [0] * len(iterable) > > for i in xrange(len(iterable)): > >

Re: Python's garbage collection was Re: Python reliability

2005-10-11 Thread Alex Martelli
Tom Anderson <[EMAIL PROTECTED]> wrote: ... > Has anyone looked into using a real GC for python? I realise it would be a If you mean mark-and-sweep, with generational twists, that's what gc uses for cyclic garbage. > lot more complexity in the interpreter itself, but it would be faster, > more

Re: Learning Python

2005-10-11 Thread Markus
I do highly recommend this site, too. Listen to the python411 podcast shows. It's great. Jeff Fox wrote: > Lots of links to all levels of tutorials and documentation here: > http://www.awaretek.com/plf.html > > Python Podcast too! > > -- http://mail.python.org/mailman/listinfo/python-list

Re: Help creating extension for C function

2005-10-11 Thread Java and Swing
So is "module.c" a new C file or do I add it to my existing, myapp.c? Fredrik Lundh wrote: > >seq = PySequence_Fast(data, "expected a sequence"); > >if (!seq) > >return NULL; > > here's some more information on the PySequence_Fast API: > > http://www.effbot.org/zone/python-ca

Re: mod_python

2005-10-11 Thread Jim Gallacher
Python_it wrote: > Today I was busy to install mod_python. > > I have put the line > > LoadModule python_module libexec/mod_python.so > > into the httpd.conf file. > It Works! > Apache load mod_python /3.2.2.b Python2.4 > > But my problem is where I have to place te following code in de > httpd

Re: Python's Performance

2005-10-11 Thread Magnus Lycka
Donn Cave wrote: > Quoth "Fredrik Lundh" <[EMAIL PROTECTED]>: > | Alex Stapleton wrote > | > | > Except it is interpreted. > | > | except that it isn't. Python source code is compiled to byte code, which > | is then executed by a virtual machine. if the byte code for a module is up > | to date, t

Re: Help creating extension for C function

2005-10-11 Thread Java and Swing
also, I noticed you did python build-ext does that mean for any computer I want to run myapp on, I need to build the extension on it as well? Or can I build it once and just copy the files to another computer that has python already installed? If I just copy files, which files and where would

Re: Comparing lists

2005-10-11 Thread Christian Stapfer
"Scott David Daniels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: >> "Steve Holden" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>Christian Stapfer wrote: >>> "George Sakkis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL P

What's the best SNMP interface?

2005-10-11 Thread Mudcat
Hi, I don't know very much at all about SNMP, but I have an application where I need to use it. I won't be doing too much with it, just simple queries for metric values and capturing traps. I've searched on the net for information but haven't found anything that recent as to what is the best inte

Re: Python's Performance

2005-10-11 Thread Fredrik Lundh
Ognen Duzlevski wrote: > I am curious, does this make a difference speed wise (aside > from loading time)? The python tutorial would seem to imply > that it does not: > > >From Python-Docs-2.4.2/tut/node8.html#SECTION00812 > > "A program doesn't run any faster when it is read from

Re: scipy.plt legend?

2005-10-11 Thread Robert Kern
gurkesaft wrote: > Hello, > > Does anyone know how to use scipy.plt? The documentation is wrong or > out of date at the scipy website, and I can't join their mailing lists > for some reason. > > Most importantly, I need to be able to make and manipulate a legend. > The scipy.plt.legend('whatever

Re: Best way to share a python list of objects

2005-10-11 Thread Tim Arnold
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kyle.tk wrote: >> So I have a central list of python objects that I want to be able to >> share between different process that are possibly on different >> computers on the network. Some of the processes will add objects

Wrapper function

2005-10-11 Thread Java and Swing
I am having trouble with a wrapper function... My C code looks like --- #include #include #include "Python.h" int doStuff(const char *input, const char *d) {...} PyObject *wrap_doStuff(PyObject *, PyObject *args) { int result; char *input = 0; char *

Re: Learning Python

2005-10-11 Thread Daniel Schüle
Paul DiRezze wrote: > I'm spending the next two weeks off and I'm looking to take a crack at > learning how to program in Python. Here's a list of the places I've > bookmarked: > > http://www.python.org/doc/ and more specifically > http://wiki.python.org/moin/ > http://wiki.python.org/moin/Begi

Re: Wrapper function

2005-10-11 Thread Diez B. Roggisch
> PyObject *wrap_doStuff(PyObject *, PyObject *args) { ^ I guess you need a parameter name here Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapper function

2005-10-11 Thread Robert Kern
Java and Swing wrote: > I am having trouble with a wrapper function... > > My C code looks like > --- > #include > #include > #include "Python.h" > > int doStuff(const char *input, const char *d) {...} > > PyObject *wrap_doStuff(PyObject *, PyObject *args) { PyObject *wrap

Re: Wrapper function

2005-10-11 Thread Java and Swing
Diez, yes you were right! But I have other problems now. I now have... #include #include #include "Python.h" int doStuff(const char *input, const char *d) {...} static PyObject *wrap_doStuff(PyObject *self, PyObject *args) { int result; char *input = 0; char *d = 0;

dictionnaries and lookup tables

2005-10-11 Thread m . barenco
Hello, I am considering using dictionnaries as lookup tables e.g. >>>D={0.5:3.9,1.5:4.2,6.5:3} and I would like to have a dictionnary method returning the key and item of the dictionnary whose key is smaller than the input of the method (or <=,>,>=) but maximal (resp. maximal,minimal,minimal) eg

Re: Wrapper function

2005-10-11 Thread Robert Kern
Java and Swing wrote: > When I compile, I get two warnings..which are ok. Then when I build my > DLL I get.. > > Linking... >Creating library Release/MyDLL.lib and object Release/MyDLL.exp > test.obj : error LNK2001: unresolved external symbol _PyBuildValue > Release/MyDLL.dll : fatal error

Re: dictionnaries and lookup tables

2005-10-11 Thread jepler
On Tue, Oct 11, 2005 at 11:06:32AM -0700, [EMAIL PROTECTED] wrote: > Note that when I type: > >>>dir(D) [...] > the functions __ge__, __gt__, __lt__, __le__ seem to be non-implemented > but there is some __doc__ in them. Is there the intention to do > something similar as is described above or are

Re: unable to import os

2005-10-11 Thread ktxn1020
It works fine independently, but still not work when run with Python for Delphi. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help creating extension for C function

2005-10-11 Thread Fredrik Lundh
Java and Swing wrote: > So is "module.c" a new C file or do I add it to my existing, myapp.c? it's a complete module. if you want it to do something other than printing the arguments, replace the "do stuff" section with your own code. if you want to call it something else, rename it. if you wa

Re: Wrapper function

2005-10-11 Thread Java and Swing
So, I write the C code...as shown previously. Then, I do something like... c:\> python >> from distutils.core import setup, Extension >> >>setup( >>name="DLLTester", >>ext_modules = [Extension("DLLTester", ["test.c"])] >>) c:\> python setup.py build_ext -i ..is that it? If so, then

Re: Looking for info on Python's memory allocation

2005-10-11 Thread Fredrik Lundh
Alex Martelli wrote: > (there is no common Python type on which you can both call > len(...) AND the .next() method, for example -- a combination > which really makes no sense). >>> L = [1, 2, 3] >>> len(L) 3 >>> I = iter(L) >>> I >>> len(I) 3 >>> I.next() 1 >>> len(I) 2 >>> I.next() 2 >>> len(I

Re: Help creating extension for C function

2005-10-11 Thread Java and Swing
Fredrik, I now have this. myapp.c #include #include #include "Python.h" int doStuff(const char *input, const char *d) { ... } static PyObject *wrap_doStuff(PyObject *self, PyObject *args) { // get the arguments from Python int result; char *input = 0;

Re: dictionnaries and lookup tables

2005-10-11 Thread gry
[EMAIL PROTECTED] wrote: > Hello, > > I am considering using dictionnaries as lookup tables e.g. > > >>>D={0.5:3.9,1.5:4.2,6.5:3} > > and I would like to have a dictionnary method returning the key and > item of the dictionnary whose key is smaller than the input of the > method (or <=,>,>=) but m

Reminder: PyCon proposal deadline is Oct. 31st

2005-10-11 Thread A.M. Kuchling
The deadline for PyCon proposals is now three weeks away; proposals must be received by Oct. 31st. Read the call for proposals for what we're looking for and how to submit: The proposal submission site is . A.M. Kuchling Chair, PyC

Re: dictionnaries and lookup tables

2005-10-11 Thread m . barenco
>Sure they're implemented. Oops, my apologies. Just to build up on that, when I run: #start of listing import random A={1:None,2:None,"hello":None,(1,2,3):None} def dictcomp(n): for i in range(n): B=A.copy() C=A.copy() b=random.uniform(0,

Re: Learning Python

2005-10-11 Thread Markus Rosenstihl
On 2005-10-10 18:50:18 +0200, Paul DiRezze <[EMAIL PROTECTED]> said: > I'm spending the next two weeks off and I'm looking to take a crack at > learning how to program in Python. Here's a list of the places I've > bookmarked: > > http://www.python.org/doc/ and more specifically > http://wiki.p

Re: Help creating extension for C function

2005-10-11 Thread Java and Swing
..ok I modified wrap_doStuff, so it just returns 0 instead of return PyBuildValuethis fixed the problems I had with compiling. however, when I try using it in Python..I get a SystemError: error return without exception set. Anyhow, I need PyBuildValue to work. One other note, the VC++ 6 comp

Re: Help creating extension for C function

2005-10-11 Thread Carsten Haese
On Tue, 2005-10-11 at 15:14, Java and Swing wrote: > Anyhow, I need PyBuildValue to work. Try Py_BuildValue. HTH, Carsten Haese. -- http://mail.python.org/mailman/listinfo/python-list

Re: unable to import os

2005-10-11 Thread ktxn1020
I had the following code run with Python for Delphi. It works. while IsCDriveNotEnoughSpace(): dirlist = nt.listdir(CPath) listsize = len(dirlist) if listsize > 2: file = dirlist[0] nt.remove(CPath + dirlist[0]) PyLog(file + " in C:\logs has been delete

Re: Help creating extension for C function

2005-10-11 Thread Java and Swing
Carsten..thanks so much...that was it! DUH! Carsten Haese wrote: > On Tue, 2005-10-11 at 15:14, Java and Swing wrote: > > Anyhow, I need PyBuildValue to work. > > Try Py_BuildValue. > > HTH, > > Carsten Haese. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help creating extension for C function

2005-10-11 Thread Java and Swing
quick question...how about returning an array of longs? ..or in my case I have a pointer to an array of longs. Thanks Carsten Haese wrote: > On Tue, 2005-10-11 at 15:14, Java and Swing wrote: > > Anyhow, I need PyBuildValue to work. > > Try Py_BuildValue. > > HTH, > > Carsten Haese. -- htt

Re: unable to import os

2005-10-11 Thread jepler
Concatenating filenames with "+" is seldom what you want. Instead, you should use os.path.join (or, to decrease portability, nt.path.join). Jeff pgpUKTuVnB2qh.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the best SNMP interface?

2005-10-11 Thread Grig Gheorghiu
I used pySNMP successfully. I think it's the most active SNMP-related Python project too. Grig -- http://mail.python.org/mailman/listinfo/python-list

disable Pmw.Counter?

2005-10-11 Thread Benjamin Rutt
Does anyone know how to disable a Pmw.Counter? (make it so it cannot be changed, but you can still call the get() function to see its current value?) Thanks, -- Benjamin Rutt -- http://mail.python.org/mailman/listinfo/python-list

Re: Wanted: Python module allowing direct access to raw sectors ofharddrives (MFT, boot sector, etc.) in MS Windows

2005-10-11 Thread sam
The main use of my SCSI routines,is that by using the SCSIPASSTHROUGH layer under Windows gives the user absolute control of the storage device. For example copying data from and IDE drive to a SCSI drive becomes transparent using SCSI commands. I.e Logical block 0 remains consistant. I had an PHD

Re: dictionnaries and lookup tables

2005-10-11 Thread Steve Holden
[EMAIL PROTECTED] wrote: >>Sure they're implemented. > > > Oops, my apologies. > > Just to build up on that, when I run: > > #start of listing > import random > > A={1:None,2:None,"hello":None,(1,2,3):None} > > def dictcomp(n): > for i in range(n): > B=A.copy() >

Re: Class property

2005-10-11 Thread Steven Bethard
Laszlo Zsolt Nagy wrote: > class A(object): >cnt = 0 >a_cnt = 0 >def __init__(self): >A.cnt += 1 >if self.__class__ is A: >A.a_cnt += 1 > class B(A): >pass > print A.cnt,A.a_cnt # 0,0 > b = B() > print A.cnt,A.a_cnt # 1,0 > a = A() > print A.c

Re: datetime and daylight savings problem

2005-10-11 Thread [EMAIL PROTECTED]
When working with timezones datetime objects are represented in the tzinfo object you supply, eg. when you define these classes (and run them on a system set to Paris time): from datetime import tzinfo, timedelta, datetime import time class UTC(tzinfo): """UTC timezone""" def utcoffset(s

Re: scipy.plt legend?

2005-10-11 Thread gurkesaft
Thank you, Robert. I noticed how obsolete it is! There is no documentation. Matplotlib freezes my system if I close a plot and make a new one :(. Bah. Windows :) Anyway, I figured out how to make gnuplot.py do my bidding. -Jack -- http://mail.python.org/mailman/listinfo/python-list

Re: Let My Terminal Go

2005-10-11 Thread Dan Stromberg
On Tue, 11 Oct 2005 03:30:23 -0700, Mystilleef wrote: > Hello, > > Thank you. That's all I needed. For some reason, I had always assumed > forking was an expensive process. I guess I was ill-informed. In a loop, yes, it's expensive. Done once, it's usually not unacceptable. -- http://mail.pyt

Nicer way of strip and replace?

2005-10-11 Thread Markus Rosenstihl
Hi, I wonder if i can make this nicer: In my case a list is created from a bill which is a tab seperated file and each line looks like this: "Verbindungen Deutsche Telekom vom 03.08.2005 bis 10.08.2005" "ISDN" "Deutsche Telekom AG" "Rufnummer" "123456789" "3" "Verbindunge

Re: python interpreter

2005-10-11 Thread Paul Rubin
"g.franzkowiak" <[EMAIL PROTECTED]> writes: > Where can I find informations like this for Python ? "Use the force, read the source". Python's interpreter is more like a big switch statement on bytecodes, though. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's garbage collection was Re: Python reliability

2005-10-11 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > > Has anyone looked into using a real GC for python? ... > > lot more complexity in the interpreter itself, but it would be faster, > > more reliable, and would reduce the complexity of extensions. > > ??? It adds no complexity (it's already there), it'

Re: Nicer way of strip and replace?

2005-10-11 Thread Paul Rubin
Markus Rosenstihl <[EMAIL PROTECTED]> writes: > This looks ugly (I htink) and I wonder if there is a nicer way to > strip commata and change the comma to a dot already when reading in. > Or should i do it with a shell script before processing in python? First of all you should just set your local

Re: HELP: Searching File Manager written in Python

2005-10-11 Thread Chris F.A. Johnson
On 2005-10-11, anton wrote: > > I am googeling some hours now ... still without result. > > So I have a question: > > Does somebody know a filemanager: > > - which looks like Norton Commander/7-Zip Filemanager What does Norton Commander/7-Zip look like? > - where I can add python scripts wh

Re: Jargons of Info Tech industry

2005-10-11 Thread Steven D'Aprano
On Tue, 11 Oct 2005 14:27:30 +, axel wrote: > I don't know how much spam other people receive but on one account I > hardly receive any as I reserve it for friends and business. On another > I had about 40 spam messages which took all of ten seconds to delete. > Hardly a serious matter. Can I

Re: Nicer way of strip and replace?

2005-10-11 Thread Diez B. Roggisch
> I replace commata with dots, then delete leading/trailing "s then add to > a sum after converting it to a float. > This looks ugly (I htink) and I wonder if there is a nicer way to strip > commata and change the comma to a dot already when reading in. It's not ugly - it's necessary. > Or sho

Profiling Python using gprof

2005-10-11 Thread Dave
Hello, I would like to profile a Python program using gprof. I already rebuilt Python with CC="gcc -pg" ./configure. So, I should be able to use gprof. How do I do that? Should I first run Python and then gprof? What are the steps? Thanks a lot! _

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-11 Thread Terry Hancock
On Tuesday 11 October 2005 09:37 am, Grant Edwards wrote: > On 2005-10-10, Terry Hancock <[EMAIL PROTECTED]> wrote: > >> Likewise, "dude" is often used when addressing a female but > >> almost never when speaking about one in the third person. > > > > This I have never witnessed. That's bizarre. >

[PIL]: Question On Changing Colour

2005-10-11 Thread Andrea Gavana
Hello NG,   First of all, sorry if this is not the right newsgroup.   I have a small image that looks like a GUI button (with 3D effects given by different pixels colours). The current image has as "basic" colour the grey. For "basic", I mean that the predominant colour in the image is grey

Re: Python name lookups / Interning strings

2005-10-11 Thread Dave
--- [EMAIL PROTECTED] wrote: > lookdict_string is used for most lookups of the form > obj.attr > because they are never found to have non-string keys > entered or searched. > > Furthermore, most of these string keys are > "interned", > which I believe makes the check > if (ep->me_ke

RE: Looking for info on Python's memory allocation

2005-10-11 Thread Delaney, Timothy (Tim)
Fredrik Lundh wrote: > Alex Martelli wrote: > >> (there is no common Python type on which you can both call >> len(...) AND the .next() method, for example -- a combination >> which really makes no sense). > L = [1, 2, 3] len(L) > 3 I = iter(L) I > > > (it's probably not a g

Re: Newbie needs help. Setting PYTHONDOCS to read HTML.

2005-10-11 Thread Brett Hoerner
That's because the Python docs come zipped up within a folder, for example: python_docs.tar.bz2 has a folder inside it called Python-Docs-2.4.2. You need to have C:\Python24\Python-Docs-2.4.2\ as the value if thats where that folder is, or wherever you unzipped it. I, personally, just took all t

Re: dictionnaries and lookup tables

2005-10-11 Thread Steven D'Aprano
On Tue, 11 Oct 2005 11:50:24 -0700, m.barenco wrote: > Just to build up on that, when I run: > > #start of listing > import random > > A={1:None,2:None,"hello":None,(1,2,3):None} > > def dictcomp(n): > for i in range(n): > B=A.copy() > C=A.copy() >

Re: Python Doc Problem Example: sort() (reprise)

2005-10-11 Thread Xah Lee
Addendum, 200510 Here's further example of Python's extreme low quality of documentation. In particular, what follows focuses on the bad writing skill aspect, and comments on some language design and quality issues of Python. >From the Official Python documentation of the sort() method, at: http:

Re: Nicer way of strip and replace?

2005-10-11 Thread Markus Rosenstihl
On 2005-10-11 23:45:46 +0200, Paul Rubin said: > Markus Rosenstihl <[EMAIL PROTECTED]> writes: >> This looks ugly (I htink) and I wonder if there is a nicer way to >> strip commata and change the comma to a dot already when reading in. >> Or should i do it with a shell

Re: Nicer way of strip and replace?

2005-10-11 Thread Paul Rubin
Markus Rosenstihl <[EMAIL PROTECTED]> writes: > indeed, it did it correctly by default: > > read_file = csv.reader(open('2005_08_Rechnung_4963184011.dat', 'r'), > delimiter="\t") > for row in read_file: > rechnung.append(row) Oh cool. I think you could even say: rechnung = list(read_fi

Re: non descriptive error

2005-10-11 Thread Timothy Smith
Fredrik Lundh wrote: >Timothy Smith wrote: > > >>i have reproduced the error in this code block >> >>#save values in edit >>self.FinaliseTill.SaveEditControlValue() >>if >>Decimal(self.parent.TillDetails[self.TillSelection.GetStringSelection()]['ChangeTinBalance'])) >>== Decimal('0'): >>#box mus

Re: Looking for info on Python's memory allocation

2005-10-11 Thread Martin v. Löwis
Fredrik Lundh wrote: I = iter(L) I > > > len(I) > > 3 [...] > (it's probably not a good idea to rely on this behaviour...) I believe this has been classified as a bug in Python 2.4, which will be undone in Python 2.5. Regards, Martin -- http://mail.python.org/mailman/listinfo/pyt

Re: Python name lookups / Interning strings

2005-10-11 Thread Martin v. Löwis
Dave wrote: > What exactly does it mean to "intern" a string? "exactly" it means to place lookup the string in the global interning dictionary. If an entry is found, then interning yields the string in the interning dictionary. If the string is not found, it is added to the interning dictionary, a

Re: Newbie needs help. Setting PYTHONDOCS to read HTML.

2005-10-11 Thread moondusterone
Yes it did. And it worked! Thank you! moondusterone "Brett Hoerner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > That's because the Python docs come zipped up within a folder, for > example: > > python_docs.tar.bz2 has a folder inside it called Python-Docs-2.4.2.

Re: dictionnaries and lookup tables

2005-10-11 Thread m . barenco
Ok, Thanks for your answers, that's pretty unambiguous. M. -- http://mail.python.org/mailman/listinfo/python-list

Re: Continuous system simulation in Python

2005-10-11 Thread Nicolas Pernetty
I was implicitly referring to Python/C model for this. I'm aware that Python can be very slow on heavy computations (it's a _documented_ shortcoming), sometimes much slower than Simulink. I believe that no current technology can meet the needs of both rapid prototyping (for projects in their infan

Re: Python name lookups / Interning strings

2005-10-11 Thread Terry Hancock
On Tuesday 11 October 2005 05:36 pm, Dave wrote: > What exactly does it mean to "intern" a string? For very simple strings such as "A" and for strings used as identifiers (I think), Python creates a permanent object during byte-code compilation. Thereafter, any time that string value occurs in th

can we save print msg into a file when script running ?

2005-10-11 Thread black
hi all~ in my .py file there are a few print to trace out some message and i wonder if we can save it into a specified file when that script get running. if so, i may just check that file to c how the script is running. can anyone show me a right direction ? one million tks~ -- http://mail.pyth

Re: pyparallel and MAKE controller board for CRYDOM AC/DC switches

2005-10-11 Thread garyr
Richard Siderits wrote: > Greetings. I am trying to write a small application for controlling CRYDOM > AC and DC switches from the parallel port using pyparallel. The project is > described in the latest issue of MAKE magazine Vol.3 pg 86. All of the > examples are in C, VB, Linux, Unix but not

Re: [PIL]: Question On Changing Colour

2005-10-11 Thread Terry Hancock
On Wednesday 12 October 2005 05:28 pm, Andrea Gavana wrote: > Now my question: is it possible to transform the pixels colours in order to have another basic colour (say blue)? In other words, the predominant colour will become the blue, with other pixels in a brighter or darker blue to give the

where to get modules for python

2005-10-11 Thread eight02645999
hi i am new to python and was wondering where can i find modules for python? Something very much like what CPAN has for Perl. I am searching for SSL/SSH modules for use in Python. thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: how to execute .exe file ?

2005-10-11 Thread black
tks !!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-10-11 Thread Roedy Green
On Tue, 11 Oct 2005 14:27:30 GMT, [EMAIL PROTECTED] wrote or quoted : >> This would slow them down with requests for permission to send. they >> could send only one per certificate. The cost and hassle of getting >> the certificate could deter tem, and uniquely identify them for >> blocking and

Re: Jargons of Info Tech industry

2005-10-11 Thread John Bokma
Roedy Green <[EMAIL PROTECTED]> wrote: > So let's say I decide to send an email to Donald Knuth. :-) -- John Small Perl scripts: http://johnbokma.com/perl/ Perl programmer available: http://castleamber.com/ I ploink g

are there internal functions for these ?

2005-10-11 Thread black
hi all~ i wrote some functions for copying and moving files caz' i didnt find concret functions within the doc. but i think these operations are simple and important so there may be some internal ones i didnt know. anyone could figure me out ? tks~ -- http://mail.python.org/mailman/listinfo/py

Re: Profiling Python using gprof

2005-10-11 Thread jepler
It should be the same as for any program $ program-compiled-with-pg $ gprof /path/to/program-compiled-with-pg you'll need to make sure that python is not only *compiled* with -pg but that the *link line* contains -pg as well. That's a common "gotcha" when it comes to profiling. Jeff pgpQy

Re: are there internal functions for these ?

2005-10-11 Thread jepler
there's 'os.rename' for moving (single) files, and several functions in 'shutil' for moving and copying trees of files. Jeff pgpS5MgPvRJQZ.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: are there internal functions for these ?

2005-10-11 Thread Robert Kern
black wrote: > hi all~ > > i wrote some functions for copying and moving files caz' i didnt find > concret functions within the doc. but i think these operations are > simple and important so there may be some internal ones i didnt know. > anyone could figure me out ? http://docs.python.org/lib/

Re: Jargons of Info Tech industry

2005-10-11 Thread Paul Rubin
Roedy Green <[EMAIL PROTECTED]> writes: > So let's say I decide to send an email to Donald Knuth. Good luck. Prof. Knuth stopped reading email years before there was a big spam problem. He uses his own version of hashcash to cut down on unimportant mail: if you want to write to him, you have to

Re: Nicer way of strip and replace?

2005-10-11 Thread Kent Johnson
Markus Rosenstihl wrote: > Hi, > I wonder if i can make this nicer: > > euro=euro + float(string.replace(string.strip(rechnung[element][10], > '"'), ',' , '.')) You can use the str methods instead of functions from the string module: euro=euro + float(rechnung[element][10].strip('"').replac

Re: Profiling Python using gprof

2005-10-11 Thread Micah Elliott
On Oct 11, Dave wrote: > I would like to profile a Python program using gprof. I already > rebuilt Python with CC="gcc -pg" ./configure. So, I should be able to > use gprof. How do I do that? Should I first run Python and then gprof? > What are the steps? Note that it is much more common to use Py

Re: HELP: Searching File Manager written in Python

2005-10-11 Thread phil_nospam_schmidt
I don't know about Norton Commander either. But, have you looked at twander? http://www.tundraware.com/Software/twander/ -- http://mail.python.org/mailman/listinfo/python-list

Re: are there internal functions for these ?

2005-10-11 Thread Kent Johnson
black wrote: > hi all~ > > i wrote some functions for copying and moving files caz' i didnt find > concret functions within the doc. but i think these operations are > simple and important so there may be some internal ones i didnt know. > anyone could figure me out ? See the os, os.path and shu

Re: [PIL]: Question On Changing Colour

2005-10-11 Thread jepler
If you're always going from grey to tinted, then the easiest way is to treat it as a 'P' image with a special palette. I believe this function will prepare the palette: def make_palette(tr, tg, tb): l = [] for i in range(255): l.extend([tr*i / 255,

TurboGears /.-ed, >new == True< or >new == "True"

2005-10-11 Thread Andy Leszczynski
watch this: http://www.turbogears.org.nyud.net:8090/docs/wiki20/20MinuteWiki.mov or read this: http://www.turbogears.org.nyud.net:8090/docs/wiki2 0/page4.html should not it be: 2 def save(self, pagename, data, submit, new): 3 hub.begin() 4 if new == True: 5 page = Page(pagename=pagename, dat

Re: scipy.plt legend?

2005-10-11 Thread John Hunter
> "gurkesaft" == gurkesaft <[EMAIL PROTECTED]> writes: gurkesaft> Thank you, Robert. I noticed how obsolete it is! gurkesaft> There is no documentation. gurkesaft> Matplotlib freezes my system if I close a plot and make gurkesaft> a new one :(. Bah. Windows :) Have you se

piping out binaries properly

2005-10-11 Thread Andy Leszczynski
I have got following program: import sys import binascii from string import * sys.stdout.write(binascii.unhexlify("41410A4141")) when I run under Unix I got: $ python u.py > u.bin $ od -t x1 u.bin 000 41 41 0a 41 41 and under Windows/Cygwin following: $ python u.py > u.bin $ od -t x1 u.bi

Re: where to get modules for python

2005-10-11 Thread gene tani
http://www.python.org/doc/faq/library.html#how-do-i-find-a-module-or-application-to-perform-task-x [EMAIL PROTECTED] wrote: > hi > i am new to python and was wondering where can i find modules for > python? > Something very much like what CPAN has for Perl. > I am searching for SSL/SSH modules for

Re: Jargons of Info Tech industry

2005-10-11 Thread John Bokma
Paul Rubin wrote: > Roedy Green <[EMAIL PROTECTED]> writes: >> So let's say I decide to send an email to Donald Knuth. > > Good luck. Prof. Knuth stopped reading email years before there was a > big spam problem. Not entirely true: "My secretary prints out all message

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-11 Thread William Park
Paul Rubin wrote: > Reinhold Birkenfeld <[EMAIL PROTECTED]> writes: > > For a conditional, syntax must be found, and the tradition of Python > > design is not to use punctuation for something that can be solved > > with keywords. > > Yeah, "if C then A else B" is a ancie

Re: A problem while using urllib

2005-10-11 Thread Johnny Lee
Alex Martelli wrote: > Johnny Lee <[EMAIL PROTECTED]> wrote: >... > >try: > > webPage = urllib2.urlopen(url) > >except urllib2.URLError: >... > >webPage.close() > >return True > > > > > >But every time when I ra

<    1   2   3   >