Search Results

Search found 9 results on 1 pages for 'awegawef'.

Page 1/1 | 1 

  • GAE AttributeError

    - by awegawef
    My GAE app runs fine from my computer, but when I upload it, I start getting an AttributeError, specifically: AttributeError: 'dict' object has no attribute 'item' I am using the pylast interface (an API for last.fm--link). Specifically, I am accessing a list of variables of this type: SimilarItem = _namedtuple("SimilarItem", ["item", "match"]) I have a variable of this type, call it sim, and I am trying to access sim.item when I get the attribute error. I should note that I am using Python 2.6 on my computer, and I understand that GAE runs on Python 2.5. Would that make a difference here? I thought they were backwards-compatible. Lastly, I think it could be a possible problem with the modules that pylast imports--maybe they don't work with GAE or something? I did some research but I didn't get any results. Here are the imports: import hashlib import httplib import urllib import threading from xml.dom import minidom import xml.dom import time import shelve import tempfile import sys import htmlentitydefs I would appreciate any help with this frustrating issue. Thanks in advance.

    Read the article

  • RTS AI: where to start?

    - by awegawef
    I'd like to begin tinkering around with an RTS AI, but I'm having trouble finding a good environment to work with, ie a game that has been already created. I have looked at Spring RTS and Bos Wars, but they don't seem to be conducive to creating simple examples. I am not totally opposed to writing my own game environment, it would just take a long time. Does anyone have a suggestion as to how I can get my feet wet without programming my own game?

    Read the article

  • Event Handling in Chaco

    - by awegawef
    When hovering over a data point in Chaco, I would like a small text box to appear, with the text I desire. Also, when I click on a data point (or close enough), I would like my program to take a certain action. I have seen relevant parts of the Chaco documentation, but implementing them has proved difficult. Any help would be appreciated. Thanks.

    Read the article

  • Running Multiple Google App Engine Apps from one Domain

    - by awegawef
    I would like to have the following: myrootsite.appspot.com myrootsite.appspot.com/app1 myrootsite.appspot.com/app2 etc. Is this possible? I know I could just make /app1 be handled by app1, but then the redirects and everything wouldn't work unless I explicitly used redirect('/app1') instead of the current redirect('/'). Is there a way I can just upload my current apps (app1, app2, etc.) to the root site and have them work regularly? Thanks in advance

    Read the article

  • Scraping data from Flash (Games)

    - by awegawef
    I saw this video, and I am really curious how it was performed. Does anyone have any ideas? My intuition is that he scraped pixels from the screen (one per 'box'), and then fed that into some program to determine the next move. Is scraping pixel-by-pixel the way to do this, or is there a better way? I am looking to do something similar with either Java or Python. Thanks

    Read the article

  • Efficiently Serving Dynamic Content in Google App Engine

    - by awegawef
    My app on google app engine returns content items (just text) and comments on them. It works like this (pseudo-ish code): query: get keys of latest content #query to datastore for each item in content if item_dict in memcache: use item_dict else: build_item_dict(item) #by fetching from datastore store item_dict in memcache send all item_dicts to template Sorry if the code isn't understandable. I get all of the content dictionaries and send them to the template, which uses them to create the webpage. My problem is that if the memcache has expired, for each item I want to display, I have to (1) lookup item in memcache, (2) since no memcache exists I must fetch item from the datastore, and (3) store the item in memcache. These calls build up quickly. I don't set an expire time for the entries to the memcache, so this really only happens once in the morning, but the webpage takes long enough to load (~1 sec) that the browser reports it as not existing. Regularly, my webpages take about 50ms to load. This approach works decently for frequent visits, but it has its flaws as shown above. How can I remedy this? The entries are dynamic enough that I don't think it would be in my best interest to cache my initial request. Thanks in advance

    Read the article

  • Most efficient way to fetch and output Content with 2-Level Comments?

    - by awegawef
    I have some content with up to 2-levels of replies. I am wondering what the most efficient way to fetch and output the replies. I should note that I am planning on storing the comments with fields content_id and reply_to, where reply_to refers to which comment it is in reply to (if any). Any criticism on this design is welcome. In pseudo-code (ish), my first attempt would be: # in outputting content CONTENT_ID all_comments = fetch all comments where content_id == CONTENT_ID root_comments = filter all_comments with reply_to == None children_comments = filter all_comments with reply_to != None output_comments = list() for each root_comment children = filter children_comments, reply_to == root_comment.id output_coments.append( (root_comment, children) ) send output_comments to template Is this the best way to do this? Thanks in advance. Edit: On second thought, I'll want to preserve date-order on the comments, so I'll have to do this a bit differently, or at least just sort the comments afterward.

    Read the article

  • GQL Request BadArgument Error. How to get around with my case?

    - by awegawef
    My query is essentially the following: entries=Entry.all().order("-votes").order("-date").filter("votes >", VOTE_FILTER).fetch(PAGE_SIZE+1, page* PAGE_SIZE) I want to grab N of the latest entries that have a voting score above some benchmark (VOTE_FILTER). Google currently says that I cannot filter on 'votes' because I order by 'date.' I don't see a way that I can do this the way I want to, so I'd appreciate any advice.

    Read the article

1