User Profile

Collapse

Profile Sidebar

Collapse
Sushi
Sushi
Last Activity: Jun 10 '07, 09:56 PM
Joined: Dec 23 '06
Location: England!
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sushi
    started a topic Detecting change in value

    Detecting change in value

    Heyo all again!

    I was wondering how to get python to detect a change in value? Basically I have a loop where its looking at data from somewhere and assigning it to a. I want python to be able to see if a changes and tell me (e.g.print 'ooo it changed'). Ive been looking around, and searched these forums, but couldn't find anything. Its probably very simple but my head's not working today.

    Thanks!
    Mel
    See more | Go to post

  • Sushi
    replied to Reading from file to multiple lists
    Ah brilliant!
    Thanks Bvdet!
    See more | Go to post

    Leave a comment:


  • Sushi
    replied to Reading from file to multiple lists
    Right I've had some time to look at these codes.



    I think I understand the code, but cannot work out how to assign the list names so I can recall them later. I tried using some of bvdet code but ended up applying a line as a list:
    Code:
    data = open("C:\Documents and Settings\Mel\Desktop\Python2\Blender\cameratrack.txt").read().split("\n")
    result = [ eval(i.replace("(",",").replace(")",""))
    ...
    See more | Go to post

    Leave a comment:


  • Sushi
    replied to Sample code for Profiler
    I couldnt help with your other questions but I thought I might try to help with this.

    I wasnt entirely sure what you meant but thought this website might help:
    http://www.onlamp.com/pub/a/python/2005/12/15/profiling.html

    or the page from the python library site:
    http://docs.python.org/lib/profile.html

    sorry if I completely misunderstood what you wanted!
    See more | Go to post

    Leave a comment:


  • Sushi
    replied to Reading from file to multiple lists
    Thanks for all the input guys!

    I will have to have a proper look at the codes (i dont fully understand some of them on first glance) but will pop back if I have any queries!
    Thanks again!
    Mel
    See more | Go to post

    Leave a comment:


  • Sushi
    replied to Reading from file to multiple lists
    Ah I see, that makes it neater. Will incorporate that into my code. Thanks barton!
    See more | Go to post

    Leave a comment:


  • Sushi
    started a topic Reading from file to multiple lists

    Reading from file to multiple lists

    Hello again all! (and happy easter if you are that way inclined)

    I have this file called cameratrack.txt :
    Code:
    0  (0  ,0  ,0  )
    5  (5  ,0  ,0  )
    10 (10 ,0  ,0  )
    15 (15 ,5  ,0  )
    20 (20 ,10 ,0  )
    25 (25 ,15 ,0  )
    30 (30 ,20 ,5  )
    35 (30 ,25 ,10 )
    40 (30 ,30 ,15 )
    45 (30 ,30 ,20 )
    50 (30 ,30 ,25 )
    And basically it is frame numbers...
    See more | Go to post

  • When I searched Google for Python Forum TheScripts came up 11th - you've lost one place :O
    Im not sure clicking on the link improves its position though. Isnt it more to do with if your page meets certain standards etc? I could be wrong, I don't really know how search engines work :S

    Edit - on that note this was quite an interesting read:
    http://www.thesitewizard.com/archive/google.shtml...
    See more | Go to post

    Leave a comment:


  • Sushi
    replied to Change from an integer to a decimal
    Thank you all very much for your help!
    I wasn't floating both numbers, only the ones that were being read in from the file which is why it wasnt working. So again many thanks for the help!

    Barton: Good to be back! I've been working on using Blender quite a lot, and whilst it's a very nice piece of software isnt exactly the easiest thing to use with python!

    Mel
    See more | Go to post

    Leave a comment:


  • Sushi
    started a topic Change from an integer to a decimal

    Change from an integer to a decimal

    Heyo all,

    Having a problem which seems really stupid but I just cant solve it.

    Im reading in a number of integers from a file e.g. 179, 23, 56
    I then have to divde them by 255, but when I do I only ever get values of 0 or 1 rather than something like 0.56, 0.79. I thought I could just convert the number to a float before dividing it e.g a = 179 therefore float(a), but that doesnt seem to work, and Ive looked about...
    See more | Go to post

  • Sushi
    replied to Python with Blender
    Aw no worries!

    If people are interested in 3D graphics Blender is a great free program! Also if you like playing about with python there's a lot of stuff you can do with it.
    See more | Go to post

    Leave a comment:


  • Sushi
    started a topic Python with Blender

    Python with Blender

    Firstly, this forum has grown a lot since I was last here! Which is good :)

    I have a query about scripting in the program Blender, but thought I should ask if anyone has experience with Blender first? I went on the Blender forums to ask, but they weren't very helpful, and in fact looking at other posts some of them are just plain rude!

    Thanks!
    Mel
    See more | Go to post

  • Sushi
    replied to Tkinter XMas Graphics
    Heehee I love this! Very Christmassy.
    Can't say I understand all the code, but I'm going to have a go at trying to understand it!
    Hope you all had a lovely christmas(or other holiday you may have), and are enjoying the rest of the holidays.
    See more | Go to post

    Leave a comment:


  • Sushi
    replied to Changing Colour with a Button
    I don't generally work on christmas(in fact I never), but whilst waiting for the cheesy xmas tv I had a burst of enlightenment as to why the code wasn't working. Simply, the answer was there are 2 canvases and it was the wrong canvas being told to change.

    I now have 2 versions, the first where the new buttons are in the existing frame which looks messy, and the second where their on their own canvas and it looks tidier
    ...
    See more | Go to post

    Leave a comment:


  • Sushi
    replied to Changing Colour with a Button
    Thanks for the quick reply Barton!

    The code doesn't seem to work on my system I'm afraid. When I click on the 'change colour' button I just get printed:

    change color of item #1
    ''

    Also you said 'This is how it is done in the docs'. Not wanting to sound dim but what docs do you mean?
    I'll have a tinker with the code to see if I can get something from it!

    Mel
    See more | Go to post

    Leave a comment:


  • Sushi
    started a topic Changing Colour with a Button

    Changing Colour with a Button

    Hello!
    I'm new to the Python language(about 2 months). Having done C programming for 2 years I find out I need Python for a final project, and have been trying to do get my head around object oriented programming. At the moment I'm simply trying to get the colour of a circle to change when you press a button. I've got this so far:

    Code:
    from Tkinter import *
    
    class Op:
        
        def __init__(self,
    ...
    See more | Go to post

  • Sushi
    replied to What is your OS and Python Version
    I'm on Windows XP
    Use Python Version 2.4 (enthon python)
    Aswell as:
    Vtk 5.0
    Tkinter3000
    I edit with Eclipse
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...