User Profile

Collapse

Profile Sidebar

Collapse
fuffens
fuffens
Last Activity: Jun 27 '07, 11:13 AM
Joined: Oct 26 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • fuffens
    replied to Infinite loop in python
    Well...

    Code:
    while(True):
        pass
    for an infinite loop that does nothing and

    Code:
    while(some condition):
        pass
    for some other condition

    BR
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to text file to excel(*.txt to *.xls)
    You can also check this previous post:
    http://www.thescripts.com/forum/thread555153.html

    BR
    /Fredrik...
    See more | Go to post

    Leave a comment:


  • fuffens
    started a topic Python and Eclipse

    Python and Eclipse

    Hi!

    Does anyone here have experience with Python in Eclipse environment? I have downloaded the Pydev plug-in for Eclipse. I like the editor and I find it very useful to be able to add files in a project and easily navigate between the files. I can start a Python interactive window. However, the Python interactive window does not keep varibles in memory from the Python scripts that I run. Also, when I debug I want to be able to set...
    See more | Go to post

  • fuffens
    replied to What is your OS and Python Version
    At work I am using Windows 2000, Python version 2.2.1, and PythonWin. We're locked to version 2.2.1 of Python because of external dependencies. At home I am using Win XP Pro, Python version 2.2.1 and 2.5, and PythonWin. I'm looking into using Eclipse as IDE. I will be back with questions regarding that later. I just need to do some investigation myself first.

    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to making local variable work???? Help
    Code:
    from math import *
    
    def menu():
        print "\nSlect one of the following:"
        print "1. Calculate Area of Rectangle"
        print "2. Calculate Area of Circle"
        print "3. Quit"
        menuSel=input("Please enter your selection: ")
        while menuSel!=1 and menuSel!=2 and menuSel!=3:
            menuSel=input("Please re-enter a valid selection
    ...
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to Checking an object type
    This is quite strange. Obviously p1 is an object from the result of isinstance(p1, types.ObjectTyp e) and one would think that Point is a class. But it could be that Point() is an object factory function that returns an object. Unfortunately, type does only say instance and not the type of class.

    BR
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to Checking an object type
    Hi bvdet!

    Can you specify what's not working with the isinstance expression? I do not have the point module so I created this simple script

    Code:
    class A:
        pass
    
    a1=A()
    aList = [a1, a1, a1]
    for a in aList:
        print isinstance(a, A)
    Here all a in the list are instances of A. I am using version 2.2.3 of Python.
    Best regards
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to coding exponent
    Thanks bvdet! I knew there was a better way than to use pow, but I couldn't remember it.

    BR
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to Variable error??? Need Help
    In order for length to be global in the calculate function it must global the tableOrder function as well. But you really should not be using global variables unless you really have to (or writing something so simple that it doesn't matter).

    BR
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to coding exponent
    Code:
    import math
    P * math.pow((1 + r), n)
    BR
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to numarray installation problems
    I was assuming you're using Windows from your other posts...
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to numarray installation problems
    If you don't want to build the package, download the exe file for Windows instead.

    BR
    /Fredrik
    See more | Go to post

    Leave a comment:


  • On a Windows system you just add the folder of the Python executable to your Path environment variable.

    1. Go to Control Desk
    2. Select System
    3. In System Properties, select Advanced tab
    4. Select Environment Variables
    5. Edit your Path variable. Add C:\python25 to the list of paths.

    You might have to restart your computer in order for it to work.
    Best Regards
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to write md5 to file
    There is an Excpect implementation for Python called Pexpect. It can be used to interact with os calls.

    http://pexpect.sourceforge.net/

    But of course there has got to be a better way either to pass the password to the linux command or to use the md5 Python implementation.

    Can you please publish a normal Grub password file and one generated from Python that Grub cannot read?

    Best regards...
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to search a part in a string
    Code:
    mailMsg = ['Return-Path: <Louisette.Snoekx@123.com>', 'Delivered-To: 3-marc.jonkers@456.com', 'From: "louisette snoekx" <Louisette.Snoekx@123.com>', 'To: <marc.jonkers@456.com>', 'References: <20060919215507.cvi40klhf1q8884k@webmail.456.com>', 'Subject: Gelezen: workshop 15/10 essen', 'Date: Sun, 5 Nov 2006 22:05:53 +0100']
    subjectStr = 'Subject:'
    subject = []
    for item in mailMsg:
    ...
    See more | Go to post

    Leave a comment:


  • On a linux/unix system I would always use Cron for periodic tasks like this instead of running your own Python script to control execution of other Python scripts and c-programs. There are several implementations of Cron on Windows also. Just Google for cron and windows (http://www.cronforwindows.com/ for example).

    BR
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to creating test suites
    Try to use
    Code:
    unittest.TextTestRunner(verbosity=2).run(suite)
    instead of
    Code:
    unittest.main()
    to see if it makes any difference.

    BR
    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to automate testing a website/page
    Ok. I have looked at the code for PAMIE. All the functions above can be called without parameters. The default value of filter is None. They will return a list of components of the specified type.
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to automate testing a website/page
    No, look at the documentation. There are several different functions that return a list of components based on a filter. textBoxesGet(), textAreasGet(), tablesGet(), and radioButtonsGet () are some examples. I don't know how they define [filter], but if you can use an empty filter you should be able to get all components of one type.

    /Fredrik
    See more | Go to post

    Leave a comment:


  • fuffens
    replied to automate testing a website/page
    One more thing... Read this article

    http://agiletesting.blogspot.com/200...on-part-1.html

    The MaxQ tool seems pretty cool. It will let you record web gui operations and generates a Jython script of all http requests.

    OK, maybe it doesn't quite qualify for a system test, but on the other hand tools like Pamie and using COM for IE will only test the system with the IE browser....
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...