Re: Tkinter and gnuplot module

2005-08-17 Thread ncf
Because Tkinter is for GUI development on systems, and thereof, there is no plugin for browsers, I do not believe it to be possible to use Tkinter in a client's browser. If gnuplot.py allows you to save a plot to disk or get the plot's image file as a binary string, it should be possible to send a

online interpreter

2005-08-17 Thread apa
Hello! Does anyone knows an online python interpreter?. A time ago a found one, but lost the url and cannot find it back anymore. Thanks in advance Alejandro -- http://mail.python.org/mailman/listinfo/python-list

Re: Obfuscator for Python Code

2005-08-17 Thread fuzzylollipop
i guess you didn't find anything using Google? -- http://mail.python.org/mailman/listinfo/python-list

Re: As Simple As Possible?

2005-08-17 Thread Jules Dubois
On Wednesday 17 August 2005 22:11, jitya <[EMAIL PROTECTED]> (<[EMAIL PROTECTED]>) wrote: > Chuck Allison says: > > After three years of study, I have concluded that Python is about > as simple as a full-powered object-oriented language can get. My inner > programmer just loves it. > [snip c

Re: question about binary and serial info

2005-08-17 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > yeah, i think i got that down, i need help with getting the hex to > binary, then splitting the byte up to compare each bit against the bit > in another byte. The & operator does all 8 comparisons simultaneously. So if the serial port byte is A, the reference byte is B

Tkinter and gnuplot module

2005-08-17 Thread Titi Anggono
Hi all, I have some questions: 1. Can we use Tkinter for web application such as Java ? 2. I use gnuplot.py module for interfacing with gnuplot in linux. Can we make the plot result shown in web ? I tried using cgi, and it didn't work. Thanks _

Re: Read from stdouton Popen on WinXP?

2005-08-17 Thread jcarlson
> >>> "mhenry1384" <[EMAIL PROTECTED]> 08/16/05 11:48 PM >>> > 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. > > p = subprocess.Popen(["doxygen.exe", r"Doxyfile.cfg

Re: GUI tookit for science and education

2005-08-17 Thread Robert Kern
John Hunter wrote: >>"Robert" == Robert Kern <[EMAIL PROTECTED]> writes: > > > Robert>H = U*D*V.T > > Robert> then I'm more than happy with that tradeoff. The small > Robert> syntactic conveniences MATLAB provides are dwarfed by the > Robert> intrinsic power of Python. >

up to date books?

2005-08-17 Thread John Salerno
hi all. are there any recommendations for an intro book to python that is up-to-date for the latest version? would reading a book from a year or two ago cause me to miss much? thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: question about binary and serial info

2005-08-17 Thread nephish
yeah, i think i got that down, i need help with getting the hex to binary, then splitting the byte up to compare each bit against the bit in another byte. unless i am not understanding this stuff with the bitwise right. there wasn't a lot in the python library reference about it. thanks -- http:/

As Simple As Possible?

2005-08-17 Thread jitya
Chuck Allison says: After three years of study, I have concluded that Python is about as simple as a full-powered object-oriented language can get. My inner programmer just loves it. In a recent interview Scott Meyers was asked which language he thought would be ideal for introducing programm

Re: GUI tookit for science and education

2005-08-17 Thread John Hunter
> "Robert" == Robert Kern <[EMAIL PROTECTED]> writes: Robert>H = U*D*V.T Robert> then I'm more than happy with that tradeoff. The small Robert> syntactic conveniences MATLAB provides are dwarfed by the Robert> intrinsic power of Python. Of course, U*D*V (transpose omitted

Re: question about binary and serial info

2005-08-17 Thread Jordan Rastrick
Sounds like you want the bitwise and operator, & >>> 2 & 3 2 >>> 32 & 16 0 >>> 31 & 12 12 etc. [EMAIL PROTECTED] inquired: > i have an interesting project at work going on. here is the challenge. > i am using the serial module to read data from a serial input. > it comes in as a hex. i need to m

Re: win32pipe.popen3

2005-08-17 Thread Nicolas Fleury
Jakob Simon-Gaarde wrote: > 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 win32pi

Re: List of strings

2005-08-17 Thread Paul Watson
Mohammed Altaj wrote: > 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'] >

question about binary and serial info

2005-08-17 Thread nephish
i have an interesting project at work going on. here is the challenge. i am using the serial module to read data from a serial input. it comes in as a hex. i need to make it a binary and compare it bit by bit to another byte. They have some weird way they set this up that i have to compare these th

Re: stopping a python windows service

2005-08-17 Thread Peter Hansen
DK wrote: > 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. Or perhaps "it" is just looking for correct capitalization, since Python is case sensitive. Try sh

Re: Library vs Framework

2005-08-17 Thread Mike Meyer
Peter Decker <[EMAIL PROTECTED]> writes: > On 8/16/05, Mike Meyer <[EMAIL PROTECTED]> wrote: > >> Well, they may have created a library class that does the job for >> them. Figuring out which is which seemed to be the point of this >> thread. > > I guess my summary of the thread was that a library

Re: GUI tookit for science and education

2005-08-17 Thread Robert Kern
James Sungjin Kim wrote: > Robert Kern wrote: > >>... Once you move outside of that box and start doing real >>programming, Python (with Numeric, ipython, matplotlib, scipy, et al.) >>beats MATLAB handily. > > As one who is really newbie on Python, In MATLAB we can represent the > codes for the

ANN: Python training, 2005 Aug 29-31, San Francisco

2005-08-17 Thread Wesley Chun
hi all, just a reminder that our next Python training course is less than 2 weeks away! details can be found at http://cyberwebconsulting.com (click "Python training"). if you're interested in joining us near San Francisco, sign up soon as there's only room for 9 more people!! contact us at cybe

Re: GUI tookit for science and education

2005-08-17 Thread James Sungjin Kim
Robert Kern wrote: > ... Once you move outside of that box and start doing real > programming, Python (with Numeric, ipython, matplotlib, scipy, et al.) > beats MATLAB handily. As one who is really newbie on Python, In MATLAB we can represent the codes for the matrix manipulation as really like

Re: creating/modifying sparse files on linux

2005-08-17 Thread Bengt Richter
On 17 Aug 2005 11:53:39 -0700, "[EMAIL PROTECTED]" <[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.range

Re: Lightweight Python distribute it in under 2MBs for Win32

2005-08-17 Thread Ramza Brown
fred.dixon wrote: > 30meg for wx ? > mine is under 3meg, compressed > Can I have a copy of that? Windows version? -- Ramza from Atlanta http://www.newspiritcompany.com -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI tookit for science and education

2005-08-17 Thread John Hunter
> "James" == James Sungjin Kim <[EMAIL PROTECTED]> writes: James> Michele Simionato wrote: >> My vote is for ipython + matplotlib. Very easy and very >> powerful. James> Is it really easier than to use MATLAB(TM)? Do you find matlab easy to use? What aspects are hard or easy

Re: GUI tookit for science and education

2005-08-17 Thread Robert Kern
James Sungjin Kim wrote: > Michele Simionato wrote: > >>My vote is for ipython + matplotlib. Very easy and very powerful. > > Is it really easier than to use MATLAB(TM)? If you're only doing exactly the things that MATLAB or one of its toolkits was designed to do, then MATLAB will probably be s

Re: GUI tookit for science and education

2005-08-17 Thread James Sungjin Kim
Michele Simionato wrote: > My vote is for ipython + matplotlib. Very easy and very powerful. Is it really easier than to use MATLAB(TM)? -James -- http://mail.python.org/mailman/listinfo/python-list

Re: Moinmoin config

2005-08-17 Thread Jorge Godoy
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: Mark, Mine looks like yours when I have problems with some Apache process. I haven't tracke

GIS Related Scripting Issue

2005-08-17 Thread Mike Rose
I am currently using ArcGIS 9.1 and was referred to this list to ask my question.  I am using a python script to loop through a series of features, select all polygons that are within 5 miles, run statistics on those selected polygons, then append the values to a new database(dbf).  I am no

Re: creating/modifying sparse files on linux

2005-08-17 Thread François Pinard
[EMAIL PROTECTED] > Is there any simple way of generating this 1MB string (other than keep > appending to a string until it reaches 1MB len)? You might of course use 'x' * 100 for fairly quickly generating a single string holding one million `x'. Yet, your idea of generating a sparse file is

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

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

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: 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

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: 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 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: 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: 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: 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 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: 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

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

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

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(

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: 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

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

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

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 > [

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

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

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

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/ --

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: 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: [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 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

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 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

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: 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

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

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

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!

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: 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: 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: 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: 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
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
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: 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: 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: 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: 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 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: 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 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: 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

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: 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

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: 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: 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: 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: 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: 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

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: 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

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: 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: 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

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: 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

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: 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

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 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:",

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: 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:

  1   2   >