Re: Read from stdouton Popen on WinXP?

2005-08-17 Thread Adriaan Renting
The only way I know how to do this is using a pseudo terminal (pty), but I think that only works on Unix. The problem is the way stdout in C works: - If connected to a character device, it will flush after each line. - If connected to a block device it will flush only after it's buffer is full. A

Re: SOAP and XMLRPC

2005-08-17 Thread Adriaan Renting
import SOAPpy client = SOAPpy.SOAPProxy('http://localhost:80/Webservice') server = SOAPpy.SOAPServer(('localhost', 81), ) server.registerFunction(self.somefunction, 'urn:webservice') Adriaan Renting| Email: [EMAIL PROTECTED] ASTRON | Phone: +31 521 595 217 P.O. Bo

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-17 Thread Kay Schluehr
Simon Brunning wrote: > On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > > Which lead me to the question - what's the difference between a library > > and a framework? > > If you call its code, it's a library. If it calls yours, it's a framework. Pretty! I don't think it is an oversimplific

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-17 Thread Antoon Pardon
Op 2005-08-16, Peter Hansen schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Why has one made a difference in search policy for finding a >> variable based on whether the variable is rebound or not >> in the first place. > > Do you really not understand the reason, or do you simply disagree w

Re: Creating a graphical interface on top of SSH. How?

2005-08-17 Thread Alessandro Bottoni
John F. wrote: > I want to write a client app in Python using wxWindows that connects to > my FreeBSD server via SSH (using my machine account credentials) and > runs a python or shell script when requested (by clicking a button for > instance). > > Can someone give me some advice on how to creat

Re: Embedding Python in C, undefined symbol: PyExc_FloatingPointError

2005-08-17 Thread Martin v. Löwis
Simon Newton wrote: > gcc main.c -c -I-I/usr/include -I/usr/include -I/usr/include/python2.4 > -I/usr/include/python2.4 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > gcc main.o -L/usr/lib -lpthread -ldl -lutil > -lm /usr/lib/python2.4/config/libpython2.4.a -o main > > I've tried the above on two

Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Simon Brunning
On 8/16/05, Martijn Brouwer <[EMAIL PROTECTED]> wrote: > Well, I guess making a deep copy of an object is important in many case. > Just try this: > A=[] > B=A > A.append("foo") > print B > > Guess the output. It is: > ['foo'] I remember thinking that this behavior was odd when I learned Java man

Need better way to unpack a list

2005-08-17 Thread Nx
Is there a better solution to following problem : I want to unpack a list into variables the list is created at runtime and I do not know how many items there will be , but I know not more than 25. The list unpacks into variables which are prev. defined as line1,line2line25 which are actually

PyPE 2.1 run problem

2005-08-17 Thread tony . ha
Hello, I have downloaded the PyPE2.1-win-unicode.zip, after unzip it with winzip into PyPE2.1-win-unicode dierctory on window XP. I try to run "pype.exe" by double click on it, but nothing has happen, then when I run it with "run as..." using the right click button. I have the following Message

Re: Need better way to unpack a list

2005-08-17 Thread Peter Otten
Nx wrote: > Is there a better solution to following problem : > > I want to unpack a list into variables > the list is created at runtime and I do not know > how many items there will be , but I know not more than 25. > The list unpacks into variables which are prev. defined as > line1,line2l

Re: Need better way to unpack a list

2005-08-17 Thread Simon Brunning
On 8/17/05, Nx <[EMAIL PROTECTED]> wrote: > I want to unpack a list into variables > the list is created at runtime and I do not know > how many items there will be , but I know not more than 25. > The list unpacks into variables which are prev. defined as > line1,line2line25 which are actually

Python as VBA replacement under Windows?

2005-08-17 Thread Wolfgang Keller
Hello, this is a potentially veeery dumb question, but: - If an application supports VBA as a macro language, - and if you can execute Python code from within a VBA script (how?) - and if the application exposes its VBA scripting interface through COM then it should be perfectly possible to ent

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope'or'module' better?)

2005-08-17 Thread Terry Reedy
"Bengt Richter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yes, the roster model works for me too, but I'm not sure I understand > your > concept of "container/room" ;-) I only meant that if collective objects were containers of objects like rooms are containers of people, t

Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Michael Hudson
Simon Brunning <[EMAIL PROTECTED]> writes: > I think that copy is very rarely used. I don't think I've ever imported it. > > Or is it just me? Not really. I've used it once that I can recall, to copy a kind of generic "default value", something like: def value(self, v, default): if hasattr(

Iterparse and ElementTree confusion

2005-08-17 Thread paul . sherwood
Hi Im trying to parse a large(150MB) xml file in order to extract specific required records. import sys from elementtree.ElementTree import ElementTree root = ElementTree(file=big.xml') This works fine for smaller versions of the same xml file but...when i attempted the above my PC goes to lala

Re: Library vs Framework (was Dr. Dobb's Python-URL!)

2005-08-17 Thread Peter Maas
Simon Brunning schrieb: > On 8/15/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > >>Which lead me to the question - what's the difference between a library >>and a framework? > > > If you call its code, it's a library. If it calls yours, it's a framework. IOW Apache with modpython is a framework

Re: zlib + Windows 32 service problem (ImportError)

2005-08-17 Thread Laszlo Zsolt Nagy
| >| >C:\Python24;C:\Python24\DLLs;c:\Python24\Lib\site-packages\win32;c:\oracle\product\10.1.0\db_1\bin;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\client;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program >| Files\Common Files\GT

Re: Read from stdouton Popen on WinXP?

2005-08-17 Thread fraca7
mhenry1384 a écrit : > I am trying to run a program and filter the output on Windows XP. > Since I want to filter the output, I'd like to read it a line at a time > and only print the lines I care about. > [snip] I had the exact same problem yesterday. This is an obvious use case for the "bufsiz

Re: Embedding Python in C, undefined symbol: PyExc_FloatingPointError

2005-08-17 Thread Simon Newton
On Wed, 2005-08-17 at 09:52 +0200, "Martin v. Löwis" wrote: > Simon Newton wrote: > > gcc main.c -c -I-I/usr/include -I/usr/include -I/usr/include/python2.4 > > -I/usr/include/python2.4 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > > gcc main.o -L/usr/lib -lpthread -ldl -lutil > > -lm /usr/lib/pyt

question about threading

2005-08-17 Thread sinan .
hi i have a program that listens socket connection and serial device. in main program i am creating a socket then calling a class to listen socket under while 1: , class soket(Thread): def __init__(self): Thread.__init__(self) self.host = '127

Re: Gadfly use (Newby)

2005-08-17 Thread Steve Holden
Fredrik Lundh wrote: > "niko" <[EMAIL PROTECTED]> wrote: > >>while using gadfly, got an error that i don't understand. >>Code is as follow : >> cursor = connection.cursor() >> cursor.execute('select id_m from mots where nom_m = "%s"' % nom_m) >> id_m = cursor.fetchall() >> >>Error message : >>File

Re: Making programs work together.

2005-08-17 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > I'm looking to make what's basically a macro for a computer game. But > I want this "macro" to take information from the game itself, so it's > not really a macro. That's exactly a macro as the term is used in e.g. MS Office macros written in VBA etc. Do you have access

Re: Standalone applications ?

2005-08-17 Thread TPJ
Well, I think I must answer to my own post... There is at least one reason to bother with executables. I have just read a message. Someone wanted to run a program written in Python + wxPython. But he has failed. Why? Because the version of wxPython on his system was newer and it's API was differen

Re: List copying idiom was Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Steve Holden
Tom Anderson wrote: > On Tue, 16 Aug 2005, Ron Adam wrote: > > >>Simon Brunning wrote: >> >> >>>On 8/14/05, Martijn Brouwer <[EMAIL PROTECTED]> wrote: >>> >>> I can imagine that *a lot* of libs/scripts use the copy library, >>> >>>I think that copy is very rarely used. I don't think I've ever

Re: Embedding Python in C, undefined symbol: PyExc_FloatingPointError

2005-08-17 Thread en.karpachov
On Wed, 17 Aug 2005 14:29:43 +0800 Simon Newton wrote: > The C program is being built like so: > > gcc main.c -c -I-I/usr/include -I/usr/include -I/usr/include/python2.4 > -I/usr/include/python2.4 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > gcc main.o -L/usr/lib -lpthread -ldl -lutil > -lm /us

looking to GIVE my first oral favor

2005-08-17 Thread Casee
im new to this, i guess you can say im still curious about having extra marital lovers. i've only had 1 encounter with a married man and I loved it so much. its such a strong burning desire now. when I look at men, i'm always wondering how they look nude, or their cock size. basically, i want

Re: socket setdefaulttimeout

2005-08-17 Thread Steve Holden
Sheila King wrote: > I'm doing DNS lookups on common spam blacklists (such as SpamCop..and > others) in an email filtering script. Sometimes, because the DNS server > that is resolving the looksup can go down, it is important to make sure > that the socket doesn't just hang there waiting for a resp

Re: Zope, Python 2.4 pythonScripts import problem

2005-08-17 Thread William Heymann
On Tuesday 16 August 2005 07:09 am, [EMAIL PROTECTED] wrote: > I see that Python 2.4.x does not work with Zope-2-7-6 properly. When I > start zope I get warning that I should recompile my pythonScripts by > executing manage_addProduct/PythonScripts/recompile. I do it and get > list of scripts whoos

PyXML and xml.dom

2005-08-17 Thread Dan
I'm writing a Python program that does some XML parsing, though nothing heavy, and I want to avoid requiring the user to install additional libraries like PyXML. The documentation for my version of Python (2.3.5) mentions PyXML as an additional library while discussing the DOM module

Re: zlib + Windows 32 service problem (ImportError)

2005-08-17 Thread John Machin
Laszlo Zsolt Nagy wrote: > | > >> | >> C:\Python24;C:\Python24\DLLs;c:\Python24\Lib\site-packages\win32;c:\oracle\product\10.1.0\db_1\bin;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\client;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:

Re: Making programs work together.

2005-08-17 Thread John Machin
[EMAIL PROTECTED] wrote: > Example: I'm driving a car in a game and I hit an oil slick so instead > of me having to lift off the throttle button on the keyboard, I want to > make a program to disengage the throttle as long as I'm on that oil > slick. Does that clear anything up? > Yes. -- http

Re: Iterparse and ElementTree confusion

2005-08-17 Thread paul . sherwood
Further to the above I pass my found element 'Product' to ElementTree's handy print all function def print_all(element): root = element #Create an iterator iter = root.getiterator() #Iterate for element in iter: #First the element tag name print "Element:",

Lists of list

2005-08-17 Thread Mohammed Altaj
Hi All I am having problem with delete line if its belong to another one , example ['0132442\n', '13\n', '24\n'] the 2nd and 3rd are already in the first line , how can do this !!! Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterparse and ElementTree confusion

2005-08-17 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > def parse_for_products(filename): > >for event, elem in iterparse(filename): >if elem.tag == "Products": >root = ElementTree(elem) >print_all(root) >else: >elem.clear() > > My problem is that if i pass the 'elem' fo

Re: Urgent: Embedding Python problems - advice sought

2005-08-17 Thread adsheehan
Does anyone have advice on other groups, sites etc that has knowledge of this subject ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: FW: List copying idiom was Re: [Python-Dev] implementation of copystandard lib

2005-08-17 Thread Tom Anderson
On Wed, 17 Aug 2005, Delaney, Timothy (Tim) wrote: > Tom Anderson wrote: > >> When you say [:], do you mean that you copy lists like this: >> >> l = someList() >> m = [] >> m[:] = l > > Forwarded to python-list, where it belongs. The idiom is actually: > > a = [1, 2, 3] > b = a[:] Aha. I'd never

Off-screen rendering in PyOpenGL?

2005-08-17 Thread Matt Feinstein
Poking around in the PyOpenGL tarball... I can see that the wrapper for the WGL pixel format function includes flags for rendering to a bitmap and for hardware acceleration... so maybe I could get hardware-accelerated off-screen rendering under win32.. but what about linux? Matt Feinstein -- Ther

Re: List copying idiom was Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Tom Anderson
On Wed, 17 Aug 2005, Steve Holden wrote: > Tom Anderson wrote: > >> On Tue, 16 Aug 2005, Ron Adam wrote: >> >>> Simon Brunning wrote: >>> On 8/14/05, Martijn Brouwer <[EMAIL PROTECTED]> wrote: > I can imagine that *a lot* of libs/scripts use the copy library, I think th

Re: stopping a python windows service

2005-08-17 Thread DK
I may have taken your code example too literally. I tried putting in the check for 'shutdownEvent.isset()' but it's failing at run time. It's looking for a global variable, I guess. Do I have to register these threads somehow in the beginning? I'm somewhat new to Python so please be patient... -

Re: get the return code when piping something to a python script?

2005-08-17 Thread mhenry1384
Now that I know it's not possible to do what I wanted, I can work around this without a problem. I'll just scan the output of the .exe to determine whether it appears to have failed or not. Thanks to everyone for the info. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need better way to unpack a list

2005-08-17 Thread Nx
> for index, value in enumerate(mylinelist): > getattr(self, "line%d" % (index + 1)).setText(value) Thanks ! This was the line which did it The correct code snippet now reads : # set the lineedits of the QT gui for index,value in enumerate(self.mylinelist): getattr(self, "lineEdit%d" % (i

sys.path and win32 services (was: importerror)

2005-08-17 Thread Laszlo Zsolt Nagy
>Why do you think str() is needed here? > > Because I'm not sure if sys.path was overwritten or changed. Some bad modules could overwrite sys.path with another list. I know I'm paranoid. :-) >Possibly because sys.path can start with '' which is interpreted as the >current directory. Perhaps w

Re: looping list problem

2005-08-17 Thread bruno modulix
Fredrik Lundh wrote: > Jon Bowlas wrote: (snip) >>But I get the following error- Line 5: Yield statements are not allowed. > > > umm. I might be missing something, but I cannot find any trace of that > error message in the Python interpreter source code. it doesn't even look > like a Python tr

Re: get the return code when piping something to a python script?

2005-08-17 Thread chris
I use the following when I have an external command to do: # def doCommand( cmd,forked=False,runFrom=None ): """ Do a command, and return the (stdout+stderr) and the exit status. This was written to work both on Windows and *nix, and

Re: Python as VBA replacement under Windows?

2005-08-17 Thread Thomas Bartkus
"Wolfgang Keller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > this is a potentially veeery dumb question, but: > > - If an application supports VBA as a macro language, > - and if you can execute Python code from within a VBA script (how?) > - and if the application exp

Re: Read from stdouton Popen on WinXP?

2005-08-17 Thread Adriaan Renting
As far as I understand it, the buffering is indeed happening in the .exe, depending on what it "thinks" it's stout is connected to. There's nothing the operating system, or Python can do about it, if the .exe was created using #include . This might help: http://www.cplusplus.com/ref/cstdio/ htt

Re: GUI tookit for science and education

2005-08-17 Thread Thomas Bartkus
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > Mateusz £oskot <[EMAIL PROTECTED]> writes: > > Thank you for any piece of advice in advance. > > Ask yourself why you want a GUI toolkit. Maybe you can write a web > application instead, and use a browser as the GUI.

Re: Python as VBA replacement under Windows?

2005-08-17 Thread Wolfgang Keller
> Because the MS Office suite and a few (very few!) other applications expose > their object models via COM, you can manipulate these programs with Python > and other languages. No applicatoin "supports VBA as a macro language". What I meant was that quite a lot of Windows applications (not only

Re: random seed

2005-08-17 Thread Magnus Lycka
Robert Kern wrote: > random.seed(1234567890) > > is traditional and works just fine. > > Other favorites: > > 3141592653589793 > 2718281828459045 Nothing beats 42! (That was just an exclamation mark in the end, no factorial intended.) 371 is another nice number, since it's its own revers

Testing for presence of arguments

2005-08-17 Thread Madhusudan Singh
Hi I know how to set optional arguments in the function definition. Is there an intrinsic function that determines if a certain argument was actually passed ? Like the fortran 95 present() logical intrinsic ? My required functionality depends on whether a certain argument is specified at all. (Se

Re: GUI tookit for science and education

2005-08-17 Thread Adriaan Renting
Well, I don't think you want to write everything in HTML, but you can certainly have a program in Python/perl/PHP/ASP/java that outputs your user interface in HTML on one side, and maybe talks to Matlab or Root on the otherside to do the actual science/generate the images. I wouldn't advice Excel+V

Re: Testing for presence of arguments

2005-08-17 Thread Peter Decker
On 8/17/05, Madhusudan Singh <[EMAIL PROTECTED]> wrote: > I know how to set optional arguments in the function definition. Is there an > intrinsic function that determines if a certain argument was actually > passed ? Like the fortran 95 present() logical intrinsic ? > > My required functionality

Re: Iterparse and ElementTree confusion

2005-08-17 Thread Steve M
"when i attempted [to load 150MB xml file] my PC goes to lala land, theres much HDD grinding followed by "windows runnign low on virtual memory" popup after 10-15mins. Then just more grinding...for an hour before i gave up" I have had great success using SAX to parse large XML files. If you use ca

Re: Testing for presence of arguments

2005-08-17 Thread Dan Sommers
On Wed, 17 Aug 2005 11:13:03 -0400, Madhusudan Singh <[EMAIL PROTECTED]> wrote: > I know how to set optional arguments in the function definition. Is > there an intrinsic function that determines if a certain argument was > actually passed ? Like the fortran 95 present() logical intrinsic ? d

Re: Testing for presence of arguments

2005-08-17 Thread Benji York
Madhusudan Singh wrote: > I know how to set optional arguments in the function definition. Is there an > intrinsic function that determines if a certain argument was actually > passed ? Like the fortran 95 present() logical intrinsic ? People generally use a value that isn't a valid option, often

Re: Testing for presence of arguments

2005-08-17 Thread Diez B. Roggisch
I don't have the details ready - but in the ASPN cookbook are recipes to e.g. figure insied a function f out how many results the caller of f expects - and act accordingly. This boils down to inspect the call-stack. So it ceratinly is possible. However, I'd say it is almost 100% a design flaw. Or

Re: extending: new type instance

2005-08-17 Thread Michael Hudson
"BranoZ" <[EMAIL PROTECTED]> writes: > I'm writing my own (list-like) type in C. It is implementing > a Sequence Protocol. In 'sq_slice' method I would like to return > a new instance of my class/type. > > How do I create (and initialize) an instance of a given > PyTypeObject MyType ? > > I have t

Re: Python as VBA replacement under Windows?

2005-08-17 Thread Thomas Bartkus
"Wolfgang Keller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Because the MS Office suite and a few (very few!) other applications expose > > their object models via COM, you can manipulate these programs with Python > > and other languages. No applicatoin "supports VBA as a m

Re: Testing for presence of arguments

2005-08-17 Thread Madhusudan Singh
Diez B. Roggisch wrote: > I don't have the details ready - but in the ASPN cookbook are recipes > to e.g. figure insied a function f out how many results the caller of f > expects - and act accordingly. This boils down to inspect the > call-stack. So it ceratinly is possible. > > However, I'd say

Re: Testing for presence of arguments

2005-08-17 Thread Madhusudan Singh
Benji York wrote: > Madhusudan Singh wrote: >> I know how to set optional arguments in the function definition. Is there >> an intrinsic function that determines if a certain argument was actually >> passed ? Like the fortran 95 present() logical intrinsic ? > > People generally use a value that

Re: Testing for presence of arguments

2005-08-17 Thread Madhusudan Singh
Dan Sommers wrote: > On Wed, 17 Aug 2005 11:13:03 -0400, > Madhusudan Singh <[EMAIL PROTECTED]> wrote: > >> I know how to set optional arguments in the function definition. Is >> there an intrinsic function that determines if a certain argument was >> actually passed ? Like the fortran 95 present

Re: Testing for presence of arguments

2005-08-17 Thread Madhusudan Singh
Peter Decker wrote: > On 8/17/05, Madhusudan Singh <[EMAIL PROTECTED]> wrote: > >> I know how to set optional arguments in the function definition. Is there >> an intrinsic function that determines if a certain argument was actually >> passed ? Like the fortran 95 present() logical intrinsic ? >>

Re: SOAP and XMLRPC

2005-08-17 Thread Holger Duerer
> "Daniel" == dcrespo <[EMAIL PROTECTED]> writes: Daniel> Someone knows if is there possible to have a Python SOAP Daniel> or XMLRPC server that works with VB? Sure, why not? What have you tried that didn't work? Getting SOAP libraries to interoperate is often a pain but usually pos

Re: GUI tookit for science and education

2005-08-17 Thread Michele Simionato
1. Mateusz Loskot: >I would like to ask some scientists or students >which GUI toolkit they would recommend >to develop scientific prototypes (for education and >testing some theories). My vote is for ipython + matplotlib. Very easy and very powerful. Michele Simionato -- http://mail.pyt

Re: Urgent: Embedding Python problems - advice sought

2005-08-17 Thread Michael Hudson
[EMAIL PROTECTED] writes: > Hi, > > > I am embedding Python into a multi-threaded C++ application running on > Solaris and need urgent clarification on the embedding architecture and > its correct usage (as I am experience weird behaviors). What version of Python are you using? > Can anyone clar

Re: Urgent: Embedding Python problems - advice sought

2005-08-17 Thread Michael Hudson
[EMAIL PROTECTED] writes: > Does anyone have advice on other groups, sites etc that has knowledge > of this subject ? I've just replied to your original post, having not seen it the first time around. Cheers, mwh -- w00t w00t w00t w00t! I don't understand all of the code, but it works!

SPE 0.7.5.b IDE: New windows installer (with working shortcuts)

2005-08-17 Thread SPE - Stani's Python Editor
Thanks to Jose Galvez, there is a now a working python installer for python2.4 SPE 0.7.5.b now features a remote, encrypted and embedded python debugger of Nir Aides. Stani Spe is a free python IDE with auto indentation & completion, call tips, syntax coloring & highlighting, UML diagrams, class

Obfuscator for Python Code

2005-08-17 Thread codecraig
Is there any obfuscator out there that obfuscates the python code (byte code i guess)??? -- http://mail.python.org/mailman/listinfo/python-list

Re: Obfuscator for Python Code

2005-08-17 Thread Thomas Bartkus
"codecraig" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there any obfuscator out there that obfuscates the python code (byte > code i guess)??? Hmmhh! I know lots of obfuscators for VB, C, and Java. For these languages, it seems to be one of the more popular coding specialtie

Using Python to make Cocoa apps on Mac OS X

2005-08-17 Thread Dave Opstad
FYI: A new article has been posted at the Apple Developer website: http://developer.apple.com/cocoa/pyobjc.html Cheers! Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing for presence of arguments

2005-08-17 Thread Diez B. Roggisch
> I am writing some code for a measurement application (would have used > fortran 95 if a library had been available for linux-gpib, but python is a > lot friendlier than C without the irritating and utterly pointless braces) > where one of the input parameters for the GPIB command is optional, and

win32pipe.popen3

2005-08-17 Thread Jakob Simon-Gaarde
Follow-up on a thread from 1999 (see below) Well now it is 2005 and the operating system I'm using is Windows Server 2003, and I can still see that the same problem persists with: win32pipe.popen2() win32pipe.popen3() win32pipe.popen4() while win32pipe.popen() does almost what you want. >>> imp

Re: Testing for presence of arguments

2005-08-17 Thread Madhusudan Singh
Diez B. Roggisch wrote: > I still don't see why default arguments like None won't do the trick. > If The argument _can_ > be some value (let's say an int) or None, you still could go for a > default value like () or any other value > from a different domain. "None" works perfectly. Someone else o

Re: [Python-Dev] implementation of copy standard lib

2005-08-17 Thread Ron Adam
Michael Hudson wrote: > Simon Brunning <[EMAIL PROTECTED]> writes: > > >>I think that copy is very rarely used. I don't think I've ever imported it. >> >>Or is it just me? > > > Not really. I've used it once that I can recall, to copy a kind of > generic "default value", something like: > > d

Re: Testing for presence of arguments

2005-08-17 Thread Robert Kern
Madhusudan Singh wrote: > Unrelated question, how does one call a fortran 95 subroutine from python ? > I need really high speed of execution for that call (needed for each > measurement point, and is used to calculate some parameters for the > excitation for the next measurement point) and a scri

Re: Obfuscator for Python Code

2005-08-17 Thread Peter Maas
codecraig schrieb: > Is there any obfuscator out there that obfuscates the python code (byte > code i guess)??? http://www.lysator.liu.se/~ast rand/projects/pyobfuscate/ -- --- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49

Re: Obfuscator for Python Code

2005-08-17 Thread Peter Maas
Peter Maas schrieb: > codecraig schrieb: > >> Is there any obfuscator out there that obfuscates the python code (byte >> code i guess)??? > > http://www.lysator.liu.se/~ast rand/projects/pyobfuscate/ Delete space: http://www.lysator.liu.se/~astrand/projects/pyobfuscate/ --

creating/modifying sparse files on linux

2005-08-17 Thread [EMAIL PROTECTED]
Hi, Is there any special support for sparse file handling in python? My initial search didn't bring up much (not a thorough search). I wrote the following pice of code: options.size = 6442450944 options.ranges = ["4096,1024","3,314572800"] fd = open("testfile", "w") fd.seek(options.size-1) f

Python & SQL Server DTS?

2005-08-17 Thread Peter A.Schott
Got a strange issue here. I know that MS allows other scripting languages to run in its ActiveX tasks in DTS. I can change one of the tasks to run Python code, create a Main function, and run it manually. However, once I try to run the entire package, the package hangs at this step. It doesn't

Re: Using for in one-liner

2005-08-17 Thread Reinhold Birkenfeld
BranoZ wrote: > Paul Watson wrote: >> Using a '$' before the string works in the ksh that is part of FC4. >> However, it does not work on the pdksh that is in FC3 and Cygwin. It >> also does not work on AIX ksh. >> >> $ print $'now' >> $now > > In bash you can also use Ctrl-v followed by special

Re: String functions deprication

2005-08-17 Thread Reinhold Birkenfeld
Dan wrote: >> http://www.python.org/doc/2.4.1/lib/node110.html >> >> These methods are being deprecated. What are they being replaced >> with? > > They're being made methods of the string class itself. > > For example: > >>> s = 'any old string' > >>> string.split(s, ' ') # Old way > [

looking to GIVE my first oral favor

2005-08-17 Thread Jennifer
im new to this, i guess you can say im still curious about having extra marital lovers. i've only had 1 encounter with a married man and I loved it so much. its such a strong burning desire now. when I look at men, i'm always wondering how they look nude, or their cock size. basically, i want

Tix cannot open /usr/share/libtix

2005-08-17 Thread dadapapa
Hi, I have a problem getting Tix to run: Python 2.4.1 (#2, Aug 17 2005, 10:19:59) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Tix >>> t = Tix.Tk() Traceback (most recent call last): File "", line 1, in

Re: win32pipe.popen3

2005-08-17 Thread Jakob Simon-Gaarde
Me again. I forgot to mention that readline() in popen2,3 and 4 even locks up the parent-proces though it is called from a thread, so it's a real deadlock. -- http://mail.python.org/mailman/listinfo/python-list

Re: creating/modifying sparse files on linux

2005-08-17 Thread Trent Mick
[EMAIL PROTECTED] wrote] > > Hi, > > Is there any special support for sparse file handling in python? My > initial search didn't bring up much (not a thorough search). I wrote > the following pice of code: > > options.size = 6442450944 > options.ranges = ["4096,1024","3,314572800"] > fd = op

Re: creating/modifying sparse files on linux

2005-08-17 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > options.size = 6442450944 > options.ranges = ["4096,1024","3,314572800"] > fd = open("testfile", "w") > fd.seek(options.size-1) > fd.write("a") > for drange in options.ranges: > off = int(drange.split(",")[0]) > len = int(drange.split(

looking to GIVE my first oral favor

2005-08-17 Thread Lacy
im new to this, i guess you can say im still curious about having extra marital lovers. i've only had 1 encounter with a married man and I loved it so much. its such a strong burning desire now. when I look at men, i'm always wondering how they look nude, or their cock size. basically, i want

Moinmoin config

2005-08-17 Thread Mark
Hi, I have Moinmoin 1.3.4 installed and working on Linux RHEL3.0. However, all screen elements are lined up on the left hand side. How can I get it displayed like the wiki at: http://moinmoin.wikiwikiweb.de/HelpOnConfiguration instead of this ? -> LANShieldOS Release Notes Search: * Mar

Re: Tix cannot open /usr/share/libtix

2005-08-17 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > is there any way to tell python/tkinter/tix where to look for the > library? Try (un)setting TIX_LIBRARY. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: creating/modifying sparse files on linux

2005-08-17 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there any special support for sparse file handling in python? Since I have not heard of such in several years, I suspect not. CPython, normally compiled, uses the standard C stdio lib. If your system+C has a sparseIO lib, you w

Re: Lists of list

2005-08-17 Thread Terry Reedy
"Mohammed Altaj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am having problem with delete line if its belong to another one , > example > ['0132442\n', '13\n', '24\n'] > the 2nd and 3rd are already in the first line , how can do this !!! You have a list of strings, not a li

Re: creating/modifying sparse files on linux

2005-08-17 Thread [EMAIL PROTECTED]
Thanks for the info on xrange. Writing single char is just to get going quickly. I knew that I would have to improve on that. I would like to write chunks of 1MB which would require that I have 1MB string to write. Is there any simple way of generating this 1MB string (other than keep appending to

Re: creating/modifying sparse files on linux

2005-08-17 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Thanks for the info on xrange. Writing single char is just to get going > quickly. I knew that I would have to improve on that. I would like to > write chunks of 1MB which would require that I have 1MB string to > write. Is there any

Re: GUI tookit for science and education

2005-08-17 Thread Mateusz Łoskot
Thomas Bartkus napisał(a): > "Paul Rubin" wrote in message > > I would take MS Excel/VBA as the premier fat client prototyping tool/GUI > toolkit for science & education. How would one go about replicating any of > that in an HTML/browser app? How do we get to "easier t

Re: Moinmoin config

2005-08-17 Thread Patrick Down
Mark wrote: > Hi, > > I have Moinmoin 1.3.4 installed and working on Linux RHEL3.0. However, > all screen elements are lined up on the left hand side. How can I get > it displayed like the wiki at: Well, this is probably a better question for the moin lists but I have seen this behavior before.

Re: GUI tookit for science and education

2005-08-17 Thread phil
> As I said, I'm looking for multiplatform solution. > So, I will go with Python, Tk and C++ (for algorithm and critical parts > of applications). Tk is simple, very simple, Python I like, C++ I love, > as I'm professional C++ programmer. Good choice! -- http://mail.python.org/mailman/listinfo/

Re: Lists of list

2005-08-17 Thread BranoZ
Mohammed Altaj wrote: > Hi All > > I am having problem with delete line if its belong to another one , example I think, you mean to remove all lines that are substrings of another line. l = ['0132442\n', '13\n', '24\n'] l = [e.strip() for e in l] i = 0 while True: try: for j in range(len(l

List of strings

2005-08-17 Thread Mohammed Altaj
Hi All Thanks for your reply , what i am doing is , i am reading from file , using readlines() , I would like to check in these lines , if there is line belong to another one or not , if it is , then i would like to delete it ['0132442\n', '13\n', '24\n'] '13' is already in '0132442' '24' is al

Re: Moinmoin config

2005-08-17 Thread Mark
Hi Patrick, Sorry about the cross post, but I could not find a moin list. Do you have a sub folder or a better name? I searched for moin and for wiki but only found some actual wikis and some groups with only a few members. Anyway, I checked my data_underlay_dir and it is valid and contains one

Re: PyXML and xml.dom

2005-08-17 Thread uche . ogbuji
> Is PyXML now part of the Python distribution, or is it still an add-on? Parts of PyXML have been migrated into Python core since Python 2.0, but there is still also a standalone PyXML package.,. See: http://www.xml.com/pub/a/2002/09/25/py.html -- Uche http://copia.ogbuji.net -- http://mail

  1   2   >