text
stringlengths
200
200k
source
stringclasses
2 values
# Store simple user settings in Python ## Question I am programming a website in which users will have a number of settings, such as their choice of colour scheme, etc. I'm happy to store these as plain text files, and security is not an issue. The way I currently see it is: there is a dictionary, where all the keys ...
stackoverflow-qa
# Store simple user settings in Python ## Question I am programming a website in which users will have a number of settings, such as their choice of colour scheme, etc. I'm happy to store these as plain text files, and security is not an issue. The way I currently see it is: there is a dictionary, where all the keys ...
stackoverflow-qa
# How can I unpack binary hex formatted data in Python? ## Question Using the PHP pack() function, I have converted a string into a binary hex representation: $string = md5(time); // 32 character length $packed = pack('H*', $string); The H* formatting means "Hex string, high nibble first". To unpack this in PHP, I...
stackoverflow-qa
# How can I unpack binary hex formatted data in Python? ## Question Using the PHP pack() function, I have converted a string into a binary hex representation: $string = md5(time); // 32 character length $packed = pack('H*', $string); The H* formatting means "Hex string, high nibble first". To unpack this in PHP, I...
stackoverflow-qa
# How can I unpack binary hex formatted data in Python? ## Question Using the PHP pack() function, I have converted a string into a binary hex representation: $string = md5(time); // 32 character length $packed = pack('H*', $string); The H* formatting means "Hex string, high nibble first". To unpack this in PHP, I...
stackoverflow-qa
# Shortest Sudoku Solver in Python - How does it work? ## Question I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this: def r(a):i=a.find('0');~i or exit(a);[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for j in range(81)]or r(a[:i]+...
stackoverflow-qa
# Shortest Sudoku Solver in Python - How does it work? ## Question I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this: def r(a):i=a.find('0');~i or exit(a);[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for j in range(81)]or r(a[:i]+...
stackoverflow-qa
# Shortest Sudoku Solver in Python - How does it work? ## Question I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this: def r(a):i=a.find('0');~i or exit(a);[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for j in range(81)]or r(a[:i]+...
stackoverflow-qa
# Shortest Sudoku Solver in Python - How does it work? ## Question I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this: def r(a):i=a.find('0');~i or exit(a);[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for j in range(81)]or r(a[:i]+...
stackoverflow-qa
# Shortest Sudoku Solver in Python - How does it work? ## Question I was playing around with my own Sudoku solver and was looking for some pointers to good and fast design when I came across this: def r(a):i=a.find('0');~i or exit(a);[m in[(i-j)%9*(i/9^j/9)*(i/27^j/27|i%9/3^j%9/3)or a[j]for j in range(81)]or r(a[:i]+...
stackoverflow-qa
# urllib.urlopen works but urllib2.urlopen doesn't ## Question I have a simple website I'm testing. It's running on localhost and I can access it in my web browser. The index page is simply the word "running". urllib.urlopen will successfully read the page but urllib2.urlopen will not. Here's a script which demons...
stackoverflow-qa
# urllib.urlopen works but urllib2.urlopen doesn't ## Question I have a simple website I'm testing. It's running on localhost and I can access it in my web browser. The index page is simply the word "running". urllib.urlopen will successfully read the page but urllib2.urlopen will not. Here's a script which demons...
stackoverflow-qa
# urllib.urlopen works but urllib2.urlopen doesn't ## Question I have a simple website I'm testing. It's running on localhost and I can access it in my web browser. The index page is simply the word "running". urllib.urlopen will successfully read the page but urllib2.urlopen will not. Here's a script which demons...
stackoverflow-qa
# urllib.urlopen works but urllib2.urlopen doesn't ## Question I have a simple website I'm testing. It's running on localhost and I can access it in my web browser. The index page is simply the word "running". urllib.urlopen will successfully read the page but urllib2.urlopen will not. Here's a script which demons...
stackoverflow-qa
# urllib.urlopen works but urllib2.urlopen doesn't ## Question I have a simple website I'm testing. It's running on localhost and I can access it in my web browser. The index page is simply the word "running". urllib.urlopen will successfully read the page but urllib2.urlopen will not. Here's a script which demons...
stackoverflow-qa
# python name a file same as a lib ## Question i have the following script import getopt, sys opts, args = getopt.getopt(sys.argv[1:], "h:s") for key,value in opts: print key, "=>", value if i name this getopt.py and run it doesn't work as it tries to import itself is there a way around this, so i can keep thi...
stackoverflow-qa
# python name a file same as a lib ## Question i have the following script import getopt, sys opts, args = getopt.getopt(sys.argv[1:], "h:s") for key,value in opts: print key, "=>", value if i name this getopt.py and run it doesn't work as it tries to import itself is there a way around this, so i can keep thi...
stackoverflow-qa
# which python framework to use? ## Question I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ## Answer I think Django has...
stackoverflow-qa
# which python framework to use? ## Question I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ## Answer Django is amazingl...
stackoverflow-qa
# which python framework to use? ## Question I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ## Answer DanJ, here's a pre...
stackoverflow-qa
# which python framework to use? ## Question I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ## Answer You should also ta...
stackoverflow-qa
# which python framework to use? ## Question I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ## Answer You might want to ...
stackoverflow-qa
# which python framework to use? ## Question I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ## Answer Echoing the answer...
stackoverflow-qa
# which python framework to use? ## Question I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ## Answer web.py? It's extr...
stackoverflow-qa
# which python framework to use? ## Question I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ## Answer Wekrzeug is worth ...
stackoverflow-qa
# Creating self-contained python applications ## Question I'm trying to create a self-contained version of pisa (html to pdf converter, latest version), but I can't succeed due to several errors. I've tried py2exe, bb-freeze and cxfreeze. This has to be in windows, which makes my life a bit harder. I remember that a ...
stackoverflow-qa
# Receive socket size limits good? ## Question I am writing a program in Python that will act as a server and accept data from a client, is it a good idea to impose a hard limit as to the amount of data, if so why? More info: So certain chat programs limit the amount of text one can send per send (i.e. per time user ...
stackoverflow-qa
# Receive socket size limits good? ## Question I am writing a program in Python that will act as a server and accept data from a client, is it a good idea to impose a hard limit as to the amount of data, if so why? More info: So certain chat programs limit the amount of text one can send per send (i.e. per time user ...
stackoverflow-qa
# How do I get python-markdown to additionally "urlify" links when formatting plain text? ## Question Markdown is a great tool for formatting plain text into pretty html, but it doesn't turn plain-text links into URLs automatically. Like this one: http://www.google.com/ How do I get markdown to add tags to URLs whe...
stackoverflow-qa
# How do I get python-markdown to additionally "urlify" links when formatting plain text? ## Question Markdown is a great tool for formatting plain text into pretty html, but it doesn't turn plain-text links into URLs automatically. Like this one: http://www.google.com/ How do I get markdown to add tags to URLs whe...
stackoverflow-qa
# How do I get python-markdown to additionally "urlify" links when formatting plain text? ## Question Markdown is a great tool for formatting plain text into pretty html, but it doesn't turn plain-text links into URLs automatically. Like this one: http://www.google.com/ How do I get markdown to add tags to URLs whe...
stackoverflow-qa
# How do I get python-markdown to additionally "urlify" links when formatting plain text? ## Question Markdown is a great tool for formatting plain text into pretty html, but it doesn't turn plain-text links into URLs automatically. Like this one: http://www.google.com/ How do I get markdown to add tags to URLs whe...
stackoverflow-qa
# How do I get python-markdown to additionally "urlify" links when formatting plain text? ## Question Markdown is a great tool for formatting plain text into pretty html, but it doesn't turn plain-text links into URLs automatically. Like this one: http://www.google.com/ How do I get markdown to add tags to URLs whe...
stackoverflow-qa
# How do I get python-markdown to additionally "urlify" links when formatting plain text? ## Question Markdown is a great tool for formatting plain text into pretty html, but it doesn't turn plain-text links into URLs automatically. Like this one: http://www.google.com/ How do I get markdown to add tags to URLs whe...
stackoverflow-qa
# Does python support multiprocessor/multicore programming? ## Question What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming ## Answer You can read about multithreading in pytho...
stackoverflow-qa
# Does python support multiprocessor/multicore programming? ## Question What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming ## Answer If I understand things correctly, Python h...
stackoverflow-qa
# Does python support multiprocessor/multicore programming? ## Question What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming ## Answer The main difference is how you organize an...
stackoverflow-qa
# Does python support multiprocessor/multicore programming? ## Question What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming ## Answer As mentioned in another post Python 2.6 ha...
stackoverflow-qa
# Does python support multiprocessor/multicore programming? ## Question What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming ## Answer There is no such thing as "multiprocessor"...
stackoverflow-qa
# Does python support multiprocessor/multicore programming? ## Question What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming ## Answer You can actually write programs which will...
stackoverflow-qa
# How do I execute a program from python? os.system fails due to spaces in path ## Question I have a python script that needs to execute an external program, but for some reason fails. If I have the following script: import os; os.system("C:\\Temp\\a b c\\Notepad.exe"); raw_input(); Then it fails with the followin...
stackoverflow-qa
# How do I execute a program from python? os.system fails due to spaces in path ## Question I have a python script that needs to execute an external program, but for some reason fails. If I have the following script: import os; os.system("C:\\Temp\\a b c\\Notepad.exe"); raw_input(); Then it fails with the followin...
stackoverflow-qa
# How do I execute a program from python? os.system fails due to spaces in path ## Question I have a python script that needs to execute an external program, but for some reason fails. If I have the following script: import os; os.system("C:\\Temp\\a b c\\Notepad.exe"); raw_input(); Then it fails with the followin...
stackoverflow-qa
# How do I execute a program from python? os.system fails due to spaces in path ## Question I have a python script that needs to execute an external program, but for some reason fails. If I have the following script: import os; os.system("C:\\Temp\\a b c\\Notepad.exe"); raw_input(); Then it fails with the followin...
stackoverflow-qa
# How do I execute a program from python? os.system fails due to spaces in path ## Question I have a python script that needs to execute an external program, but for some reason fails. If I have the following script: import os; os.system("C:\\Temp\\a b c\\Notepad.exe"); raw_input(); Then it fails with the followin...
stackoverflow-qa
# How do I execute a program from python? os.system fails due to spaces in path ## Question I have a python script that needs to execute an external program, but for some reason fails. If I have the following script: import os; os.system("C:\\Temp\\a b c\\Notepad.exe"); raw_input(); Then it fails with the followin...
stackoverflow-qa
# Alert Popups from service in Python ## Question I have been using win32api.MessageBox to do alerts, and this works for apps running from the interactive prompt and normally executed code, however when I built a Python service when a MessageBox is triggered I can hear the 'beep' but the box does not display. Is it p...
stackoverflow-qa
# Checking for member existence in Python ## Question I regularly want to check if an object has a member or not. An example is the creation of a singleton in a function. For that purpose, you can use hasattr like this: class Foo(object): @classmethod def singleton(self): if not hasattr(self, 'instanc...
stackoverflow-qa
# Checking for member existence in Python ## Question I regularly want to check if an object has a member or not. An example is the creation of a singleton in a function. For that purpose, you can use hasattr like this: class Foo(object): @classmethod def singleton(self): if not hasattr(self, 'instanc...
stackoverflow-qa
# Checking for member existence in Python ## Question I regularly want to check if an object has a member or not. An example is the creation of a singleton in a function. For that purpose, you can use hasattr like this: class Foo(object): @classmethod def singleton(self): if not hasattr(self, 'instanc...
stackoverflow-qa
# Checking for member existence in Python ## Question I regularly want to check if an object has a member or not. An example is the creation of a singleton in a function. For that purpose, you can use hasattr like this: class Foo(object): @classmethod def singleton(self): if not hasattr(self, 'instanc...
stackoverflow-qa
# Failed to get separate instances of a class under mod_python ## Question I'm trying to run some python code under Apache 2.2 / mod_python 3.2.8. Eventually the code does os.fork() and spawns 2 separate long-run processes. Each of those processes has to create a separate instance of a class in order to avoid any poss...
stackoverflow-qa
# What would you recommend for a high traffic ajax intensive website? ## Question For a website like reddit with lots of up/down votes and lots of comments per topic what should I go with? Lighttpd/Php or Lighttpd/CherryPy/Genshi/SQLAlchemy? and for database what would scale better / be fastest MySQL ( 4.1 or 5 ? ) ...
stackoverflow-qa
# What would you recommend for a high traffic ajax intensive website? ## Question For a website like reddit with lots of up/down votes and lots of comments per topic what should I go with? Lighttpd/Php or Lighttpd/CherryPy/Genshi/SQLAlchemy? and for database what would scale better / be fastest MySQL ( 4.1 or 5 ? ) ...
stackoverflow-qa
# What would you recommend for a high traffic ajax intensive website? ## Question For a website like reddit with lots of up/down votes and lots of comments per topic what should I go with? Lighttpd/Php or Lighttpd/CherryPy/Genshi/SQLAlchemy? and for database what would scale better / be fastest MySQL ( 4.1 or 5 ? ) ...
stackoverflow-qa
# What would you recommend for a high traffic ajax intensive website? ## Question For a website like reddit with lots of up/down votes and lots of comments per topic what should I go with? Lighttpd/Php or Lighttpd/CherryPy/Genshi/SQLAlchemy? and for database what would scale better / be fastest MySQL ( 4.1 or 5 ? ) ...
stackoverflow-qa
# What would you recommend for a high traffic ajax intensive website? ## Question For a website like reddit with lots of up/down votes and lots of comments per topic what should I go with? Lighttpd/Php or Lighttpd/CherryPy/Genshi/SQLAlchemy? and for database what would scale better / be fastest MySQL ( 4.1 or 5 ? ) ...
stackoverflow-qa
# Capture the contents of a regex and delete them, efficiently ## Question Situation: text: a string R: a regex that matches part of the string. This might be expensive to calculate. I want to both delete the R-matches from the text, and see what they actually contain. Currently, I do this like: import re a...
stackoverflow-qa
# Capture the contents of a regex and delete them, efficiently ## Question Situation: text: a string R: a regex that matches part of the string. This might be expensive to calculate. I want to both delete the R-matches from the text, and see what they actually contain. Currently, I do this like: import re a...
stackoverflow-qa
# Capture the contents of a regex and delete them, efficiently ## Question Situation: text: a string R: a regex that matches part of the string. This might be expensive to calculate. I want to both delete the R-matches from the text, and see what they actually contain. Currently, I do this like: import re a...
stackoverflow-qa
# Is it possible to compile Python natively (beyond pyc byte code)? ## Question I wonder if it is possible to create an executable module from a Python script. I need to have the most performance and the flexibility of Python script, without needing to run in the Python environment. I would use this code to load on de...
stackoverflow-qa
# Is it possible to compile Python natively (beyond pyc byte code)? ## Question I wonder if it is possible to create an executable module from a Python script. I need to have the most performance and the flexibility of Python script, without needing to run in the Python environment. I would use this code to load on de...
stackoverflow-qa
# Is it possible to compile Python natively (beyond pyc byte code)? ## Question I wonder if it is possible to create an executable module from a Python script. I need to have the most performance and the flexibility of Python script, without needing to run in the Python environment. I would use this code to load on de...
stackoverflow-qa
# Sometimes can't delete an Oracle database row using Django ## Question I have a unit test which contains the following line of code Site.objects.get(name="UnitTest").delete() and this has worked just fine until now. However, that statement is currently hanging. It'll sit there forever trying to execute the dele...
stackoverflow-qa
# Starting a new database driven python web application would you use a javascript widget framework? If so which framework? ## Question I am starting a new web application project. I want to use python as I am using it at my bread-and-butter-job. However I don't want to reinvent the wheel. Some things I have thought ...
stackoverflow-qa
# Starting a new database driven python web application would you use a javascript widget framework? If so which framework? ## Question I am starting a new web application project. I want to use python as I am using it at my bread-and-butter-job. However I don't want to reinvent the wheel. Some things I have thought ...
stackoverflow-qa
# Starting a new database driven python web application would you use a javascript widget framework? If so which framework? ## Question I am starting a new web application project. I want to use python as I am using it at my bread-and-butter-job. However I don't want to reinvent the wheel. Some things I have thought ...
stackoverflow-qa
# Starting a new database driven python web application would you use a javascript widget framework? If so which framework? ## Question I am starting a new web application project. I want to use python as I am using it at my bread-and-butter-job. However I don't want to reinvent the wheel. Some things I have thought ...
stackoverflow-qa
# Starting a new database driven python web application would you use a javascript widget framework? If so which framework? ## Question I am starting a new web application project. I want to use python as I am using it at my bread-and-butter-job. However I don't want to reinvent the wheel. Some things I have thought ...
stackoverflow-qa
# How can I check the syntax of Python code in Emacs without actually executing it? ## Question Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called without needing to run the code. Is there an equivalent way to do this in Emacs instead of running and executing the code? ## Answer You can ...
stackoverflow-qa
# How can I check the syntax of Python code in Emacs without actually executing it? ## Question Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called without needing to run the code. Is there an equivalent way to do this in Emacs instead of running and executing the code? ## Answer Or from ...
stackoverflow-qa
# How can I check the syntax of Python code in Emacs without actually executing it? ## Question Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called without needing to run the code. Is there an equivalent way to do this in Emacs instead of running and executing the code? ## Answer python -...
stackoverflow-qa
# Any good team-chat websites? ## Question Are there any good team-chat websites, preferably in Python, ideally with CherryPy or Trac? This is similar to http://stackoverflow.com/questions/46612/whats-a-good-freeware-collaborative-ie-multiuser-instant-messenger#46660, but a few primary differences: 1) I very much wa...
stackoverflow-qa
# variables as parameters in field options ## Question I want to create a model, that will set editable=False on creation, and editable=True on editing item. I thought it should be something like this: home = models.ForeignKey(Team, editable=lambda self: True if self.id else False) But it doesn't work. Maybe some...
stackoverflow-qa
# Why do attribute references act like this with Python inheritance? ## Question The following seems strange.. Basically, the somedata attribute seems shared between all the classes that inherited from the_base_class. class the_base_class: somedata = {} somedata['was_false_in_base'] = False class subclassth...
stackoverflow-qa
# Why do attribute references act like this with Python inheritance? ## Question The following seems strange.. Basically, the somedata attribute seems shared between all the classes that inherited from the_base_class. class the_base_class: somedata = {} somedata['was_false_in_base'] = False class subclassth...
stackoverflow-qa
# Why do attribute references act like this with Python inheritance? ## Question The following seems strange.. Basically, the somedata attribute seems shared between all the classes that inherited from the_base_class. class the_base_class: somedata = {} somedata['was_false_in_base'] = False class subclassth...
stackoverflow-qa
# Ruby to Python bridge ## Question I am interested in getting some Python code talking to some Ruby code on Windows, Linux and possibly other platforms. Specificlly I would like to access classes in Ruby from Python and call their methods, access their data, create new instances and so on. An obvious way to do this ...
stackoverflow-qa
# Ruby to Python bridge ## Question I am interested in getting some Python code talking to some Ruby code on Windows, Linux and possibly other platforms. Specificlly I would like to access classes in Ruby from Python and call their methods, access their data, create new instances and so on. An obvious way to do this ...
stackoverflow-qa
# Ruby to Python bridge ## Question I am interested in getting some Python code talking to some Ruby code on Windows, Linux and possibly other platforms. Specificlly I would like to access classes in Ruby from Python and call their methods, access their data, create new instances and so on. An obvious way to do this ...
stackoverflow-qa
# Ruby to Python bridge ## Question I am interested in getting some Python code talking to some Ruby code on Windows, Linux and possibly other platforms. Specificlly I would like to access classes in Ruby from Python and call their methods, access their data, create new instances and so on. An obvious way to do this ...
stackoverflow-qa
# Ruby to Python bridge ## Question I am interested in getting some Python code talking to some Ruby code on Windows, Linux and possibly other platforms. Specificlly I would like to access classes in Ruby from Python and call their methods, access their data, create new instances and so on. An obvious way to do this ...
stackoverflow-qa
# Scrape a dynamic website ## Question What is the best method to scrape a dynamic website where most of the content is generated by what appears to be ajax requests? I have previous experience with a Mechanize, BeautifulSoup, and python combo, but I am up for something new. --Edit-- For more detail: I'm trying to s...
stackoverflow-qa
# Scrape a dynamic website ## Question What is the best method to scrape a dynamic website where most of the content is generated by what appears to be ajax requests? I have previous experience with a Mechanize, BeautifulSoup, and python combo, but I am up for something new. --Edit-- For more detail: I'm trying to s...
stackoverflow-qa
# Scrape a dynamic website ## Question What is the best method to scrape a dynamic website where most of the content is generated by what appears to be ajax requests? I have previous experience with a Mechanize, BeautifulSoup, and python combo, but I am up for something new. --Edit-- For more detail: I'm trying to s...
stackoverflow-qa
# Scrape a dynamic website ## Question What is the best method to scrape a dynamic website where most of the content is generated by what appears to be ajax requests? I have previous experience with a Mechanize, BeautifulSoup, and python combo, but I am up for something new. --Edit-- For more detail: I'm trying to s...
stackoverflow-qa
# Scrape a dynamic website ## Question What is the best method to scrape a dynamic website where most of the content is generated by what appears to be ajax requests? I have previous experience with a Mechanize, BeautifulSoup, and python combo, but I am up for something new. --Edit-- For more detail: I'm trying to s...
stackoverflow-qa
# Scrape a dynamic website ## Question What is the best method to scrape a dynamic website where most of the content is generated by what appears to be ajax requests? I have previous experience with a Mechanize, BeautifulSoup, and python combo, but I am up for something new. --Edit-- For more detail: I'm trying to s...
stackoverflow-qa
# Scrape a dynamic website ## Question What is the best method to scrape a dynamic website where most of the content is generated by what appears to be ajax requests? I have previous experience with a Mechanize, BeautifulSoup, and python combo, but I am up for something new. --Edit-- For more detail: I'm trying to s...
stackoverflow-qa
# Help with <key> event in python Entry widget ## Question I'm writing some code in python and I'm having trouble when trying to retrieve content of an Entry widget. The thing is: I want to limit the characters that can be typed, so I'm trying to clear the Entry widget when I reach the specific number of characters (2...
stackoverflow-qa
# Help with <key> event in python Entry widget ## Question I'm writing some code in python and I'm having trouble when trying to retrieve content of an Entry widget. The thing is: I want to limit the characters that can be typed, so I'm trying to clear the Entry widget when I reach the specific number of characters (2...
stackoverflow-qa
# Python: Difference between class and instance attributes ## Question Is there any meaningful distinction between: class A(object): foo = 5 # some default value vs. class B(object): def __init__(self, foo=5): self.foo = foo If you're creating a lot of instances, is there any difference in perf...
stackoverflow-qa
# Python: Difference between class and instance attributes ## Question Is there any meaningful distinction between: class A(object): foo = 5 # some default value vs. class B(object): def __init__(self, foo=5): self.foo = foo If you're creating a lot of instances, is there any difference in perf...
stackoverflow-qa
# Python: Difference between class and instance attributes ## Question Is there any meaningful distinction between: class A(object): foo = 5 # some default value vs. class B(object): def __init__(self, foo=5): self.foo = foo If you're creating a lot of instances, is there any difference in perf...
stackoverflow-qa
# Python: Difference between class and instance attributes ## Question Is there any meaningful distinction between: class A(object): foo = 5 # some default value vs. class B(object): def __init__(self, foo=5): self.foo = foo If you're creating a lot of instances, is there any difference in perf...
stackoverflow-qa
# Python: Difference between class and instance attributes ## Question Is there any meaningful distinction between: class A(object): foo = 5 # some default value vs. class B(object): def __init__(self, foo=5): self.foo = foo If you're creating a lot of instances, is there any difference in perf...
stackoverflow-qa
# Hooking up GUI interface with asynchronous (s)ftp operation ## Question Trying to implement a progress dialog window for file uploads that look like a cross between IE download dialog and Firefox download dialog with a python GUI library on Windows. What asynchronous (S)FTP libraries are there for python? Ideally ...
stackoverflow-qa
# Hooking up GUI interface with asynchronous (s)ftp operation ## Question Trying to implement a progress dialog window for file uploads that look like a cross between IE download dialog and Firefox download dialog with a python GUI library on Windows. What asynchronous (S)FTP libraries are there for python? Ideally ...
stackoverflow-qa
# Hooking up GUI interface with asynchronous (s)ftp operation ## Question Trying to implement a progress dialog window for file uploads that look like a cross between IE download dialog and Firefox download dialog with a python GUI library on Windows. What asynchronous (S)FTP libraries are there for python? Ideally ...
stackoverflow-qa
# List of IP addresses/hostnames from local network in Python ## Question How can I get a list of the IP addresses or host names from a local network easily in Python? It would be best if it was multi-platform, but it needs to work on Mac OS X first, then others follow. Edit: By local I mean all active addresses wit...
stackoverflow-qa