https://search.twitter.com/search.json?q=doug
How do I read this like VIEW SOURCE, so that I know what I'm looking at?
Is there a website that can prettify it for me?
BTW, I use python
Hello everyone. I am working on a project that plays audio for part of the program. I would like to be able to display a message if the user's system volume is muted. I am using Python on Windows.
Hi,
I'm a college student majoring in computer science. I know java and will be learning C++ the next couple years at school. I want to add another language to my repertoire and have gotten conflicting advice: Ruby, Python, Perl, JavaScript, PHP, AJAX, among others.
I was wondering what everyone's opinions were on the relative value of each of these languages in the job market, the ease of learning of each of the languages, and just personal preferences when it comes to the languages mentioned above.
Thanks!
I want to learn C++ so that i can develop C++ Python modules for server-related stuff.
I'm a purely dynamic languages developer (Python, PHP, Ruby, etc). I want to learn a fast language, and if I'm going to do this, I'd rather learn a really fast language like C++. Before I even get started though, I understand that suddenly working with static types, a different syntax, and compiling code will be quite the paradigm shift. Is there any advice that a C++ dev who also has dynamic languages experience can give me to me to help me make that shift faster?
i have a web browser made in python with menu.
in one menu i have cut copy paste but no functionality and i need to make them work. i need an example of class oncopy.(event menu)
Open file i manage to work like this .takes file and print on screen the link to that file but how can make open dialog to open a file at least one type of file?
As an ASP.NET developer, I'm used to working with how VS/C# transparently autogens proxy classes for web references (yes, I know, we're spoiled), but now that I'm creating documentation for more than one coding platform I'm trying to discover what the equivelant to that is in any other framework.
So is there a similar way to work transparently with web reference proxy classes for say, RoR, PHP, and Python?
And if there's nothing integrated, are there tools you recommend to autogen the proxy classes, or do you recommend to roll custom classes?
Hey guys I'm new to Mac so please bear with me.
I'm using snow leopard 10.6.4 at the moment.
I want to install numpy and scipy, so I downloaded the python2.6,numpy and scipy dmg files from their official site. However, I'm having problem import numpy:
Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/multiarray.so: no matching architecture in universal wrapper
Can anyone shed some light to this problem?
hello .. im trying to extract frames from a video .. and i picked ffmpeg ( tell me if you know something better ) for this task
i downloaded it's source .. and i don't know how to use it ?? how do i compile it ??
what is the recommended language for it ?? i know python and C++
please note that i use windows vista 64x .
I know about the LEGB rule. But a simple test of whether a function has read access to variables defined in an enclosing function doesn't seem to actually work. Ie:
#!/usr/bin/env python2.4
'''Simple test of Python scoping rules'''
def myfunction():
print 'Hope this works: '+myvariable
def enclosing():
myvariable = 'ooh this worked'
myfunction()
if __name__ == '__main__':
enclosing()
Returns:
NameError: global name 'myvariable' is not defined
Am I doing something wrong? Is there more to it than the LEGB resolution order?
Recently came across pidgin. Its great, and does what I want, but I am not too keen on the GPL license. Other any alternatives, with less restrictive licenses?
I would prefer the library to be C or C++, as I am most familiar with those languages, but a an IM library implemented in python would be interesting too.
When I was using the built-in simple server, everything is OK, the admin interface is beautiful:
python manage.py runserver
However, when I try to serve my application using a wsgi server with django.core.handlers.wsgi.WSGIHandler, Django seems to forget where the admin media files is, and the admin page is not styled at all:
gunicorn_django
How did this happen?
My input string is '16-MAR-2010 03:37:04' and i want to store it as datetime.
I am trying to use:
db_inst.HB_Create_Ship_Date = datetime.strptime(fields[7]," %d-%b-%Y %H:%M:%S ")
fields[7] = '16-MAR-2010 03:37:04'
I am getting an error:
::ValueError: time data '16-MAR-2010 03:37:04' does not match format ' %d-%b-%Y %H:%M:%S '
I am running Python version --EDIT-ME-- on the --EDIT-ME-- operating system.
My locale is --EDIT-ME--.
Which format do I have to use?
Python newb here. I m trying to count the number of letter "a"s in a given string. Code is below. It keeps returning 1 instead 3 in string "banana". Any input appreciated.
def count_letters(word, char):
count = 0
while count <= len(word):
for char in word:
if char == word[count]:
count += 1
return count
print count_letters('banana','a')
i want my thread to sleep when a queue is empty and just wake up when a data is put in it,
should i use condition object? i have never used this object before! and i can,t find a simple example in python
I have multiple Network Interface Cards on my computer, each with its own IP address.
When I use gethostbyname(gethostname()) from Python's (built-in) socket module, it will only return one of them. How do I get the others?
Dear all,
I need to generate a vector of random float numbers between [0,1] such
that their sum equals 1 and that are distributed non-uniformly.
Is there any python function that generates such a vector?
Best wishes
I'd like to list the items in a tuple in Python starting with the back and go to front.
Similar to:
foo_t = tuple(int(f) for f in foo)
print foo, foo_t[len(foo_t)-1] ...
I believe this should be possible without Try ...-4, except ...-3.
Thoughts? suggestions?
I have some structure in Python:
gender=( ('0','woman'), ('1','man') )
I want translate it before I will display it in Django template.
Unfortunatelly below sollution don't work:
from django.utils.translation import
ugettext_lazy as _
gender=( ('0',('woman')),
('1',('man')) )
What I must do to translate this.
I readed something in:
link text
but I can't understand what I should do.
As an ASP.NET developer, I'm used to working with how VS/C# transparently autogens proxy classes for web references (yes, I know, we're spoiled), but now that I'm creating documentation for more than one coding platform I'm trying to discover what the equivelant to that is in any other framework.
So is there a similar way to work transparently with web reference proxy classes for say, RoR, PHP, and Python?
And if there's nothing integrated, are there tools you recommend to autogen the proxy classes, or do you recommend to roll custom classes?
In python zip function accepts arbitrary number of lists and zips them together.
>>> l1 = [1,2,3]
>>> l2 = [5,6,7]
>>> l3 = [7,4,8]
>>> zip(l1,l2,l3)
[(1, 5, 7), (2, 6, 4), (3, 7, 8)]
>>>
How can I zip together multiple lists in haskell?
With python inotifyx, do I have to remove watch and close opened system file descriptor if I need them until program exit? E.g. is there some possible problems if I create one (file descriptor + watch) with each run and don't close it?
I'm using Windows 7 Pro and I made a C# program that makes Speech Recognition.
When I run the program, the Speech Recognition App initializes.
Now, how can I turn it on ("Listen to everything I say") and minimize it (so it goes to systems tray and isn't visible), using C# or Python?
For example in Java for Data Transfer Object I use as:
ExampleDTO exampleDTO = new ExampleDTO();
What naming convention should I follow for similar in Python?
i saw this phrase in python 2.6 man:
class threading.Thread(group=None, target=None, name=None, args=(), kwargs={})
.
.
.
If the subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.
i just wanna know why?