473,804 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
8
15,106
thread by: Terry Gray | last post Jul 18 '05 by: baiste
Using Python 2.2 in Debian linuxI am trying to change to a different directory, execute a 'make all' command, and redirect the output of the subshell to a PyQt window... I should be able to execute the os.system('cd newdirectory; make all'), but how do I redirect stdout of the new subshell created by the os.system call? Any help would be...
0
1,242
thread by: pmaupin | last post Jul 18 '05 by: pmaupin
Recently I found out the hard way that __coerce__ is not automatically called for new classes. This means that, at least for me, a 'UserInt' module is eminently useful, for objects which can be used in expressions where a numeric result is desired. Googling for 'python UserInt', I found a few close things, some far-away things, and a...
8
10,707
thread by: Orange Free | last post Jul 18 '05 by: Alex Martelli
I want to create a program that will ask a user a series of questions and then generate a Microsoft Word document whose content is dictated by the answers. I am not a professional programmer, and I understand only a little about OO programming. Should I a) stick to -- *gasp* -- Visual Basic to accomplish my goal; b) use Python, with...
4
3,182
thread by: Glenn Reed | last post Jul 18 '05 by: Alexander Schmolck
This is just a general comment after trying my hand at some serious python programming for the first time. Have played with it for some time but this is the first serious thing I've done with it. (By serious I mean 650 lines of python code written for a client). The version of Python is the ActiveState version for Windows which included...
2
4,224
thread by: Srinath Avadhanula | last post Jul 18 '05 by: Srinath Avadhanula
Hello, I am wondering if QT has something like QWaitForNextEvent() function. This function would block execution of the application till another key was pressed and then return the event which occured. Would like to utlize this in a small application I am building: I am trying to create vi key-bindings for a simple QMultiLineEdit
3
1,845
thread by: Searchsa | last post Jul 18 '05 by: John Roth
I want to use Outlook to read the message of this news group, but every time the Outlook say it cann't find the host, what happened? And how to sovle it?
1
1,602
thread by: andy | last post Jul 18 '05 by: Terry Reedy
I wan't to write a small compiler for a small language with some experimental features. I want the target to be portable. I'm evaluating both JVM and Python Virtual Machine, both of which seem to be appropriate. I have found that the format of the "JVM machine language" (i.e. class files) is well documented. However I was not able to find some...
2
11,553
thread by: Richard Wesley | last post Jul 18 '05 by: Richard Wesley
I am trying to set the mod date on a file (Linux) as part of a unit test run. I can just wait one second, but that slows the test down. A better solution would be to tweak the mod date on a file, but os.path does not seem to have setmtime. Is there any simple way to do this? TIA, --
5
4,776
thread by: Bart Simpson | last post Jul 18 '05 by: logistix at cathoderaymission.net
Hi, I want to control 'Scheduled Tasks' in Windows 2003 by python program. But I couldn't find any Python module about win32 'Scheduled Tasks'. I could find only Perl module about it. (see http://taskscheduler.sourceforge.net) But, I want to control 'Scheduled Tasks' by python :) Is there any python module about win32 'Scheduled...
0
1,520
thread by: Dave | last post Jul 18 '05 by: Dave
I just downloaded the new rpm's for Python2.3.2, from http://www.python.org/2.3.2/rpms.html and installed all five on my Redhat 9 system. As expected, this leaves the existing Python2.2 in place for all the system routines which depend on it, and makes the new Python available in /usr/bin/python2.3. Unfortunately, IDLE doesn't start...
4
10,605
thread by: Paul Gardella | last post Jul 18 '05 by: Dave Kuhlman
Folks, Does anyone know of a Python module for building organization charts? I've looked at gdchart and JPGraph, but neither of them do org charts, as far as I can tell. Seems it can be done with wxOGL in wxPython, but that's the brute force approach. Any other options? Thanks. Paul Gardella
5
4,765
thread by: carljohan.rehn | last post Jul 18 '05 by: Patrick Useldinger
I would like like to start doing some GUI-programming in Python, but don't know which library to choose. Tkinter seems a bit old. Correct me if I am wrong! The layout doesn't look as nice as for the others. wxPython seems to be the first-hand choice for people doing W32-programming (with MFC-experience). PyGtk seems to be a modern,...
23
2,853
thread by: sashan | last post Jul 18 '05 by: Stephen Horne
I'm a Python newbie. I have been using c++ for 5 years and before that I was programming in Pascal. The one thing that annoys me about python is dynamic typing because I find myself making typographical errors of the sort that would under C++ be picked up by the compiler at compiler time. With Python I have to wait for the error to appear at...
0
1,420
thread by: Amitpython | last post Jul 18 '05 by: Amitpython
Hello, I'm new to Python, and have not come accross any module or any interface developed for Tandem database. Is there one developed yet, or has someone wrote one which I can use? Any help will be greatly appreciated... Thanks, Amit.
0
1,023
thread by: Daniel Ortmann | last post Jul 18 '05 by: Daniel Ortmann
Options are decided statically at program-creation time, yet parser.add_option() needs to be called at *runtime* to build the options. This would be corrected if OptionParser() processed an optional data structure of nested options. The current behavior would still be available. (P.S. Would it make sense to have a module-level...
1
1,670
thread by: Rachel.Vaudron | last post Jul 18 '05 by: Michael Peuser
Hi, After a long time searching into the downloadable documentations, I wonder if there's a dialog addition to Tkinter witch launch a print box? I have searched in the module FWIW, where I have found askopenfile(), etc... but nothing like askprint(). Thanks a lot for your help.
1
1,441
thread by: Johan Fredrik Ohman | last post Jul 18 '05 by: Jp Calderone
Hi, I'd like to use the newest interpreter if available. I tried a little bash scripting, but with no success. Is there some easy way to check a list of possible interpreters and path, and when found run the script with that program? Something like this: #!/usr/bin/python2.3 If not found: #!/usr/bin/python2.2
4
1,507
thread by: Lee Harr | last post Jul 18 '05 by: Lee Harr
Hi; I am wondering if this is a reasonable thing to do: class Pinger: def go(self, repeat=False): if repeat is True: repeat = -1 elif repeat is False:
5
2,932
thread by: Quentin Crain | last post Jul 18 '05 by: Bengt Richter
Hello All! Could someone explain (links are good too!) why: >>> 1+"1" Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: unsupported operand types for +: 'int' and 'str' >>> 1=="1"
1
1,487
thread by: Joe Green | last post Jul 18 '05 by: Gerrit Holl
I have been wondering why we have Long integers as a seperate type: import sys a=sys.maxint+1 # gives 2147483648L <- coerced to Long a=2147483648 # gives 2147483648L <- coerced to Long so the first question is: what is the point of the L in a=2147483648L ? and: a-=a #gives 0L
0
2,291
thread by: Piotr Legiecki | last post Jul 18 '05 by: Piotr Legiecki
Hi How can I read and transform (in various ways) 16 bit tiff images using python? It looks like PIL does not support such images. Those 16bit images are RAW data files directly from scanner (in tif format of course) and I'd like to modify them in a 16 bit resolution where gimp does not help me. Regards Piotr Legiecki
1
2,517
thread by: Jane Austine | last post Jul 18 '05 by: Martin v. Löwis
Is turning both re.UNICODE _and_ re.LOCALE flags on valid in Python 2.3? Doesn't it conflict each other? What is the semantics? Playing with \w and \b with both the flags on, it seemed re.UNICODE is ignored.
2
2,078
thread by: Marc | last post Jul 18 '05 by: Andrew Dalke
Hi all, I have a problem with managing the interchange between COM/Excel and Python if the user closes the workbook externally. Everything works fine as long as the user only uses the exit keys I've provided to close the Excel apps and COM interfaces. But I really need the ability to manage the workbook if someone closes it using the...
10
3,266
thread by: 2mc | last post Jul 18 '05 by: David Mertz
I'm new to Python and to Numerical Python. I have a program written in another program that used arrays extensively. I'm trying to convert to Python. Assume an array in Numerical Python, the contents of which are the daily open, high, low, and last prices of the DOW Jones Industrial Average for its entire history. How would one iterate...
5
1,689
thread by: Bob van der Poel | last post Jul 18 '05 by: Dave Benjamin
There was a thread a few days ago about populating a dict/list. I've got a bit of bottleneck in my program so grabbed the ideas and did a timing test.... ---------- import time import random # Test of various methods to add an item to a list in a dict.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.