title stringlengths 10 172 | question_id int64 469 40.1M | question_body stringlengths 22 48.2k | question_score int64 -44 5.52k | question_date stringlengths 20 20 | answer_id int64 497 40.1M | answer_body stringlengths 18 33.9k | answer_score int64 -38 8.38k | answer_date stringlengths 20 20 | tags list |
|---|---|---|---|---|---|---|---|---|---|
Is Python2.6 stable enough for production use? | 828,862 | <p>Or should I just stick with Python2.5 for a bit longer?</p>
| 7 | 2009-05-06T09:44:28Z | 830,235 | <p>I recently switched from python2.5 to 2.6 for my research project involving lots of 3rd party libs (scipy, pydot, etc.) and swig related stuff. </p>
<p>The only thing I had to change was to convert all strings with</p>
<blockquote>
<p>s = unicode(s, "utf-8")</p>
</blockquote>
<p>before I fed them into the logging module.</p>
<p>Otherwise, I got everytime </p>
<blockquote>
<p>Traceback (most recent call last):<br />
File "/usr/lib/python2.6/logging/__init__.py", line 773, in emit<br />
stream.write(fs % msg.encode("UTF-8"))<br />
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 31: ordinal not in range(128) </p>
</blockquote>
| 1 | 2009-05-06T15:39:18Z | [
"python"
] |
Using Python multiprocessing while importing a module via file path | 829,123 | <p>I'm writing a program which imports a module using a file path, with the function <code>imp.load_source(module_name,module_path)</code>. It seems to cause a problem when I try to pass objects from this module into a <code>Process</code>.</p>
<p>An example:</p>
<pre><code>import multiprocessing
import imp
class MyProcess(multiprocessing.Process):
def __init__(self,thing):
multiprocessing.Process.__init__(self)
self.thing=thing
def run(self):
x=self.thing
if __name__=="__main__":
module=imp.load_source('life', 'C:\\Documents and Settings\\User\\workspace\\GarlicSim\\src\\simulations\\life\\life.py')
thing=module.step
print(thing)
p=MyProcess(thing)
p.start()
</code></pre>
<p>Note: for this code to "work", you must substitute the parameters I gave to <code>imp.load_source</code> with something else: It has to be some Python file on your computer, preferably not in the same folder. Then, in <code>thing=module.step</code>, instead of step put in some random function or class that is defined in that <code>.py</code> file.</p>
<p>I am getting the following traceback:</p>
<pre><code><function step at 0x00D5B030>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python26\lib\multiprocessing\forking.py", line 342, in main
self = load(from_parent)
File "C:\Python26\lib\pickle.py", line 1370, in load
return Unpickler(file).load()
File "C:\Python26\lib\pickle.py", line 858, in load
dispatch[key](self)
File "C:\Python26\lib\pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "C:\Python26\lib\pickle.py", line 1124, in find_class
__import__(module)
ImportError: No module named life
</code></pre>
<p>So what do I do?</p>
<p><strong>EDIT:</strong></p>
<p>I'm using Python 2.6.2c1 on Win XP.</p>
| 2 | 2009-05-06T11:18:41Z | 829,229 | <p><code>test.py</code> on any folder:</p>
<pre><code>import multiprocessing
import imp
class MyProcess(multiprocessing.Process):
def __init__(self,thing):
multiprocessing.Process.__init__(self)
self.thing=thing
def run(self):
print 'running...', self.thing()
if __name__=="__main__":
module=imp.load_source('life', '/tmp/life.py')
thing=module.step
print(thing)
p=MyProcess(thing)
p.start()
</code></pre>
<p><code>life.py</code> on <code>/tmp</code>:</p>
<pre><code>def step():
return 'It works!'
</code></pre>
<p>Running <code>test.py</code>:</p>
<pre><code>$ python test.py
<function step at 0xb7dc4d4c>
running... It works!
</code></pre>
<p>I just tested and it works, so you must be doing something else wrong. Please edit your question and paste the real code that is not working.</p>
<p>I am Using ubuntu Jaunty 9.04 with default python (Python 2.6.2 release26-maint, Apr 19 2009, 01:56:41). Don't know if your problem is windows-only, because I don't have windows available to test. </p>
<p>That's a reason that mangling with import paths is a <strong>bad idea</strong>. You'll never get it right for all platforms/environments, and your users will probably get angry. Better just use the python way of finding modules, which is by placing the module on the python module search path. That would work consistently everywhere.</p>
| -1 | 2009-05-06T11:59:20Z | [
"python",
"import",
"module",
"multiprocessing"
] |
Using Python multiprocessing while importing a module via file path | 829,123 | <p>I'm writing a program which imports a module using a file path, with the function <code>imp.load_source(module_name,module_path)</code>. It seems to cause a problem when I try to pass objects from this module into a <code>Process</code>.</p>
<p>An example:</p>
<pre><code>import multiprocessing
import imp
class MyProcess(multiprocessing.Process):
def __init__(self,thing):
multiprocessing.Process.__init__(self)
self.thing=thing
def run(self):
x=self.thing
if __name__=="__main__":
module=imp.load_source('life', 'C:\\Documents and Settings\\User\\workspace\\GarlicSim\\src\\simulations\\life\\life.py')
thing=module.step
print(thing)
p=MyProcess(thing)
p.start()
</code></pre>
<p>Note: for this code to "work", you must substitute the parameters I gave to <code>imp.load_source</code> with something else: It has to be some Python file on your computer, preferably not in the same folder. Then, in <code>thing=module.step</code>, instead of step put in some random function or class that is defined in that <code>.py</code> file.</p>
<p>I am getting the following traceback:</p>
<pre><code><function step at 0x00D5B030>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python26\lib\multiprocessing\forking.py", line 342, in main
self = load(from_parent)
File "C:\Python26\lib\pickle.py", line 1370, in load
return Unpickler(file).load()
File "C:\Python26\lib\pickle.py", line 858, in load
dispatch[key](self)
File "C:\Python26\lib\pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "C:\Python26\lib\pickle.py", line 1124, in find_class
__import__(module)
ImportError: No module named life
</code></pre>
<p>So what do I do?</p>
<p><strong>EDIT:</strong></p>
<p>I'm using Python 2.6.2c1 on Win XP.</p>
| 2 | 2009-05-06T11:18:41Z | 829,406 | <p>I've just done the following, running on XP with Python 2.5...</p>
<p><code>D:\Experiments\ModuleLoading\test.py</code></p>
<pre><code>import imp
if __name__=="__main__":
module=imp.load_source('life', r'D:\Experiments\ModuleLoading\somefolder\life.py')
thing=module.step
print(thing)
</code></pre>
<p><code>D:\Experiments\ModuleLoading\somefolder\step.py</code></p>
<pre><code>def step():
return 'It works!'
</code></pre>
<p>...and running the script gives:</p>
<pre><code>D:\jcage\Projects\Experiments\ModuleLoading>test.py
<function step at 0x00A0B470>
</code></pre>
<p>...so try that first and make sure the module can load without multiprocessing?</p>
<p><strong>[Edit]</strong> Okay, so it's definitely a problem importing into the forked process. There's <a href="http://docs.python.org/library/multiprocessing.html#windows" rel="nofollow">some bits and pieces in the documentation which are specific to windows</a>:</p>
<blockquote>
<p><strong>More picklability</strong></p>
<p>Ensure that all arguments to Process.__init__() are picklable. This means, in particular, that bound or unbound methods cannot be used directly as the target argument on Windows â just define a function and use that instead.
Also, if you subclass Process then make sure that instances will be picklable when the Process.start() method is called.</p>
<p><strong>Global variables</strong></p>
<p>Bear in mind that if code run in a child process tries to access a global variable, then the value it sees (if any) may not be the same as the value in the parent process at the time that Process.start() was called.
However, global variables which are just module level constants cause no problems.</p>
<p><strong>Safe importing of main module</strong></p>
<p>Make sure that the main module can be safely imported by a new Python interpreter without causing unintended side effects (such a starting a new process).</p>
</blockquote>
<p><strong>[Edit2]</strong> Is there any reason why you can't do the importing in the process? I think the problem is that when you launch the new process it's not running in the same address space so trying to access functions in the original thread won't work.</p>
<p>You could do this for <code>D:\Experiments\ModuleLoading\test.py</code> instead:</p>
<pre><code>from multiprocessing import Process
import imp
class MyProcess(Process):
def __init__(self):
Process.__init__(self)
def run(self):
print 'run called...'
module=imp.load_source('life', r'D:\Experiments\ModuleLoading\somefolder\life.py')
print 'running...', module.step()
if __name__=="__main__":
p=MyProcess()
p.start()
</code></pre>
| -1 | 2009-05-06T12:50:49Z | [
"python",
"import",
"module",
"multiprocessing"
] |
Using Python multiprocessing while importing a module via file path | 829,123 | <p>I'm writing a program which imports a module using a file path, with the function <code>imp.load_source(module_name,module_path)</code>. It seems to cause a problem when I try to pass objects from this module into a <code>Process</code>.</p>
<p>An example:</p>
<pre><code>import multiprocessing
import imp
class MyProcess(multiprocessing.Process):
def __init__(self,thing):
multiprocessing.Process.__init__(self)
self.thing=thing
def run(self):
x=self.thing
if __name__=="__main__":
module=imp.load_source('life', 'C:\\Documents and Settings\\User\\workspace\\GarlicSim\\src\\simulations\\life\\life.py')
thing=module.step
print(thing)
p=MyProcess(thing)
p.start()
</code></pre>
<p>Note: for this code to "work", you must substitute the parameters I gave to <code>imp.load_source</code> with something else: It has to be some Python file on your computer, preferably not in the same folder. Then, in <code>thing=module.step</code>, instead of step put in some random function or class that is defined in that <code>.py</code> file.</p>
<p>I am getting the following traceback:</p>
<pre><code><function step at 0x00D5B030>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python26\lib\multiprocessing\forking.py", line 342, in main
self = load(from_parent)
File "C:\Python26\lib\pickle.py", line 1370, in load
return Unpickler(file).load()
File "C:\Python26\lib\pickle.py", line 858, in load
dispatch[key](self)
File "C:\Python26\lib\pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "C:\Python26\lib\pickle.py", line 1124, in find_class
__import__(module)
ImportError: No module named life
</code></pre>
<p>So what do I do?</p>
<p><strong>EDIT:</strong></p>
<p>I'm using Python 2.6.2c1 on Win XP.</p>
| 2 | 2009-05-06T11:18:41Z | 830,669 | <p>Probably it does not work because of placing of import code into main block.
Code below works on Windows XP, Python 2.6. Then life module will also be imported in new process.</p>
<pre><code>import multiprocessing
import imp
class MyProcess(multiprocessing.Process):
def __init__(self,thing):
multiprocessing.Process.__init__(self)
self.thing=thing
def run(self):
print("Exiting self.thing")
self.thing()
print("Finished")
life=imp.load_source('life', r'd:\temp5\life.py')
if __name__=="__main__":
p=MyProcess(life.step)
p.start()
</code></pre>
| 1 | 2009-05-06T17:03:28Z | [
"python",
"import",
"module",
"multiprocessing"
] |
Django: custom constructor for form class, trouble with accessing data from request.POST | 829,156 | <p>I have written custom constructor for a form, the whole form class looks like this:</p>
<pre><code>class UploadForm(forms.Form):
file = forms.FileField(label = "Plik")
def __init__(self, coto, naglowek, *args, **kwargs):
super(UploadForm, self).__init__(*args, **kwargs)
self.coto = coto
self.naglowek = naglowek
</code></pre>
<p>When submitting form, in my view, I have something like</p>
<pre><code>if request.method == 'POST':
form = UploadForm(request.POST, request.FILES)
if form.is_valid():
add_form(request.FILES['file'])
return HttpResponseRedirect('uploaded/')
</code></pre>
<p>The problem is, that when I am creating form in this way in my view, I am not passing <strong>coto</strong> and <strong>naglowek</strong>, so when I am calling <strong>form.is_valid()</strong> --> it returns false.</p>
<p>The template which passess it looks like:</p>
<pre><code><table class="uploadform">
<form action="." method="POST" enctype="multipart/form-data">
{% for form in forms %}
<tr>
<td>{{ form.naglowek }}</td>
<td>{{ form.file }}</td>
<td><input type="submit" name="{{ form.coto }}" id="{{ form.coto }}" value="WyÅlij"></td>
</tr>
{% endfor %}
</form>
</table>
</code></pre>
<p>I would be grateful for any suggestions.</p>
<p><strong>[EDIT]</strong>
I might not say this clearlly enough, but I will try my best:</p>
<p>When I am submitting this form, in view, I need to know which submit button was pressed - I have many of them assigned to single form. From what I know, when I am assigning id to submit button, it should be availible in post, right? The trick is, that it is not availible. </p>
<p>I have two questions:
* What needs to be done, If I want to know which submit button was pressed? Is assigning the name the only way?
* Is there any error in my logic?</p>
| -1 | 2009-05-06T11:29:49Z | 829,177 | <pre><code>request.POST['coto']
request.POST['naglowek']
</code></pre>
<p>I guess.</p>
| 0 | 2009-05-06T11:39:15Z | [
"python",
"django",
"post",
"webforms"
] |
Django: custom constructor for form class, trouble with accessing data from request.POST | 829,156 | <p>I have written custom constructor for a form, the whole form class looks like this:</p>
<pre><code>class UploadForm(forms.Form):
file = forms.FileField(label = "Plik")
def __init__(self, coto, naglowek, *args, **kwargs):
super(UploadForm, self).__init__(*args, **kwargs)
self.coto = coto
self.naglowek = naglowek
</code></pre>
<p>When submitting form, in my view, I have something like</p>
<pre><code>if request.method == 'POST':
form = UploadForm(request.POST, request.FILES)
if form.is_valid():
add_form(request.FILES['file'])
return HttpResponseRedirect('uploaded/')
</code></pre>
<p>The problem is, that when I am creating form in this way in my view, I am not passing <strong>coto</strong> and <strong>naglowek</strong>, so when I am calling <strong>form.is_valid()</strong> --> it returns false.</p>
<p>The template which passess it looks like:</p>
<pre><code><table class="uploadform">
<form action="." method="POST" enctype="multipart/form-data">
{% for form in forms %}
<tr>
<td>{{ form.naglowek }}</td>
<td>{{ form.file }}</td>
<td><input type="submit" name="{{ form.coto }}" id="{{ form.coto }}" value="WyÅlij"></td>
</tr>
{% endfor %}
</form>
</table>
</code></pre>
<p>I would be grateful for any suggestions.</p>
<p><strong>[EDIT]</strong>
I might not say this clearlly enough, but I will try my best:</p>
<p>When I am submitting this form, in view, I need to know which submit button was pressed - I have many of them assigned to single form. From what I know, when I am assigning id to submit button, it should be availible in post, right? The trick is, that it is not availible. </p>
<p>I have two questions:
* What needs to be done, If I want to know which submit button was pressed? Is assigning the name the only way?
* Is there any error in my logic?</p>
| -1 | 2009-05-06T11:29:49Z | 829,315 | <p>You've redefined default form constructor and change its parameters order. So you have to instantiate your custom form with explicit naming of arguments:</p>
<pre><code>form = UploadForm(data=request.POST, files=request.FILES, coto=..., naglowek=...)
</code></pre>
| 0 | 2009-05-06T12:27:28Z | [
"python",
"django",
"post",
"webforms"
] |
Django: custom constructor for form class, trouble with accessing data from request.POST | 829,156 | <p>I have written custom constructor for a form, the whole form class looks like this:</p>
<pre><code>class UploadForm(forms.Form):
file = forms.FileField(label = "Plik")
def __init__(self, coto, naglowek, *args, **kwargs):
super(UploadForm, self).__init__(*args, **kwargs)
self.coto = coto
self.naglowek = naglowek
</code></pre>
<p>When submitting form, in my view, I have something like</p>
<pre><code>if request.method == 'POST':
form = UploadForm(request.POST, request.FILES)
if form.is_valid():
add_form(request.FILES['file'])
return HttpResponseRedirect('uploaded/')
</code></pre>
<p>The problem is, that when I am creating form in this way in my view, I am not passing <strong>coto</strong> and <strong>naglowek</strong>, so when I am calling <strong>form.is_valid()</strong> --> it returns false.</p>
<p>The template which passess it looks like:</p>
<pre><code><table class="uploadform">
<form action="." method="POST" enctype="multipart/form-data">
{% for form in forms %}
<tr>
<td>{{ form.naglowek }}</td>
<td>{{ form.file }}</td>
<td><input type="submit" name="{{ form.coto }}" id="{{ form.coto }}" value="WyÅlij"></td>
</tr>
{% endfor %}
</form>
</table>
</code></pre>
<p>I would be grateful for any suggestions.</p>
<p><strong>[EDIT]</strong>
I might not say this clearlly enough, but I will try my best:</p>
<p>When I am submitting this form, in view, I need to know which submit button was pressed - I have many of them assigned to single form. From what I know, when I am assigning id to submit button, it should be availible in post, right? The trick is, that it is not availible. </p>
<p>I have two questions:
* What needs to be done, If I want to know which submit button was pressed? Is assigning the name the only way?
* Is there any error in my logic?</p>
| -1 | 2009-05-06T11:29:49Z | 829,752 | <p>Your question is a mess. There's code and there's an edit with another question. The edit question has nothing to do with the title.</p>
<p>Please update this question to be your <em>real</em> question. </p>
<p>If you have multiple submit buttons, you must give them distinct names or values (or both). Here's our code which uses distinct values to distinguish which button was clicked.</p>
<pre><code> <form method="post" action="." enctype="multipart/form-data">
<input type="hidden" name="object_id" value="{{e.id}}"/>
{% ifequal object.workflow "uploaded" %}
<input type="submit" name="action" value="Validate"/>
<br/>
<input type="submit" name="action" value="Delete"/>
{% endifequal %}
{% ifequal object.workflow "validated" %}
<input type="submit" name="action" value="Load"/>
{% endifequal %}
{% ifequal object.workflow "processed" %}
<input type="submit" name="action" value="Undo"/>
{% endifequal %}
{% ifequal object.workflow "failed" %}
<input type="submit" name="action" value="Validate"/>
{% endifequal %}
</form>
</code></pre>
<p>The view function has this kind of thing:</p>
<pre><code> if request.POST['action'] == "Delete":
</code></pre>
<p>to change the action based on the button.</p>
| 2 | 2009-05-06T14:04:49Z | [
"python",
"django",
"post",
"webforms"
] |
What is the proper procedure for offering a patch to the Python documentation? | 829,341 | <p>I'm about to dive into the source code for the cgi.py module again because the MiniFieldStorage class is mentioned in the documentation, but not actually documented. It occurred to me that I have done this so many times that maybe I could write documentation for it. If I did, how should I submit it?</p>
| 4 | 2009-05-06T12:32:06Z | 829,356 | <p>There's a page regarding <a href="http://python.org/dev/doc/" rel="nofollow">Documentation Development</a> on the official web site which looks like a good starting point. It appears as though you simply add to the issue tracker and attach a patch in the normal way.</p>
<p>In particular, it points to <em><a href="http://docs.python.org/documenting/" rel="nofollow">Documenting Python</a></em>, which appears to be a rather exhaustive guide on formatting documentation; style guidelines, etc.</p>
| 4 | 2009-05-06T12:38:02Z | [
"python",
"documentation"
] |
What is the proper procedure for offering a patch to the Python documentation? | 829,341 | <p>I'm about to dive into the source code for the cgi.py module again because the MiniFieldStorage class is mentioned in the documentation, but not actually documented. It occurred to me that I have done this so many times that maybe I could write documentation for it. If I did, how should I submit it?</p>
| 4 | 2009-05-06T12:32:06Z | 829,372 | <p>I would suggest posting an issue to the <a href="http://bugs.python.org/issue?%40search%5Ftext=&title=&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=4&versions=&dependencies=&assignee=&keywords=&priority=&%40columns=priority&%40group=priority&status=1&resolution=&nosy%5Fcount=&message%5Fcount=&%40pagesize=50&%40startwith=0&%40queryname=&%40old-queryname=&%40action=search" rel="nofollow">documentation bug tracker</a>, including the patch of course. This is mentioned in the section on <a href="http://www.python.org/dev/contributing/" rel="nofollow">contributing</a> on the site.</p>
<p>If that doesn't work, or seems slow, I guess you can dig up developers to bug directly, but that can also be considered impolite, so read up first on the proper etiquette.</p>
| 1 | 2009-05-06T12:41:44Z | [
"python",
"documentation"
] |
str.format() -> how to left-justify | 829,667 | <pre><code>>>> print 'there are {0:10} students and {1:10} teachers'.format(scnt, tcnt)
there are 100 students and 20 teachers
</code></pre>
<p>What would be the code so that the output became:</p>
<pre><code>there are 100 students and 20 teachers
</code></pre>
<p>Thanks.</p>
| 7 | 2009-05-06T13:49:46Z | 829,687 | <pre><code>print 'there are {0:<10} students and {1:<10} teachers'.format(scnt, tcnt)
</code></pre>
<p>While the old <code>%</code> operator uses <code>-</code> for alignment, the new <code>format</code> method uses <code><</code> and <code>></code></p>
| 15 | 2009-05-06T13:53:29Z | [
"python"
] |
Mosso Python Module | 829,916 | <p>Has anybody had success installing the Mosso (cloudfiles) python module? I'm trying to install it and getting the following error.</p>
<pre><code>python-cloudfiles-1.3.1]# python setup.py install
running install
running build
running build_py
running install_lib
byte-compiling /usr/lib/python2.3/site-packages/cloudfiles/container.py to container.pyc
File "/usr/lib/python2.3/site-packages/cloudfiles/container.py", line 74
@requires_name(InvalidContainerName)
^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/cloudfiles/storage_object.py to storage_object.pyc
File "/usr/lib/python2.3/site-packages/cloudfiles/storage_object.py", line 85
@requires_name(InvalidObjectName)
^
SyntaxError: invalid syntax
</code></pre>
| 1 | 2009-05-06T14:35:07Z | 829,964 | <p>It looks like you're running a version of Python prior to 2.4 - the syntax it's complaining about (the @ symbol, known as a "decorator") was introduced in Python 2.4.</p>
| 5 | 2009-05-06T14:45:39Z | [
"python",
"module",
"mosso",
"cloudfiles"
] |
Python's PIL crop problem: color of cropped image screwed | 830,366 | <p>I have a probably very basic problem with PIL's crop function: The cropped image's colors are totally screwed. Here's the code:</p>
<pre><code>>>> from PIL import Image
>>> img = Image.open('football.jpg')
>>> img
<PIL.JpegImagePlugin.JpegImageFile instance at 0x00
>>> img.format
'JPEG'
>>> img.mode
'RGB'
>>> box = (120,190,400,415)
>>> area = img.crop(box)
>>> area
<PIL.Image._ImageCrop instance at 0x00D56328>
>>> area.format
>>> area.mode
'RGB'
>>> output = open('cropped_football.jpg', 'w')
>>> area.save(output)
>>> output.close()
</code></pre>
<p>The original image: <img src="http://i.stack.imgur.com/xJCt3.jpg" alt="enter image description here"></p>
<p><a href="http://lh6.ggpht.com/_6sm8225Z3w8/SgG0AWKPUaI/AAAAAAAAAjw/SWP360wFo1M/cropped_football.jpg" rel="nofollow">and the output</a>.</p>
<p>As you can see, the output's colors are totally messed up...</p>
<p>Thanks in advance for any help!</p>
<p>-Hoff</p>
| 4 | 2009-05-06T16:07:18Z | 830,449 | <p><code>output</code> should be a file name, not a handler.</p>
| 4 | 2009-05-06T16:21:57Z | [
"python",
"image-processing",
"colors",
"python-imaging-library",
"crop"
] |
Python's PIL crop problem: color of cropped image screwed | 830,366 | <p>I have a probably very basic problem with PIL's crop function: The cropped image's colors are totally screwed. Here's the code:</p>
<pre><code>>>> from PIL import Image
>>> img = Image.open('football.jpg')
>>> img
<PIL.JpegImagePlugin.JpegImageFile instance at 0x00
>>> img.format
'JPEG'
>>> img.mode
'RGB'
>>> box = (120,190,400,415)
>>> area = img.crop(box)
>>> area
<PIL.Image._ImageCrop instance at 0x00D56328>
>>> area.format
>>> area.mode
'RGB'
>>> output = open('cropped_football.jpg', 'w')
>>> area.save(output)
>>> output.close()
</code></pre>
<p>The original image: <img src="http://i.stack.imgur.com/xJCt3.jpg" alt="enter image description here"></p>
<p><a href="http://lh6.ggpht.com/_6sm8225Z3w8/SgG0AWKPUaI/AAAAAAAAAjw/SWP360wFo1M/cropped_football.jpg" rel="nofollow">and the output</a>.</p>
<p>As you can see, the output's colors are totally messed up...</p>
<p>Thanks in advance for any help!</p>
<p>-Hoff</p>
| 4 | 2009-05-06T16:07:18Z | 833,916 | <p>instead of</p>
<pre><code>output = open('cropped_football.jpg', 'w')
area.save(output)
output.close()
</code></pre>
<p>just do</p>
<pre><code>area.save('cropped_football.jpg')
</code></pre>
| 3 | 2009-05-07T10:35:36Z | [
"python",
"image-processing",
"colors",
"python-imaging-library",
"crop"
] |
Python's PIL crop problem: color of cropped image screwed | 830,366 | <p>I have a probably very basic problem with PIL's crop function: The cropped image's colors are totally screwed. Here's the code:</p>
<pre><code>>>> from PIL import Image
>>> img = Image.open('football.jpg')
>>> img
<PIL.JpegImagePlugin.JpegImageFile instance at 0x00
>>> img.format
'JPEG'
>>> img.mode
'RGB'
>>> box = (120,190,400,415)
>>> area = img.crop(box)
>>> area
<PIL.Image._ImageCrop instance at 0x00D56328>
>>> area.format
>>> area.mode
'RGB'
>>> output = open('cropped_football.jpg', 'w')
>>> area.save(output)
>>> output.close()
</code></pre>
<p>The original image: <img src="http://i.stack.imgur.com/xJCt3.jpg" alt="enter image description here"></p>
<p><a href="http://lh6.ggpht.com/_6sm8225Z3w8/SgG0AWKPUaI/AAAAAAAAAjw/SWP360wFo1M/cropped_football.jpg" rel="nofollow">and the output</a>.</p>
<p>As you can see, the output's colors are totally messed up...</p>
<p>Thanks in advance for any help!</p>
<p>-Hoff</p>
| 4 | 2009-05-06T16:07:18Z | 6,833,306 | <p>Since the call to <code>save</code> actually produced output, I have to assume that PIL is able to use either a filename or an open file interchangeably. The problem is in the file mode, which by default will try to convert based on text conventions - a '\n' will be replaced by '\r\n' on Windows. You need to open the file in binary mode:</p>
<pre><code>output = open('cropped_football.jpg', 'wb')
</code></pre>
<p>P.S. I tested this and it works:</p>
<p><img src="http://i.stack.imgur.com/fKUz5.jpg" alt="enter image description here"></p>
| 1 | 2011-07-26T16:23:20Z | [
"python",
"image-processing",
"colors",
"python-imaging-library",
"crop"
] |
design for handling exceptions - google app engine | 830,597 | <p>I'm developing a project on google app engine (webapp framework). I need you people to assess how I handle exceptions.</p>
<p>There are 4 types of exceptions I am handling:</p>
<ol>
<li>Programming exceptions</li>
<li>Bad user input</li>
<li>Incorrect URLs</li>
<li>Incorrect query strings</li>
</ol>
<p>Here is how I handle them:</p>
<ol>
<li><p>I have subclassed the webapp.requesthandler class and overrode the handle_exceptions method. Whenever an exception occurs, I take the user to a friendly "we're sorry" page and in the meantime send a message with the traceback to the admins. </p></li>
<li><p>On the client side I (will) use js and also validate on the server side.
Here I figure (as a coder with non-web experience) in addition to validate inputs according to programming logic (check: cash input is of the float type?) and business rules (check: user has enough points to take that action?), I also have to check against malicious intentions. What measures should I take against malicious actions?</p></li>
<li><p>I have a catch-all URL that handles incorrect URLs. That is to say, I take the user to a custom "page does not exist" page. Here I have no problems, I think.</p></li>
<li><p>Incorrect query strings presumably raise exceptions if left to themselves. If an ID does not exist, the method returns None (an exception is on the way). if the parameter is inconvenient, the code raises an exception. Here I think I must raise a 404 and take the user to the custom "page does not exist" page. What should I do?</p></li>
</ol>
<p>What are your opinions? Thanks in advance..</p>
| 6 | 2009-05-06T16:51:40Z | 830,672 | <p>You seem to have thought things through pretty well. The only thing I would add is that you might want to take a look at <a href="http://github.com/DocSavage/bloog/tree/master" rel="nofollow">Bloog</a> as an example. Bloog is a pretty well written and popular open source blog engine for App Engine written in Python.</p>
<p>Also, on Point #2, watch out for <a href="http://ha.ckers.org/xss.html" rel="nofollow">these types</a> of <a href="http://en.wikipedia.org/wiki/Cross-site%5Fscripting" rel="nofollow">Cross Scripting</a> attacks.</p>
<p>As for #4, keep in mind that 404 pages are an opportunity to add some <a href="http://www.smashingmagazine.com/2009/01/29/404-error-pages-one-more-time/" rel="nofollow">color and creativity</a> to your design.</p>
| 5 | 2009-05-06T17:03:47Z | [
"python",
"google-app-engine",
"exception-handling",
"web-applications"
] |
design for handling exceptions - google app engine | 830,597 | <p>I'm developing a project on google app engine (webapp framework). I need you people to assess how I handle exceptions.</p>
<p>There are 4 types of exceptions I am handling:</p>
<ol>
<li>Programming exceptions</li>
<li>Bad user input</li>
<li>Incorrect URLs</li>
<li>Incorrect query strings</li>
</ol>
<p>Here is how I handle them:</p>
<ol>
<li><p>I have subclassed the webapp.requesthandler class and overrode the handle_exceptions method. Whenever an exception occurs, I take the user to a friendly "we're sorry" page and in the meantime send a message with the traceback to the admins. </p></li>
<li><p>On the client side I (will) use js and also validate on the server side.
Here I figure (as a coder with non-web experience) in addition to validate inputs according to programming logic (check: cash input is of the float type?) and business rules (check: user has enough points to take that action?), I also have to check against malicious intentions. What measures should I take against malicious actions?</p></li>
<li><p>I have a catch-all URL that handles incorrect URLs. That is to say, I take the user to a custom "page does not exist" page. Here I have no problems, I think.</p></li>
<li><p>Incorrect query strings presumably raise exceptions if left to themselves. If an ID does not exist, the method returns None (an exception is on the way). if the parameter is inconvenient, the code raises an exception. Here I think I must raise a 404 and take the user to the custom "page does not exist" page. What should I do?</p></li>
</ol>
<p>What are your opinions? Thanks in advance..</p>
| 6 | 2009-05-06T16:51:40Z | 833,840 | <p>Ad. #4: I usually treat query strings as non-essential. If anything is wrong with query string, I'd just present bare resource page (as if no query was present), possibly with some information to user what was wrong with the query string.</p>
<p>This leads to the problem similar to your #3: how did the user got into this wrong query? Did my application produce wrong URL somewhere? Or was it outdated link in some external service, or saved bookmark? <code>HTTP_REFERER</code> might contain some clue, but of course is not authoritative, so I'd log the problematic query (with some additional HTTP headers) and try to investigate the case.</p>
| 0 | 2009-05-07T10:14:34Z | [
"python",
"google-app-engine",
"exception-handling",
"web-applications"
] |
Python Iterator Help + lxml | 830,600 | <p>I have this script-</p>
<pre><code>import lxml
from lxml.cssselect import CSSSelector
from lxml.etree import fromstring
from lxml.html import parse
website = parse('http://example.com').getroot()
selector = website.cssselect('.name')
for i in range(0,18):
print selector[i].text_content()
</code></pre>
<p>As you can see the for loop stops after a number of times that I set beforehand. I want the for loop to stop only after it has printed everything.</p>
| 1 | 2009-05-06T16:52:23Z | 830,621 | <p>What about</p>
<pre><code>for e in selector:
print e.text_content()
</code></pre>
<p>?</p>
| 2 | 2009-05-06T16:56:07Z | [
"python",
"iterator",
"for-loop",
"lxml"
] |
Python Iterator Help + lxml | 830,600 | <p>I have this script-</p>
<pre><code>import lxml
from lxml.cssselect import CSSSelector
from lxml.etree import fromstring
from lxml.html import parse
website = parse('http://example.com').getroot()
selector = website.cssselect('.name')
for i in range(0,18):
print selector[i].text_content()
</code></pre>
<p>As you can see the for loop stops after a number of times that I set beforehand. I want the for loop to stop only after it has printed everything.</p>
| 1 | 2009-05-06T16:52:23Z | 830,626 | <p>The CSSSelector.cssselect() method returns an iterable, so you can just do:</p>
<pre><code>for element in selector:
print element.text_content()
</code></pre>
| 5 | 2009-05-06T16:56:47Z | [
"python",
"iterator",
"for-loop",
"lxml"
] |
Python Iterator Help + lxml | 830,600 | <p>I have this script-</p>
<pre><code>import lxml
from lxml.cssselect import CSSSelector
from lxml.etree import fromstring
from lxml.html import parse
website = parse('http://example.com').getroot()
selector = website.cssselect('.name')
for i in range(0,18):
print selector[i].text_content()
</code></pre>
<p>As you can see the for loop stops after a number of times that I set beforehand. I want the for loop to stop only after it has printed everything.</p>
| 1 | 2009-05-06T16:52:23Z | 830,634 | <p>I would expect you want a for loop like:</p>
<pre><code>selectors = website.cssselect('.name , .name, .desc')
for selector in selectors:
print selector.text_content()
</code></pre>
| 2 | 2009-05-06T16:57:48Z | [
"python",
"iterator",
"for-loop",
"lxml"
] |
Python convert args to kwargs | 830,937 | <p>I am writing a decorator that needs to call other functions prior to call of the function that it is decorating. The decorated function may have positional arguments, but the functions the decorator will call can only accept keyword arguments. Does anyone have a handy way of converting positional arguments into keyword arguments?</p>
<p>I know that I can get a list of the variable names of the decorated function:</p>
<pre><code>>>> def a(one, two=2):
... pass
>>> a.func_code.co_varnames
('one', 'two')
</code></pre>
<p>But I can't figure out how to tell what was passed in positionally and what was as keyword.</p>
<p>My decorator looks like this:</p>
<pre><code>class mydec(object):
def __init__(self, f, *args, **kwargs):
self.f = f
def __call__(self, *args, **kwargs):
hozer(**kwargs)
self.f(*args, **kwargs)
</code></pre>
<p>Is there a way other than just comparing kwargs and co_varnames, adding to kwargs anything not in there, and hoping for the best?</p>
| 8 | 2009-05-06T18:14:35Z | 831,164 | <p>Any arg that was passed positionally will be passed to *args. And any arg passed as a keyword will be passed to **kwargs.
If you have positional args values and names then you can do:</p>
<pre><code>kwargs.update(dict(zip(myfunc.func_code.co_varnames, args)))
</code></pre>
<p>to convert them all into keyword args.</p>
| 12 | 2009-05-06T19:00:32Z | [
"python",
"decorator"
] |
Python convert args to kwargs | 830,937 | <p>I am writing a decorator that needs to call other functions prior to call of the function that it is decorating. The decorated function may have positional arguments, but the functions the decorator will call can only accept keyword arguments. Does anyone have a handy way of converting positional arguments into keyword arguments?</p>
<p>I know that I can get a list of the variable names of the decorated function:</p>
<pre><code>>>> def a(one, two=2):
... pass
>>> a.func_code.co_varnames
('one', 'two')
</code></pre>
<p>But I can't figure out how to tell what was passed in positionally and what was as keyword.</p>
<p>My decorator looks like this:</p>
<pre><code>class mydec(object):
def __init__(self, f, *args, **kwargs):
self.f = f
def __call__(self, *args, **kwargs):
hozer(**kwargs)
self.f(*args, **kwargs)
</code></pre>
<p>Is there a way other than just comparing kwargs and co_varnames, adding to kwargs anything not in there, and hoping for the best?</p>
| 8 | 2009-05-06T18:14:35Z | 833,327 | <p>Note - co_varnames will include local variables as well as keywords. This probably won't matter, as zip truncates the shorter sequence, but may result in confusing error messages if you pass the wrong number of args.</p>
<p>You can avoid this with <code>func_code.co_varnames[:func_code.co_argcount]</code>, but better is to use the <a href="http://docs.python.org/library/inspect.html" rel="nofollow">inspect</a> module. ie:</p>
<pre><code>import inspect
argnames, varargs, kwargs, defaults = inspect.getargspec(func)
</code></pre>
<p>You may also want to handle the case where the function defines <code>**kwargs</code> or <code>*args</code> (even if just to raise an exception when used with the decorator). If these are set, the second and third result from <code>getargspec</code> will return their variable name, otherwise they will be None.</p>
| 2 | 2009-05-07T07:37:01Z | [
"python",
"decorator"
] |
Python convert args to kwargs | 830,937 | <p>I am writing a decorator that needs to call other functions prior to call of the function that it is decorating. The decorated function may have positional arguments, but the functions the decorator will call can only accept keyword arguments. Does anyone have a handy way of converting positional arguments into keyword arguments?</p>
<p>I know that I can get a list of the variable names of the decorated function:</p>
<pre><code>>>> def a(one, two=2):
... pass
>>> a.func_code.co_varnames
('one', 'two')
</code></pre>
<p>But I can't figure out how to tell what was passed in positionally and what was as keyword.</p>
<p>My decorator looks like this:</p>
<pre><code>class mydec(object):
def __init__(self, f, *args, **kwargs):
self.f = f
def __call__(self, *args, **kwargs):
hozer(**kwargs)
self.f(*args, **kwargs)
</code></pre>
<p>Is there a way other than just comparing kwargs and co_varnames, adding to kwargs anything not in there, and hoping for the best?</p>
| 8 | 2009-05-06T18:14:35Z | 2,313,392 | <p>Well, this may be overkill. I wrote it for the dectools package (on PyPi), so you can get updates there. It returns the dictionary taking into account positional, keyword, and default arguments. There is a test suite in the package (test_dict_as_called.py):</p>
<pre><code> def _dict_as_called(function, args, kwargs):
""" return a dict of all the args and kwargs as the keywords they would
be received in a real function call. It does not call function.
"""
names, args_name, kwargs_name, defaults = inspect.getargspec(function)
# assign basic args
params = {}
if args_name:
basic_arg_count = len(names)
params.update(zip(names[:], args)) # zip stops at shorter sequence
params[args_name] = args[basic_arg_count:]
else:
params.update(zip(names, args))
# assign kwargs given
if kwargs_name:
params[kwargs_name] = {}
for kw, value in kwargs.iteritems():
if kw in names:
params[kw] = value
else:
params[kwargs_name][kw] = value
else:
params.update(kwargs)
# assign defaults
if defaults:
for pos, value in enumerate(defaults):
if names[-len(defaults) + pos] not in params:
params[names[-len(defaults) + pos]] = value
# check we did it correctly. Each param and only params are set
assert set(params.iterkeys()) == (set(names)|set([args_name])|set([kwargs_name])
)-set([None])
return params
</code></pre>
| 4 | 2010-02-22T19:08:23Z | [
"python",
"decorator"
] |
Python convert args to kwargs | 830,937 | <p>I am writing a decorator that needs to call other functions prior to call of the function that it is decorating. The decorated function may have positional arguments, but the functions the decorator will call can only accept keyword arguments. Does anyone have a handy way of converting positional arguments into keyword arguments?</p>
<p>I know that I can get a list of the variable names of the decorated function:</p>
<pre><code>>>> def a(one, two=2):
... pass
>>> a.func_code.co_varnames
('one', 'two')
</code></pre>
<p>But I can't figure out how to tell what was passed in positionally and what was as keyword.</p>
<p>My decorator looks like this:</p>
<pre><code>class mydec(object):
def __init__(self, f, *args, **kwargs):
self.f = f
def __call__(self, *args, **kwargs):
hozer(**kwargs)
self.f(*args, **kwargs)
</code></pre>
<p>Is there a way other than just comparing kwargs and co_varnames, adding to kwargs anything not in there, and hoping for the best?</p>
| 8 | 2009-05-06T18:14:35Z | 19,535,485 | <p>If you're using Python >= 2.7 <code>inspect.getcallargs</code> does this for you out of the box. You'd just pass it the decorated function as the first argument, and then the rest of the arguments exactly as you plan to call it. Example:</p>
<pre><code>>>> def f(p1, p2, k1=None, k2=None, **kwargs):
... pass
>>> from inspect import getcallargs
</code></pre>
<p>I'm planning to do <code>f('p1', 'p2', 'p3', k2='k2', extra='kx1')</code> (note that k1 is being passed positionally as p3), so...</p>
<pre><code>>>> call_args = getcallargs(f, 'p1', 'p2', 'p3', k2='k2', extra='kx1')
>>> call_args
{'p2': 'p2', 'k2': 'k2', 'k1': 'p3', 'p1': 'p1', 'kwargs': {'extra': 'kx1'}}
</code></pre>
<p>If you know the decorated function won't use <code>**kwargs</code>, then that key won't appear in the dict, and you're done (and I'm assuming there's no <code>*args</code>, since that would break the requirement that everything have a name). If you <em>do</em> have <code>**kwargs</code>, as I have in this example, and want to include them with the rest of the named arguments, it takes one more line:</p>
<pre><code>>>> call_args.update(call_args.pop('kwargs'))
>>> call_args
{'p2': 'p2', 'k2': 'k2', 'k1': 'p3', 'p1': 'p1', 'extra': 'kx1'}
</code></pre>
| 2 | 2013-10-23T07:31:18Z | [
"python",
"decorator"
] |
Using Beautiful Soup, how do I iterate over all embedded text? | 830,997 | <p>Let's say I wanted to remove vowels from HTML:</p>
<pre><code><a href="foo">Hello there!</a>Hi!
</code></pre>
<p>becomes</p>
<pre><code><a href="foo">Hll thr!</a>H!
</code></pre>
<p>I figure this is a job for Beautiful Soup. How can I select the text in between tags and operate on it like this?</p>
| 4 | 2009-05-06T18:26:52Z | 831,544 | <p>Suppose the variable <code>test_html</code> has the following html content:</p>
<pre><code><html>
<head><title>Test title</title></head>
<body>
<p>Some paragraph</p>
Useless Text
<a href="http://stackoverflow.com">Some link</a>not a link
<a href="http://python.org">Another link</a>
</body></html>
</code></pre>
<p>Just do this:</p>
<pre><code>from BeautifulSoup import BeautifulSoup
test_html = load_html_from_above()
soup = BeautifulSoup(test_html)
for t in soup.findAll(text=True):
text = unicode(t)
for vowel in u'aeiou':
text = text.replace(vowel, u'')
t.replaceWith(text)
print soup
</code></pre>
<p>That prints:</p>
<pre><code><html>
<head><title>Tst ttl</title></head>
<body>
<p>Sm prgrph</p>
Uslss Txt
<a href="http://stackoverflow.com">Sm lnk</a>nt lnk
<a href="http://python.org">Anthr lnk</a>
</body></html>
</code></pre>
<p>Note that the tags and attributes are untouched.</p>
| 7 | 2009-05-06T20:18:58Z | [
"python",
"beautifulsoup"
] |
How to make a persistent com server in Python | 831,217 | <p>I'd like to create a COM server that can hold it state across the calls. My goal is to have a thread-safe in-memory database. And provide an access to it via COM interface.</p>
<p>Is that possible?</p>
| 0 | 2009-05-06T19:11:41Z | 854,850 | <p><a href="http://www.devshed.com/c/a/Python/Windows-Programming-in-Python-Creating-COM-Servers/" rel="nofollow">http://www.devshed.com/c/a/Python/Windows-Programming-in-Python-Creating-COM-Servers/</a></p>
| 0 | 2009-05-12T20:59:03Z | [
"python",
"com"
] |
How to make a persistent com server in Python | 831,217 | <p>I'd like to create a COM server that can hold it state across the calls. My goal is to have a thread-safe in-memory database. And provide an access to it via COM interface.</p>
<p>Is that possible?</p>
| 0 | 2009-05-06T19:11:41Z | 7,378,250 | <p>Given the lack of popularity of COM I've ended up providing XMLRPC interface at least I know how to diagnose errors if they occur.</p>
| 0 | 2011-09-11T12:42:26Z | [
"python",
"com"
] |
A production ready server to serve django on win32 | 831,288 | <p>I'd like to serve django application on windows XP/Vista.
The application is an at hoc web interface to a windows program so it won't be put under heavy load (around 100 requests per second).</p>
<p>Do you know any small servers that can be easily deployed on windows to serve a django app? (IIS is not an option as the app should work on all versions of windows)</p>
| 3 | 2009-05-06T19:25:46Z | 831,322 | <p>Why not Apache ? </p>
<p>Nokia have developed a scaled down version of apache to run on their mobile phones. It supports python. </p>
<p><a href="http://research.nokia.com/research/projects/mobile-web-server/" rel="nofollow">http://research.nokia.com/research/projects/mobile-web-server/</a></p>
<p>Also do you need anything else such as database support etc? </p>
| 0 | 2009-05-06T19:34:05Z | [
"python",
"windows",
"django"
] |
A production ready server to serve django on win32 | 831,288 | <p>I'd like to serve django application on windows XP/Vista.
The application is an at hoc web interface to a windows program so it won't be put under heavy load (around 100 requests per second).</p>
<p>Do you know any small servers that can be easily deployed on windows to serve a django app? (IIS is not an option as the app should work on all versions of windows)</p>
| 3 | 2009-05-06T19:25:46Z | 831,449 | <p><a href="http://cherrypy.org">cherrypy</a> includes a good server. <a href="http://lincolnloop.com/blog/2008/mar/25/serving-django-cherrypy/">Here</a>'s how you set it up to work with django and some benchmarks.</p>
<p><a href="http://twistedmatrix.com/trac/wiki/TwistedWeb">twisted.web</a> has <a href="http://wsgi.org">wsgi</a> support and that could be used to run your django application. <a href="http://blog.dreid.org/2009/03/twisted-django-it-wont-burn-down-your.html">Here</a>'s how you do it.</p>
<p>In fact any <a href="http://wsgi.org">wsgi</a> server will do. Here's one more example, this time using <a href="http://pypi.python.org/pypi/Spawning">spawning</a>:</p>
<pre><code>$ spawn --factory=spawning.django_factory.config_factory mysite.settings
</code></pre>
<p>And for using <a href="http://pythonpaste.org/">paste</a>, the info is gathered <a href="http://pythonpaste.org/djangopaste/">here</a>.</p>
<p>Of course, you could use apache with <a href="http://code.google.com/p/modwsgi/">mod_wsgi</a>. It would be just another wsgi server. <a href="http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango">Here</a> are the setup instructions.</p>
| 5 | 2009-05-06T19:57:34Z | [
"python",
"windows",
"django"
] |
A production ready server to serve django on win32 | 831,288 | <p>I'd like to serve django application on windows XP/Vista.
The application is an at hoc web interface to a windows program so it won't be put under heavy load (around 100 requests per second).</p>
<p>Do you know any small servers that can be easily deployed on windows to serve a django app? (IIS is not an option as the app should work on all versions of windows)</p>
| 3 | 2009-05-06T19:25:46Z | 831,639 | <p>If you want to give Apache a go, check out <a href="http://www.apachefriends.org/en/xampp.html" rel="nofollow">XAMPP</a> to see if it'll work for you. You can do a lightweight (read: no installation) "installation." Of course, you'll also want to install <a href="http://www.modpython.org/" rel="nofollow">mod_python</a> to run Django. <a href="http://jyotirmaya.blogspot.com/2008/11/xampp-python-django.html" rel="nofollow">This</a> post may help you set everything up. (Note: I have not used python/Django with XAMPP myself.)</p>
<p>Edit: Before someone points this out, XAMPP is not generally a production-ready tool. It's simply a useful way to see whether Apache will work for you. Also, I saw that you're using SQLite after the fact.</p>
| 1 | 2009-05-06T20:41:30Z | [
"python",
"windows",
"django"
] |
How do you create an anonymous Python telnet connection? | 831,679 | <p>I am trying to telnet into a server using Python on Windows XP. I can connect successfully by typing 'telnet HOST PORT' which creates an anonymous connection. But Python's telnetlib.Telnet(HOST, PORT) returns 'Connection refused'. Telnetting in Java also fails. Spelunking shows that Python tries to create an anonymous socket connection. My admin says he doesn't allow anonymous connections. But neither Python nor Java allow authentication parameters to be passed in during socket connection creation (not that I could find). Why does Windows' command-line telnet work when Python and Java both fail? Any advice?</p>
| 1 | 2009-05-06T20:51:39Z | 831,743 | <p>It would be a good idea to trace both connection attempts (a failing case and a successful case) with <a href="http://www.wireshark.org/" rel="nofollow">wireshark</a> or similar packet trace tool to see what the difference is at the protocol level.</p>
| 1 | 2009-05-06T21:03:46Z | [
"java",
"python",
"windows",
"telnet"
] |
How do you create an anonymous Python telnet connection? | 831,679 | <p>I am trying to telnet into a server using Python on Windows XP. I can connect successfully by typing 'telnet HOST PORT' which creates an anonymous connection. But Python's telnetlib.Telnet(HOST, PORT) returns 'Connection refused'. Telnetting in Java also fails. Spelunking shows that Python tries to create an anonymous socket connection. My admin says he doesn't allow anonymous connections. But neither Python nor Java allow authentication parameters to be passed in during socket connection creation (not that I could find). Why does Windows' command-line telnet work when Python and Java both fail? Any advice?</p>
| 1 | 2009-05-06T20:51:39Z | 831,845 | <p>First, eliminate telnetlib as your problem: <pre><code>import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("remote.host", 23))</code></pre> If that succeeds, there is a problem in your usage of <code>telnetlib</code>, and we'll need to see an example. If it fails, then you have a basic networking problem, and Lance's suggestion of pulling out ethereal/wireshark is your next step.</p>
| 1 | 2009-05-06T21:25:01Z | [
"java",
"python",
"windows",
"telnet"
] |
Python imaging, resize Turtle Graphics window | 831,894 | <p>My image is too large for the turtle window. I had to enlarge the image because the text I need at each spot overlaps. </p>
<p>How do I Resize the window in python?</p>
| 1 | 2009-05-06T21:34:58Z | 831,944 | <p>It sounds like you have drawn an image, but it has gone outside the borders of the window, so therefore you need to make the window larger to see the entire image. </p>
<p>To resize the window:</p>
<blockquote>
<p>setup( width = 200, height = 200, startx = None, starty = None) </p>
</blockquote>
<p>This will make your output window 200X200 (which may be too small for you so you'll need to make those numbers larger.) </p>
<p>Here is the URL where I found this information.
<a href="https://docs.python.org/2/library/turtle.html#module-turtle" rel="nofollow">TurtleDocs</a></p>
| 2 | 2009-05-06T21:48:15Z | [
"python",
"turtle-graphics"
] |
Scaffold or django-admin without Auth app | 831,934 | <p>I created my own Auth app, and now Admin is not working, what can you suggest?</p>
<p>Exception now is: 'User' object has no attribute 'is_authenticated'</p>
<p>I know my User really have no such method. So I have 2 ways:
- change admin
- adapt my user system</p>
<p>My question was: is there possibility to easily off admin bound to auth</p>
| -2 | 2009-05-06T21:45:29Z | 833,865 | <p>See the file django/contrib/admin/views/decorators.py:</p>
<pre><code>from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login
</code></pre>
<p>These are used in decorator <code>staff_member_required</code> which guards access to admin application.</p>
<p>Admin application requires <code>django.contrib.auth</code> - you might try to monkeypatch it, but it's a bad habit (Django is not RoR, Python is not Ruby).</p>
| 3 | 2009-05-07T10:21:29Z | [
"python",
"django",
"django-admin",
"scaffolding"
] |
Python: Finding all packages inside a package | 832,004 | <p>Given a package, how can I automatically find all its sub-packages?</p>
| 6 | 2009-05-06T22:00:39Z | 832,040 | <p>You can't rely on introspection of loaded modules, because sub-packages may not have been loaded. You'll have to look at the filesystem, assuming the top level package in question is not an egg, zip file, extension module, or loaded from memory.</p>
<pre><code>def get_subpackages(module):
dir = os.path.dirname(module.__file__)
def is_package(d):
d = os.path.join(dir, d)
return os.path.isdir(d) and glob.glob(os.path.join(d, '__init__.py*'))
return filter(is_package, os.listdir(dir))
</code></pre>
| 9 | 2009-05-06T22:11:51Z | [
"python",
"import",
"packages"
] |
Python: Finding all packages inside a package | 832,004 | <p>Given a package, how can I automatically find all its sub-packages?</p>
| 6 | 2009-05-06T22:00:39Z | 832,125 | <p>Inspired by James Emerton's answer:</p>
<pre><code>def find_subpackages(module):
result=[]
for thing in os.listdir(os.path.dirname(module.__file__)):
full=os.path.join(os.path.dirname(module.__file__),thing)
if os.path.isdir(full):
if glob.glob(os.path.join(full, '__init__.py*'))!=[]:
result.append(thing)
return result
</code></pre>
| 0 | 2009-05-06T22:32:25Z | [
"python",
"import",
"packages"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,023 | <p>I use TextMate for Rails, PHP and Python development and I love it.</p>
<p>After seeing other answers I feel like I should elaborate. I use MySQL currently as my primary database and Apache for a web server. When coding in PHP I prefer to use CodeIgniter rather than "vanilla" php.</p>
<p>However, most importantly I use SVN which you should use from the start (or any versioning tool), SVN lets me keep track of all the different versions of my code. So, for example if I break something which was working in revision 10, I can go back to revision 10 see what I changed and fix it, etc.</p>
| 2 | 2009-05-06T22:06:16Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,028 | <ul>
<li>svn or a modern dvcs (git, mercurial or bazaar)</li>
<li>Generally not an IDE. Instead, TextMate on Mac, Notepad++ on Windows, or the one true editor (emacs or vim) on Linux.</li>
<li>MySQL and SQL in general is worth understanding as a separate item.</li>
</ul>
| 10 | 2009-05-06T22:08:24Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,087 | <p>I mostly work with PHP. I regularly use: </p>
<p>Coding Environment: <strong>Netbeans, vim</strong></p>
<p>Framework: <strong>Zend Framework (sometimes Code Igniter)</strong></p>
<p>Troubleshooting and Profiling: <strong>xdebug, webgrind (or kcachegrind)</strong></p>
<p>Database: <strong>MySQL</strong> </p>
<p>Server: <strong>Apache</strong> </p>
<p>Shell: <strong>bash</strong> </p>
<p>Reference: <strong>php.net, (and sometimes StackOverflow!)</strong></p>
<p>Version Control: <strong>subversion, Vault (not by choice)</strong></p>
| 1 | 2009-05-06T22:21:49Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,107 | <p>Zend Framework
MySQL
Eclipse as an IDE (or Aptana Studio specifically)</p>
| 1 | 2009-05-06T22:26:59Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,210 | <ul>
<li>XDebug for debugging</li>
<li>phpUnderControl for agile tools</li>
</ul>
| 1 | 2009-05-06T23:01:06Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,215 | <p>emacs with the menubar disabled FTW, keeps the mind sharp, and once your muscle memory is tuned, your productivity should skyrocket.....maybe</p>
<p>eclipse + aptana can be a good thing too, i just wish I could figure out how to make it let me just edit a damn file without declaring a workspace and project etc...</p>
| 1 | 2009-05-06T23:02:32Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,273 | <p>I use Eclipse PDT (IDE) and Notepad++ (editor) for development. They fill each other out imo.</p>
<p>Kdiff3 for comparing files.</p>
<p>Subversion for version control at work. But git/mercury could be better, especially for a school situation.</p>
<p>On windows I use WinGrep to search for files with some content (usefull even if you dont know regex). (And on linux i use grep.)</p>
<p>For database I use MySQL at work. But I used PostgreSQL at my previous work site, and it is better.</p>
<p>For a school situation you could probably use xdebug at the web server(s) to display errors with <a href="http://www.xdebug.org/docs/stack%5Ftrace" rel="nofollow">stack traces on the web page</a>. You can also view the <a href="http://www.xdebug.org/docs/profiler" rel="nofollow">script profile with a gui</a> and <a href="http://www.xdebug.org/docs/remote" rel="nofollow">debug interactively</a> (works with eclipse and notepad++).</p>
| 1 | 2009-05-06T23:23:09Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,302 | <p>I like aptana so far</p>
| 1 | 2009-05-06T23:37:09Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,361 | <p>Source Control: Git (and I love github.com)</p>
<p>Editors: TextMate (Mac) , E-TextEditor (Windows, and soon on Linux)</p>
<p>IDEs: I hate IDEs, specially those Eclipse based ones like Aptana, but if your're an IDE guy or your project/company requires one NetBeans is the best.</p>
<p>Frameworks: Using Rails most of the time (in love with Ruby). soon looking at Django </p>
<p>P.S. I can't live without Firebug.</p>
| 1 | 2009-05-07T00:04:54Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,422 | <p>I'd add <a href="http://pylonshq.com/" rel="nofollow">pylons</a> to the Frameworks section under python. and <a href="http://www.sqlite.org/" rel="nofollow">sqlite</a> to the database section - if mainly for development purposes.</p>
<p>oh yeah, and <a href="http://ngrep.sourceforge.net/" rel="nofollow">ngrep</a> is awesome.</p>
<pre><code>
home/me$ ngrep -q -tt -W byline tcp and port 80
</code></pre>
<p>something like that will let you peek at everything going over the port in real time. incredibly useful when you are working on a non-standard or incomplete or modified protocol (e.g. STOMP) or in situations where you need confirm exactly what you are sending, or if you are just curious!</p>
| 1 | 2009-05-07T00:35:25Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,459 | <p>For web designers don't forget Photoshop, Dreamweaver and Flash.</p>
| 0 | 2009-05-07T00:54:39Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,460 | <p><strong>FTP Client!</strong> You will save your class hours of frustration if you can find them a good (free) FTP program. There are many free FTP clients, but they usually suffer from some of these problems:</p>
<ul>
<li>Poor interface design makes it tedious to upload/download multiple specific files to/from nested folders.</li>
<li>Unoptimized single-threaded transfer takes several minutes to upload hundreds of files, even when their combined size is only 50KB.</li>
<li>Bad FTP programs (or incorrect configuration of them) can erase line endings uploading from mac to linux, which corrupts your code.</li>
<li>Poor (or complete lack of) support for SFTP and storing private SSH key files.</li>
</ul>
<p>Unfortunately I can't really recommend any because I use my own suite of shell scripts (developed several years ago when I couldn't find a good client myself!).</p>
| 1 | 2009-05-07T00:54:58Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,463 | <p>When push comes to shove (or even pull) then I use <a href="http://www.wireshark.org/" rel="nofollow">Wireshark</a>, because sometimes you really <strong>really</strong> need to know what's going on!</p>
| 0 | 2009-05-07T00:57:26Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 832,586 | <p>I use Aptana/RadRails for my Ruby on Rails IDE. It's good.</p>
<p>Recently I've been using its debugger more, and it's saved me a fair amount of time.</p>
| 1 | 2009-05-07T02:03:36Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 833,077 | <p><strong>Database</strong> MySQL, CouchDB, SQLite</p>
<p><strong>Source Control</strong> Git</p>
<p><strong>Editor</strong> <a href="http://caladbolg.net/textadept" rel="nofollow">TextAdept</a>, E, vim</p>
<p><strong>Frameworks</strong> CakePHP, Ramaze</p>
<p><strong>Debugging</strong> Error messages? :(</p>
| 1 | 2009-05-07T05:57:39Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 834,513 | <p>Ruby on Rails actually has an implicit default stack. This is mostly defined by what the contributing community use, and some components have shifted over time, but there is surprisingly little divergence on some items compared to other communities, which is probably both a good and a bad thing. It's definitely helpful for learners, though.</p>
<ul>
<li><strong>Programming language:</strong> Ruby, for both application development and system administration</li>
<li><strong>Version control system:</strong> Git</li>
<li><strong>Application framework:</strong> Ruby on Rails (obviously)</li>
<li><strong>Deployment system:</strong> Capistrano</li>
<li><strong>SQL database:</strong> MySQL</li>
<li><strong>Web server:</strong> Currently Apache with Passenger, though older alternatives are still in common use</li>
<li><strong>Server OS:</strong> A Linux distribution (Ubuntu is probably the most popular)</li>
</ul>
<p>Many professional Rails developers uses Mac OS X desktops, and TextMate as the text editor. Most of the remainder use Linux (again, often Ubuntu), and a variety of text editors. Developing for Rails on Windows is currently a bit problematic, and not something that many developers do by choice.</p>
<p>IDEs don't have much take up ATM, but Netbeans is a strong choice. One benefit of using Netbeans for teaching is that you can get a complete Rails development stack in a single installation. Another is that it runs well on Windows.</p>
| 3 | 2009-05-07T12:59:38Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 883,916 | <p>Well, "Industry Standard" is somewhat difficult to nail down. It all depends on the person. However, I think in general, there are a number of things that you should commit yourself to. </p>
<ol>
<li>PHP, SQL Database of some sort, HTML, XML, CSS</li>
<li>A lightweight approach to editing. For example, Textmate, or E-text Editor, not Dreamweaver (you should never get comfortable with a program that completes everything for you, because you need to learn for yourself).</li>
<li>Photoshop basics (or even Gimp, but I don't recommend that), and Illustrator basics. Also, basic knowledge of Pictorial elements (differences between GIF, jpeg, etc)</li>
</ol>
<p>Those are just my opinions on the matter. Feel free to disagree. I also use either Wordpress, and/or Code Igniter for just about everything I do. </p>
| 1 | 2009-05-19T16:57:07Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 883,942 | <p>Netbeans with the jVi plugin. My biggest productivity boost I've ever had.</p>
| 1 | 2009-05-19T17:02:30Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 883,989 | <p>The most important tool for Ruby work is RubyGems. Ideally users should be able to install gems themselves. RubyGems can be configured to install gems in the user's home directory instead of system wide, which could work well on multi-user machines.</p>
<p>Of course a good text editor, revision control, and Firebug in Firefox or Dragonfly in Opera are also essential.</p>
| 1 | 2009-05-19T17:11:18Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 884,042 | <p>When working in Flash/Flex, i've found <a href="http://demonsterdebugger.com/" rel="nofollow">De Monster Debugger</a> to be extremely handy. Allows you to view your swf files in real time, and you can trace any object, and even call methods of objects.</p>
| 1 | 2009-05-19T17:21:17Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 1,629,310 | <p>Working on large, complex PHP applications can be overwhelming. We have a new Eclipse plugin for that: <a href="http://www.nwiresoftware.com/products/nwire-php" rel="nofollow">nWire for PHP</a>.</p>
<p>nWire for PHP is an innovative Eclipse plugin (works with Eclipse PDT & Zend Studio 7) which accelerates PHP development by helping developers navigate through their code and better understand the architecture of their application. nWire offers unique tools for real time code visualization, navigation and search. </p>
| 1 | 2009-10-27T07:54:09Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 2,028,445 | <p>I'm going to guess that it is web development that your father wants to teach. One thing that slows down the learning of web development is also having to learn how to configure infrastructure (e.g. web server, database, application server, etc) and deploy applications. These activities take a surprising amount of time, and interrupt the flow of learning. </p>
<p>The following application stack will drastically reduce the time spent configuring and deploying infrastructure:</p>
<ul>
<li><strong>Application Stack</strong>: <a href="http://rubyonrails.org/" rel="nofollow">Ruby On Rails</a> with the SQLite Database (because it requires no config). Ruby on Rails lets you develop very quickly on your local machine. Rails installs quickly, and there is no database or web server configuration required for your test environment. </li>
<li><strong>Version Control</strong>: <a href="http://www.git-scm.com/" rel="nofollow">git</a> - git lets you learn the basics of version control without needing to configure a git server. Very little configuration needed to get going with git. </li>
<li><strong>Deployment Platform</strong>: <a href="http://heroku.com" rel="nofollow">heroku.com</a>. Deploying to heroku is a matter of running "git push heroku master" from your command line. Once you do that, Heroku.com has scripts that compile your code into an application "slug" and start up the application server and connect it to your PostgreSQL database. (If you are using "vanilla" ActiveRecord data manipulations, you'll see no differences between using SQLite locally and PostgreSQL on Heroku). Heroku is free for small applications, small traffic, and small databases. i.e. Your dad's school doesn't have to cough up cash for deployment servers. Heroku also gives a unique domain to every heroku application that is visible on the internet, and if you validate your account with a credit card, you can point your own domains to your heroku application. Check out <a href="http://docs.heroku.com/quickstart" rel="nofollow">http://docs.heroku.com/quickstart</a> for more information. </li>
</ul>
<p>The key here is that not having to worry about configuration and deployment leaves students with much more mental capacity to concentrate on software design. </p>
| 0 | 2010-01-08T15:11:26Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 2,030,271 | <ul>
<li>Ruby on Rails</li>
<li>MacVim</li>
<li>Git</li>
<li>Chrome has Webkit web development inspector for web debugging</li>
<li>MySQL/SQLite (you might want to look into MongoDB)</li>
</ul>
| 1 | 2010-01-08T19:50:42Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 2,030,972 | <p>Cart before the horse. Introduce tools if only absolutely necessary. The goal should be to teach programming and protocols. Throwing in tools is sure to confuse and overwhelm students. </p>
<p>Based on the question, I'm not sure your father has the experience to design a web development program. We are talking about students' futures here. </p>
| 1 | 2010-01-08T21:44:45Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 18,573,446 | <p>No doubt PHP is one of the most popular languages amongst developers and aids them in creating innovative and dynamic web applications. PHP developers keep looking for useful and handy php tools which they can use to make their workflow and web related tasks easier, faster, and better. There are scads of php tools available over the internet for php developers, but finding an appropriate php tool is quite an arduous task and demands effort and time.
I found some lists over the interne..Hope this will help you.</p>
<p><a href="http://www.thegeekyglobe.com/top-7-php-tools-for-web-developers.html" rel="nofollow">http://www.thegeekyglobe.com/top-7-php-tools-for-web-developers.html</a></p>
<p><a href="http://codegeekz.com/10-best-php-tools-for-developers/" rel="nofollow">http://codegeekz.com/10-best-php-tools-for-developers/</a></p>
| 1 | 2013-09-02T12:34:54Z | [
"php",
"python",
"ruby"
] |
What tools do web developers use with PHP, Ruby on Rails, Python, etc? | 832,017 | <p>A good friend just sent me the following email</p>
<blockquote>
<p>My father is putting together a proposal for a local college to start a center of innovation and technology. As part of that, heâs proposing they teach web design and web development. My question is in your opinion what are the âindustry standardâ tools for both web design and web development. I think I have a good handle on the web design (html, flash, photoshop, dreamweaver), but I want your take and need some guidance on web development (.net, ajax, visual C++, rubyonrails). Thoughts?</p>
</blockquote>
<p>I was able to instruct him on what tools are predominant on the Microsoft Stack (Visual Studio + Expression Studio), but I'm not exactly sure what people writing in ruby on rails, or python, or PHP, etc., are using.</p>
<p>I'm asking this here because:</p>
<ol>
<li>Who better to ask than developers</li>
<li>Those looking to get started in these languages might find these tools very useful.</li>
</ol>
<p>So those of you who use these stacks, what type of tools do you use for your development?</p>
<h2>Summary</h2>
<blockquote>
<h3>Database</h3>
<ul>
<li><a href="http://mysql.com/" rel="nofollow">MySql</a></li>
<li><a href="http://www.postgresql.org/" rel="nofollow">PostgreSQL</a></li>
</ul>
<h3>Source Control</h3>
<ul>
<li><a href="http://subversion.tigris.org/" rel="nofollow">Subversion</a></li>
<li><a href="http://git-scm.com/" rel="nofollow">Git</a></li>
<li><a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow">Mercurial</a></li>
<li><a href="http://bazaar-vcs.org/" rel="nofollow">Bazaar</a></li>
</ul>
<h3>Editors</h3>
<ul>
<li><a href="http://macromates.com/" rel="nofollow">TextMate</a> (Mac)</li>
<li><a href="http://notepad-plus.sourceforge.net/uk/site.htm" rel="nofollow">Notepad++</a> (Windows)</li>
<li>emacs or <a href="http://www.vim.org/" rel="nofollow">vim</a> (Cross-platform)</li>
</ul>
<h3>IDEs</h3>
<ul>
<li><a href="http://www.netbeans.org/" rel="nofollow">NetBeans</a></li>
<li><a href="http://www.aptana.com/" rel="nofollow">Aptana</a></li>
<li><a href="http://www.eclipse.org/" rel="nofollow">Eclipse</a> - <a href="http://www.eclipse.org/" rel="nofollow">Eclipse PDT</a></li>
</ul>
<h3>Frameworks</h3>
<ul>
<li><a href="http://framework.zend.com/" rel="nofollow">Zend Framework</a> (PHP)</li>
<li><a href="http://codeigniter.com/" rel="nofollow">Code Igniter</a> (PHP)</li>
<li><a href="http://cakephp.org/" rel="nofollow">CakePHP</a> (PHP)</li>
<li><a href="http://www.djangoproject.com/" rel="nofollow">Django</a> (Python)</li>
<li><a href="http://www.turbogears.com/" rel="nofollow">TurboGears</a> (Python)</li>
<li><a href="http://rubyonrails.org/" rel="nofollow">Rails</a> (Ruby)</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" rel="nofollow">Xdebug</a> + <a href="http://code.google.com/p/webgrind/" rel="nofollow">WebGrind</a> (PHP)</li>
<li><a href="http://getfirebug.com/" rel="nofollow">Firebug</a> (Cross-platform, in-browser)</li>
</ul>
</blockquote>
| 9 | 2009-05-06T22:04:34Z | 26,889,612 | <p>For python PyCharm and for javascript I use Webstorm</p>
| 0 | 2014-11-12T14:41:30Z | [
"php",
"python",
"ruby"
] |
How to set up Python in a web server? | 832,140 | <p>Not exactly about programming, but I need help with this.</p>
<p>I'm running a development sever with WampServer. I want to install Python (because I prefer to use Python over PHP), but it seems there isn't an obvious choice. I've read about mod_python and WSGI, and about how the latter is better.</p>
<p>However, from what I gathered (I may be wrong) you have to do more low-level stuff with WSGI than with PHP. So I researched about Django, but it seems too complex for what I want.</p>
<p>So, what recommendations would you give to a newbie in this area?</p>
<p>Again, sorry if this isn't about programming, but it's related, and this seems like a nice place to ask.</p>
| 4 | 2009-05-06T22:36:24Z | 832,159 | <p>Django is not a web server, but a web application framework.</p>
<p>If you want a bare-bones Python webserver capable of some dynamic and some static content, have a look at <a href="http://www.cherrypy.org/">CherryPy</a>.</p>
| 5 | 2009-05-06T22:41:23Z | [
"python",
"windows",
"django"
] |
How to set up Python in a web server? | 832,140 | <p>Not exactly about programming, but I need help with this.</p>
<p>I'm running a development sever with WampServer. I want to install Python (because I prefer to use Python over PHP), but it seems there isn't an obvious choice. I've read about mod_python and WSGI, and about how the latter is better.</p>
<p>However, from what I gathered (I may be wrong) you have to do more low-level stuff with WSGI than with PHP. So I researched about Django, but it seems too complex for what I want.</p>
<p>So, what recommendations would you give to a newbie in this area?</p>
<p>Again, sorry if this isn't about programming, but it's related, and this seems like a nice place to ask.</p>
| 4 | 2009-05-06T22:36:24Z | 832,163 | <p>To use python with your Apache server you need to install mod_python the following links should help you out a bit.</p>
<ul>
<li><a href="http://httpd.apache.org/modules/python-download.cgi" rel="nofollow">http://httpd.apache.org/modules/python-download.cgi</a></li>
<li><a href="http://www.modpython.org/" rel="nofollow">http://www.modpython.org/</a> </li>
</ul>
| 0 | 2009-05-06T22:42:36Z | [
"python",
"windows",
"django"
] |
How to set up Python in a web server? | 832,140 | <p>Not exactly about programming, but I need help with this.</p>
<p>I'm running a development sever with WampServer. I want to install Python (because I prefer to use Python over PHP), but it seems there isn't an obvious choice. I've read about mod_python and WSGI, and about how the latter is better.</p>
<p>However, from what I gathered (I may be wrong) you have to do more low-level stuff with WSGI than with PHP. So I researched about Django, but it seems too complex for what I want.</p>
<p>So, what recommendations would you give to a newbie in this area?</p>
<p>Again, sorry if this isn't about programming, but it's related, and this seems like a nice place to ask.</p>
| 4 | 2009-05-06T22:36:24Z | 832,176 | <p>If it's truly a development server you're setting up, and not a machine that will be promoted to production at some point, Django has a <a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/#the-development-server" rel="nofollow">built-in development webserver</a> that requires no Apache configuration. </p>
<p>Your observation about the low-level work reflects some of the differences between PHP and Python. PHP is a language designed from the start for the primary purpose of making web pages. Python is a language. Mod_Python and Mod_WSGI give the input to/output from that language a way to live in a web request/response environment. Django adds web-aware framework conveniences.</p>
<p>You mention that python seems too complex for what you want, which rather begs the question: what do you want? :-)</p>
| 0 | 2009-05-06T22:47:24Z | [
"python",
"windows",
"django"
] |
How to set up Python in a web server? | 832,140 | <p>Not exactly about programming, but I need help with this.</p>
<p>I'm running a development sever with WampServer. I want to install Python (because I prefer to use Python over PHP), but it seems there isn't an obvious choice. I've read about mod_python and WSGI, and about how the latter is better.</p>
<p>However, from what I gathered (I may be wrong) you have to do more low-level stuff with WSGI than with PHP. So I researched about Django, but it seems too complex for what I want.</p>
<p>So, what recommendations would you give to a newbie in this area?</p>
<p>Again, sorry if this isn't about programming, but it's related, and this seems like a nice place to ask.</p>
| 4 | 2009-05-06T22:36:24Z | 832,409 | <p>Use <a href="http://code.google.com/p/modwsgi/" rel="nofollow">mod_wsgi</a> to embed Python in Apache. It works very, very well.</p>
<p>"However, from what I gathered (I may be wrong) you have to do more low-level stuff with WSGI than with PHP. So I researched about Django, but it seems too complex for what I want."</p>
<ol>
<li><p>If you try to write your entire application as a WSGI-compliant application, directly accessed via mod_wsgi, you will reinvent the wheel.</p></li>
<li><p>If you try to write your application in Django, you will have stuff up and running in the space of a few hours. Django is not "too complex" -- it's complete. You don't have to use all of it, but -- for any realistic application -- you'll need most of it. In particular, the built-in admin will save you mountains of programming.</p></li>
</ol>
| 3 | 2009-05-07T00:30:18Z | [
"python",
"windows",
"django"
] |
How to set up Python in a web server? | 832,140 | <p>Not exactly about programming, but I need help with this.</p>
<p>I'm running a development sever with WampServer. I want to install Python (because I prefer to use Python over PHP), but it seems there isn't an obvious choice. I've read about mod_python and WSGI, and about how the latter is better.</p>
<p>However, from what I gathered (I may be wrong) you have to do more low-level stuff with WSGI than with PHP. So I researched about Django, but it seems too complex for what I want.</p>
<p>So, what recommendations would you give to a newbie in this area?</p>
<p>Again, sorry if this isn't about programming, but it's related, and this seems like a nice place to ask.</p>
| 4 | 2009-05-06T22:36:24Z | 832,741 | <p><a href="http://werkzeug.pocoo.org/" rel="nofollow">Werkzeug</a> is a great little python tool (werkzeug) that works with mod_wsgi for creating simple apps that dont need database backends with CMS's, such as calculators .. They've even got a nifty <a href="http://werkzeug.pocoo.org/wiki30/" rel="nofollow">screencast</a> where they create a simple wiki in 30 minutes. </p>
<p>You can always add something like SQLAlchemy/FormAlchemy later on if you eventually do want to have a ORM and CMS.</p>
<p>Avoid mod_python tho, it's got a pretty big memory footprint and it's actually a bit harder to install and set up than mod_wsgi, in my opinion.</p>
| 2 | 2009-05-07T03:14:24Z | [
"python",
"windows",
"django"
] |
Launch a webpage on a Firefox (win) tab using Python | 832,331 | <p>I'm trying to launch a website url in a new tab using python in that way, but it didn't worked in these both ways:</p>
<p>Method 1:</p>
<pre><code>os.system('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/');
</code></pre>
<p>and Method 2:</p>
<pre><code>os.startfile('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/');
</code></pre>
<p>If I don't add the parameters (-new-tab <a href="http://www.google.com/">http://www.google.com/</a>) it works, opening the default page.</p>
| 13 | 2009-05-06T23:52:20Z | 832,338 | <p>You need to use the <a href="http://docs.python.org/library/webbrowser.html" rel="nofollow"><code>webbrowser</code></a> module</p>
<pre><code>import webbrowser
webbrowser.open('http://www.google.com')
</code></pre>
<p>[<strong>edit</strong>]</p>
<p>If you want to open a url in a non-default browser try:</p>
<pre><code>webbrowser.get('firefox').open_new_tab('http://www.google.com')
</code></pre>
| 38 | 2009-05-06T23:55:52Z | [
"python",
"windows",
"command-line"
] |
Launch a webpage on a Firefox (win) tab using Python | 832,331 | <p>I'm trying to launch a website url in a new tab using python in that way, but it didn't worked in these both ways:</p>
<p>Method 1:</p>
<pre><code>os.system('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/');
</code></pre>
<p>and Method 2:</p>
<pre><code>os.startfile('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/');
</code></pre>
<p>If I don't add the parameters (-new-tab <a href="http://www.google.com/">http://www.google.com/</a>) it works, opening the default page.</p>
| 13 | 2009-05-06T23:52:20Z | 832,348 | <p>Use <code>os.startfile()</code> passing only the url. This will cause the URL to be opened in a new tab/window in the user's default browser, which is much nicer to your user.</p>
| 3 | 2009-05-06T23:58:48Z | [
"python",
"windows",
"command-line"
] |
Launch a webpage on a Firefox (win) tab using Python | 832,331 | <p>I'm trying to launch a website url in a new tab using python in that way, but it didn't worked in these both ways:</p>
<p>Method 1:</p>
<pre><code>os.system('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/');
</code></pre>
<p>and Method 2:</p>
<pre><code>os.startfile('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/');
</code></pre>
<p>If I don't add the parameters (-new-tab <a href="http://www.google.com/">http://www.google.com/</a>) it works, opening the default page.</p>
| 13 | 2009-05-06T23:52:20Z | 832,356 | <p>If you want to start a program with parameters the <a href="http://docs.python.org/library/subprocess.html" rel="nofollow">subprocess</a> module is a better fit:</p>
<pre><code>import subprocess
subprocess.call([r'C:\Program Files\Mozilla Firefox\Firefox.exe',
'-new-tab', 'http://www.google.com/'])
</code></pre>
| 4 | 2009-05-07T00:02:09Z | [
"python",
"windows",
"command-line"
] |
Launch a webpage on a Firefox (win) tab using Python | 832,331 | <p>I'm trying to launch a website url in a new tab using python in that way, but it didn't worked in these both ways:</p>
<p>Method 1:</p>
<pre><code>os.system('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/');
</code></pre>
<p>and Method 2:</p>
<pre><code>os.startfile('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/');
</code></pre>
<p>If I don't add the parameters (-new-tab <a href="http://www.google.com/">http://www.google.com/</a>) it works, opening the default page.</p>
| 13 | 2009-05-06T23:52:20Z | 832,373 | <p>You might want to try:</p>
<pre><code>import os
os.spawnl(os.P_NOWAIT, r'C:\Program Files\Mozilla Firefox\Firefox.exe',
r'FireFox', '-new-tab', 'http://www.google.com/')
</code></pre>
| 0 | 2009-05-07T00:09:37Z | [
"python",
"windows",
"command-line"
] |
Duplicate text detection / hashing | 832,485 | <p>I have sets of strings in a database. Each set will have less than 500 members, there will be tens of thousands of sets, and the strings are natural language. I would like to detect duplicate strings within each set. New strings will be compared with an existing set, and added to the database if they are unique.</p>
<p>Are there hashing algorithms that would be effective at finding (very) similar strings? For example, the strings probably would have the same number of words, but the encoding may be slightly different (UTF-8 vs Latin-1).</p>
| 1 | 2009-05-07T01:12:10Z | 832,488 | <p>If there are only 500 strings in the database, perhaps you can directly compare to each one. First convert to a standard representation (say UTF-16). The <a href="http://en.wikipedia.org/wiki/Levenshtein_distance" rel="nofollow">Levenshtein distance</a> can be a nice way of comparing the similarity of two strings.</p>
| 1 | 2009-05-07T01:16:09Z | [
"python"
] |
Duplicate text detection / hashing | 832,485 | <p>I have sets of strings in a database. Each set will have less than 500 members, there will be tens of thousands of sets, and the strings are natural language. I would like to detect duplicate strings within each set. New strings will be compared with an existing set, and added to the database if they are unique.</p>
<p>Are there hashing algorithms that would be effective at finding (very) similar strings? For example, the strings probably would have the same number of words, but the encoding may be slightly different (UTF-8 vs Latin-1).</p>
| 1 | 2009-05-07T01:12:10Z | 832,559 | <p>For starters, you should probably do some sort of normalization. You should probably convert all of your text to a single encoding (eg: UTF-8). You may also want to do case-folding, other <a href="http://unicode.org/reports/tr15/" rel="nofollow">Unicode normalizations</a> and perhaps also sorting each set (depending on how you're storing them).</p>
<p>It's unclear (to me) from your question whether you want to find exact matches or just string sets that are "similar". If you only care about exact matches once the normalization is taken into account, then you're pretty much done. Just have an index on the normalized forms of your string sets and you can look up new sets quickly by normalizing them as well.</p>
<p>If you want to find near matches then you'll probably want to do some sort of similarity hashing. The Wikipedia article on <a href="http://en.wikipedia.org/wiki/Locality%5Fsensitive%5Fhashing" rel="nofollow">Locality Sensitive Hashing</a> describes a number of techniques.</p>
<p>The basic idea behind a number of these techniques is to compute a handful of very lossy hashes on each string, h[0] through h[n]. To look up a new string set you'd compute its hashes and look each of these up. Anything that gets at least one match is "similar", and the more matches the more similar it is (and you can choose what threshhold to cut things off at).</p>
| 3 | 2009-05-07T01:45:35Z | [
"python"
] |
Duplicate text detection / hashing | 832,485 | <p>I have sets of strings in a database. Each set will have less than 500 members, there will be tens of thousands of sets, and the strings are natural language. I would like to detect duplicate strings within each set. New strings will be compared with an existing set, and added to the database if they are unique.</p>
<p>Are there hashing algorithms that would be effective at finding (very) similar strings? For example, the strings probably would have the same number of words, but the encoding may be slightly different (UTF-8 vs Latin-1).</p>
| 1 | 2009-05-07T01:12:10Z | 832,590 | <p>The short answer is just guess at what a good hash parameter would be that matches your ideas of "similar". </p>
<p>Probably just something like sum of all the letters (A) and the sum of the differences between adjacent letters (B), might work. For each new string, use its A and B values to quickly lookup a now much smaller set of similar strings, and then do a more careful comparison between these.</p>
<p>This probably isn't the purest solution, but practically, lots of problems are solved this way. Beyond this, I think there is currently quite a bit of work solving similar problems in genetics (i.e. finding similar gene sequences within huge databases), but I don't think there's an accepted generic solution to this problem.</p>
| 1 | 2009-05-07T02:05:37Z | [
"python"
] |
Duplicate text detection / hashing | 832,485 | <p>I have sets of strings in a database. Each set will have less than 500 members, there will be tens of thousands of sets, and the strings are natural language. I would like to detect duplicate strings within each set. New strings will be compared with an existing set, and added to the database if they are unique.</p>
<p>Are there hashing algorithms that would be effective at finding (very) similar strings? For example, the strings probably would have the same number of words, but the encoding may be slightly different (UTF-8 vs Latin-1).</p>
| 1 | 2009-05-07T01:12:10Z | 832,840 | <p>This might be overkill, but you might want to try <a href="http://www.nltk.org/Home" rel="nofollow">NLTK (Natural Language Toolkit)</a>, which is Python based.</p>
<p>One feature that might be useful is to <a href="http://nltk.googlecode.com/svn/trunk/doc/book/ch08.html" rel="nofollow">analyze sentence structure</a>. Of course that might lead to some strings being marked as duplicate because they have the same grammar structure, but different words and meaning.</p>
<p>You might also be able to use probability and classification features.</p>
| 0 | 2009-05-07T03:58:55Z | [
"python"
] |
Duplicate text detection / hashing | 832,485 | <p>I have sets of strings in a database. Each set will have less than 500 members, there will be tens of thousands of sets, and the strings are natural language. I would like to detect duplicate strings within each set. New strings will be compared with an existing set, and added to the database if they are unique.</p>
<p>Are there hashing algorithms that would be effective at finding (very) similar strings? For example, the strings probably would have the same number of words, but the encoding may be slightly different (UTF-8 vs Latin-1).</p>
| 1 | 2009-05-07T01:12:10Z | 833,585 | <p>you could get crazy and try latent semantic analysis/mapping and the singular value decomposition:
<a href="http://www.ling.upenn.edu/courses/cogs501/BellegardaIEEE.pdf" rel="nofollow">latent semantic mapping</a></p>
<p>together with <a href="http://tedlab.mit.edu/~dr/svdlibc/" rel="nofollow">SVDLIBC</a>, which is pretty easy to get going with.</p>
| 0 | 2009-05-07T09:00:37Z | [
"python"
] |
Duplicate text detection / hashing | 832,485 | <p>I have sets of strings in a database. Each set will have less than 500 members, there will be tens of thousands of sets, and the strings are natural language. I would like to detect duplicate strings within each set. New strings will be compared with an existing set, and added to the database if they are unique.</p>
<p>Are there hashing algorithms that would be effective at finding (very) similar strings? For example, the strings probably would have the same number of words, but the encoding may be slightly different (UTF-8 vs Latin-1).</p>
| 1 | 2009-05-07T01:12:10Z | 10,756,877 | <p><a href="http://prosehack.wordpress.com/2012/05/25/a-simple-near-duplicate-detection-algorithm/" rel="nofollow">This post</a> on my blog may be of interest.</p>
<p>A description of the algorithm and link to the code is provided. In short, it's an n-grams based approach that makes no assumption about the content or structure of the input, and generates constant length signatures for all input documents.</p>
| 1 | 2012-05-25T15:07:17Z | [
"python"
] |
What is the best way to programmatically log into a web site in order to screen scrape? (Preferably in Python) | 832,673 | <p>I want to be able to log into a website programmatically and periodically obtain some information from the site. What is the best tool(s) that would make this as simple as possible? I'd prefer a Python library of some type because I want to become more proficient in Python, but I'm open to any suggestions.</p>
| 2 | 2009-05-07T02:45:59Z | 832,697 | <p>You can try Mechanize (<a href="http://wwwsearch.sourceforge.net/mechanize/" rel="nofollow">http://wwwsearch.sourceforge.net/mechanize/</a>) for programmatic web-browsing, and definitely use Beautiful Soup (<a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow">http://www.crummy.com/software/BeautifulSoup/</a>) for the scraping.</p>
| 8 | 2009-05-07T02:58:54Z | [
"python",
"screen-scraping"
] |
What is the best way to programmatically log into a web site in order to screen scrape? (Preferably in Python) | 832,673 | <p>I want to be able to log into a website programmatically and periodically obtain some information from the site. What is the best tool(s) that would make this as simple as possible? I'd prefer a Python library of some type because I want to become more proficient in Python, but I'm open to any suggestions.</p>
| 2 | 2009-05-07T02:45:59Z | 833,506 | <p>i recommend using <a href="http://twill.idyll.org/" rel="nofollow">twill</a> it makes it a snap to do the login procedure. then use beautifulsoup etc.
as described above. ive never tried mechanize, but it looks pretty good.</p>
| 1 | 2009-05-07T08:42:12Z | [
"python",
"screen-scraping"
] |
What is the best way to programmatically log into a web site in order to screen scrape? (Preferably in Python) | 832,673 | <p>I want to be able to log into a website programmatically and periodically obtain some information from the site. What is the best tool(s) that would make this as simple as possible? I'd prefer a Python library of some type because I want to become more proficient in Python, but I'm open to any suggestions.</p>
| 2 | 2009-05-07T02:45:59Z | 833,559 | <p>I once wrote a Python script to automatically log into vBulletin forums. The difficult part was knowing how to correctly form the login request and that is something that a library won't help you with. I found <a href="http://livehttpheaders.mozdev.org/" rel="nofollow">Live Http Headers</a> - an addon for Firefox - to be pretty helpful in seeing what is sent between the client and server during the login process.</p>
<p>I also agree with everyone else that Beautiful Soup is pretty awesome.</p>
| 2 | 2009-05-07T08:52:47Z | [
"python",
"screen-scraping"
] |
What is the best way to programmatically log into a web site in order to screen scrape? (Preferably in Python) | 832,673 | <p>I want to be able to log into a website programmatically and periodically obtain some information from the site. What is the best tool(s) that would make this as simple as possible? I'd prefer a Python library of some type because I want to become more proficient in Python, but I'm open to any suggestions.</p>
| 2 | 2009-05-07T02:45:59Z | 834,297 | <p>Most of us use <a href="http://docs.python.org/library/urllib2.html" rel="nofollow">urllib2</a> to get the page; it can handle various forms of authentication and cookie collection. Then <a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow">Beautiful Soup</a> to parse the results.</p>
| 3 | 2009-05-07T12:13:11Z | [
"python",
"screen-scraping"
] |
What is the best way to programmatically log into a web site in order to screen scrape? (Preferably in Python) | 832,673 | <p>I want to be able to log into a website programmatically and periodically obtain some information from the site. What is the best tool(s) that would make this as simple as possible? I'd prefer a Python library of some type because I want to become more proficient in Python, but I'm open to any suggestions.</p>
| 2 | 2009-05-07T02:45:59Z | 25,520,459 | <p>just for screen scraping you can use combination of url lib + pyqyery.
<a href="https://pythonhosted.org/pyquery/" rel="nofollow">https://pythonhosted.org/pyquery/</a></p>
| 0 | 2014-08-27T06:40:23Z | [
"python",
"screen-scraping"
] |
PDF Tables of Arbitrary (within reason) Width | 832,693 | <p>I know PDF generation has been discussed a lot here; however, I've yet to find what I need.</p>
<p>I'm trying to generate PDF reports (mainly tables) from python. Yes I've tried ReportLab and Pisa. Both had column content "break out" in circumstances I didn't think were unreasonable and unrealistic to encounter in production. </p>
<p>When I say reasonable I mean 8 - 12 columns of differing widths. Not 80 - 1200 or some such.</p>
<p>I don't need a native python solution as I will be able to have my script launch off the linux command line.</p>
<p>I have these reports working in XHTML and they look more or less perfect ... I'd prefer to leverage them.</p>
<p>What I'm asking is: does anyone know of a tool I can use that will render tables of arbitrary (again within reason) size in PDF with quality near XHTML browser rendering?</p>
<p>I'd like to use something like PrinceXML; however the size of this project doesn't justify the expense of such a tool.</p>
<p>As an aside I have tried to do what I need in Latex , something I'm not apposed to but if that is a <em>good idea</em> I'd appreciate an example.</p>
<p>Regards, and thanks in advance.</p>
| 2 | 2009-05-07T02:57:38Z | 832,904 | <p>Using TeX might give you good results. I would be tempted to avoid LaTeX, myself, but that's because it's a really complicated macro package and I've never really understood it when I've tried to use it; plus, at least given my tastes back then, it seemed a very verbose way to mark up my text compared with what I was used to using in plain TeX.</p>
<p>The real trick will be coming up with a way to escape all of the special characters your data might include so that the TeX source file you create won't error out because you, say, use an ampersand somewhere and TeX interprets it as an out-of-place command. It would take sitting down with the TeXBook for half an hour, probably, for me to get a quoting function working perfectly.</p>
<p>But if your data is just normal strings, then we can try printing a table without it. Here's an example:</p>
<pre><code>#!/usr/bin/env python
import os
# Create a 2x3 PDF table of items, using TeX.
format = r"# \hfil & \hfil #"
data = [['Hydrogen', 1],
['Silicon', 14],
['Mercury', 80]]
table_data = r'\cr '.join('&'.join(str(i) for i in row) for row in data)
f = open('table.tex', 'w')
f.write(r"\halign{" + format + r"\cr " + table_data + r"\cr}\end")
f.close()
os.system("tex table.tex")
os.system("dvipdf table.dvi")
</code></pre>
<p>The big problem, as you can see from the PDF this products (if you'll run it and take a look), is that the table has no borders, and, if you'll take a look at the TeXBook, you'll find that producing them â while always possible â is not the most natural or obvious of operations.</p>
<p>Come to think of it, maybe LaTeX <em>would</em> have some use, if it had macros to make tables with borders easy to create after all. :-)</p>
<p>Have you, by the way, just looked to see if WebKit or any of the other browser backends can be made to produce PDFs directly from HTML, from the command line? They produce PDFs somehow for printing; there must be a way to take advantage of that to turn your HTML into PDF directly.</p>
| 2 | 2009-05-07T04:36:25Z | [
"python",
"pdf",
"xhtml",
"latex"
] |
PDF Tables of Arbitrary (within reason) Width | 832,693 | <p>I know PDF generation has been discussed a lot here; however, I've yet to find what I need.</p>
<p>I'm trying to generate PDF reports (mainly tables) from python. Yes I've tried ReportLab and Pisa. Both had column content "break out" in circumstances I didn't think were unreasonable and unrealistic to encounter in production. </p>
<p>When I say reasonable I mean 8 - 12 columns of differing widths. Not 80 - 1200 or some such.</p>
<p>I don't need a native python solution as I will be able to have my script launch off the linux command line.</p>
<p>I have these reports working in XHTML and they look more or less perfect ... I'd prefer to leverage them.</p>
<p>What I'm asking is: does anyone know of a tool I can use that will render tables of arbitrary (again within reason) size in PDF with quality near XHTML browser rendering?</p>
<p>I'd like to use something like PrinceXML; however the size of this project doesn't justify the expense of such a tool.</p>
<p>As an aside I have tried to do what I need in Latex , something I'm not apposed to but if that is a <em>good idea</em> I'd appreciate an example.</p>
<p>Regards, and thanks in advance.</p>
| 2 | 2009-05-07T02:57:38Z | 837,011 | <p>The stand alone program : wkhtmltopdf is exactly what I needed. The PDF rendering of XHTML is the best of seen from a free tool.</p>
| 1 | 2009-05-07T20:59:00Z | [
"python",
"pdf",
"xhtml",
"latex"
] |
PDF Tables of Arbitrary (within reason) Width | 832,693 | <p>I know PDF generation has been discussed a lot here; however, I've yet to find what I need.</p>
<p>I'm trying to generate PDF reports (mainly tables) from python. Yes I've tried ReportLab and Pisa. Both had column content "break out" in circumstances I didn't think were unreasonable and unrealistic to encounter in production. </p>
<p>When I say reasonable I mean 8 - 12 columns of differing widths. Not 80 - 1200 or some such.</p>
<p>I don't need a native python solution as I will be able to have my script launch off the linux command line.</p>
<p>I have these reports working in XHTML and they look more or less perfect ... I'd prefer to leverage them.</p>
<p>What I'm asking is: does anyone know of a tool I can use that will render tables of arbitrary (again within reason) size in PDF with quality near XHTML browser rendering?</p>
<p>I'd like to use something like PrinceXML; however the size of this project doesn't justify the expense of such a tool.</p>
<p>As an aside I have tried to do what I need in Latex , something I'm not apposed to but if that is a <em>good idea</em> I'd appreciate an example.</p>
<p>Regards, and thanks in advance.</p>
| 2 | 2009-05-07T02:57:38Z | 837,111 | <p>I completely agree with Brandon Craig Rhodes answer.
TeX, plain or with a macro package like LaTeX or ConTeXt, would be a good solution if
you need high quality output. However TeX is a heavy dependency</p>
<p>If you are looking for a lighter alternative you can try to</p>
<ul>
<li><p>generate xsl-fo and render it with apache-fop, or</p></li>
<li><p>write a Python wrapper around <a href="http://www.lowagie.com/iText" rel="nofollow">iText</a>.</p></li>
</ul>
<p>Both can do arbitrary width tables with borders.
xsl-fo is not too difficult to learn and if you are used to XML easier to
generate than LaTeX code.</p>
<p>iText is a powerful PDF library available under MPL and LGPL
There are versions written in Java and C# but unfortunately
there is none in Python yet.</p>
| 3 | 2009-05-07T21:23:37Z | [
"python",
"pdf",
"xhtml",
"latex"
] |
Cannot access Python server running as Windows service | 833,062 | <p>I have written a Python TCP/IP server for internal use, using win32serviceutil/py2exe to create a Windows service.</p>
<p>I installed it on a computer running Windows XP Pro SP3. However, I can't connect to it when it's running as a service. I can confirm that it's binding to the address/port, because I get a conflict when I try to bind to that address/port with another application. Further, I have checked the Windows Firewall settings and have added appropriate exceptions. If I run the server as a simple console application, everything works as expected. However, when I run it as a service, it doesn't work.</p>
<p>I vaguely remember running into this problem before, but for the life of me can't remember any of the details.</p>
<p>Suggestions, anyone?</p>
| 1 | 2009-05-07T05:52:05Z | 833,105 | <p>Possibly the program may be terminated just after initialization. Please check whether it is continuously listening to the requests.</p>
<pre><code>netstat -an |find /i "listening"
</code></pre>
<p>And analyze the command line parsed to the programs. You may use <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" rel="nofollow">procexp</a> to do that.</p>
| 1 | 2009-05-07T06:12:15Z | [
"python",
"windows-services",
"tcp"
] |
Cannot access Python server running as Windows service | 833,062 | <p>I have written a Python TCP/IP server for internal use, using win32serviceutil/py2exe to create a Windows service.</p>
<p>I installed it on a computer running Windows XP Pro SP3. However, I can't connect to it when it's running as a service. I can confirm that it's binding to the address/port, because I get a conflict when I try to bind to that address/port with another application. Further, I have checked the Windows Firewall settings and have added appropriate exceptions. If I run the server as a simple console application, everything works as expected. However, when I run it as a service, it doesn't work.</p>
<p>I vaguely remember running into this problem before, but for the life of me can't remember any of the details.</p>
<p>Suggestions, anyone?</p>
| 1 | 2009-05-07T05:52:05Z | 834,878 | <p>Check to see that the service is running under the Nertwork Service account and not the Local System account. The later doesn't have network access and is the default user to run services under. You can check this by going to the services app under administrative tool in the start menu and looking for your service. If you right-click the service you can go to properties and change the user that it is run under.</p>
| 0 | 2009-05-07T14:12:28Z | [
"python",
"windows-services",
"tcp"
] |
Cannot access Python server running as Windows service | 833,062 | <p>I have written a Python TCP/IP server for internal use, using win32serviceutil/py2exe to create a Windows service.</p>
<p>I installed it on a computer running Windows XP Pro SP3. However, I can't connect to it when it's running as a service. I can confirm that it's binding to the address/port, because I get a conflict when I try to bind to that address/port with another application. Further, I have checked the Windows Firewall settings and have added appropriate exceptions. If I run the server as a simple console application, everything works as expected. However, when I run it as a service, it doesn't work.</p>
<p>I vaguely remember running into this problem before, but for the life of me can't remember any of the details.</p>
<p>Suggestions, anyone?</p>
| 1 | 2009-05-07T05:52:05Z | 904,114 | <p>First of all, whenever you implement a Windows service, be sure to add proper logging.</p>
<p>My worker threads were terminating because of the exception, "The socket operation could not complete without blocking."</p>
<p>The solution was to simply call <code>sock.setblocking(1)</code> after accepting the connection.</p>
| 1 | 2009-05-24T16:29:36Z | [
"python",
"windows-services",
"tcp"
] |
Python style iterators in C | 833,063 | <p>The "yield" statement in python allows simple iteration from a procedure, and it also means that sequences don't need to be pre-calculated AND stored in a array of "arbitrary" size.</p>
<p>Is there a there a similar way of iterating (with yield) from a C procedure?</p>
| 6 | 2009-05-07T05:52:46Z | 833,071 | <p>I pull this URL out as a joke from time to time: <a href="http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html" rel="nofollow">Coroutines in C</a>.</p>
<p>I think the correct answer to your question is this: there's no direct equivalent, and attempts to fake it probably won't be nearly as clean or easy to use.</p>
| 3 | 2009-05-07T05:55:25Z | [
"python",
"c",
"iterator",
"jit",
"algol68"
] |
Python style iterators in C | 833,063 | <p>The "yield" statement in python allows simple iteration from a procedure, and it also means that sequences don't need to be pre-calculated AND stored in a array of "arbitrary" size.</p>
<p>Is there a there a similar way of iterating (with yield) from a C procedure?</p>
| 6 | 2009-05-07T05:52:46Z | 833,074 | <p>No.</p>
<p>Nice and short!</p>
| 0 | 2009-05-07T05:55:55Z | [
"python",
"c",
"iterator",
"jit",
"algol68"
] |
Python style iterators in C | 833,063 | <p>The "yield" statement in python allows simple iteration from a procedure, and it also means that sequences don't need to be pre-calculated AND stored in a array of "arbitrary" size.</p>
<p>Is there a there a similar way of iterating (with yield) from a C procedure?</p>
| 6 | 2009-05-07T05:52:46Z | 838,867 | <p><em>Here follows a community-wiki copy of the self-answer, which can be chosen as "the" answer. Please direct up/downvotes to the actual self-answer</em></p>
<p>Here is the method I found:</p>
<pre><code> /* Example calculates the sum of the prime factors of the first 32 Fibonacci numbers */
#include <stdio.h>
typedef enum{false=0, true=1}bool;
/* the following line is the only time I have ever required "auto" */
#define FOR(i,iterator) auto bool lambda(i); yield_init = (void *)&lambda; iterator; bool lambda(i)
#define DO {
#define YIELD(x) if(!yield(x))return
#define BREAK return false
#define CONTINUE return true
#define OD CONTINUE; }
/* Warning: _Most_ FOR(,){ } loops _must_ have a CONTINUE as the last statement.
* * Otherwise the lambda will return random value from stack, and may terminate early */
typedef void iterator; /* hint at procedure purpose */
static volatile void *yield_init;
#define YIELDS(type) bool (*yield)(type) = yield_init
iterator fibonacci(int n){
YIELDS(int);
int i;
int pair[2] = {0,1};
YIELD(0); YIELD(1);
for(i=2; i<n; i++){
pair[i%2] = pair[0] + pair[1];
YIELD(pair[i%2]);
}
}
iterator factors(int n){
YIELDS(int);
int i;
for(i=2; i*i<=n; i++){
while(n%i == 0 ){
YIELD(i);
n/=i;
}
}
YIELD(n);
}
main(){
FOR(int i, fibonacci(32)){
printf("%d:", i);
int sum = 0;
FOR(int factor, factors(i)){
sum += factor;
printf(" %d",factor);
CONTINUE;
}
printf(" - sum of factors: %d\n", sum);
CONTINUE;
}
}
</code></pre>
<p>Got the idea from <a href="http://rosettacode.org/wiki/Prime_decomposition#ALGOL_68">http://rosettacode.org/wiki/Prime_decomposition#ALGOL_68</a> - but it reads better in C</p>
| 6 | 2009-05-08T08:48:36Z | [
"python",
"c",
"iterator",
"jit",
"algol68"
] |
How to run a script without being in the tasktray? | 833,356 | <p>I have a scheduled task which runs a python script every 10 min</p>
<p>so it turns out that a script pops up on my desktop every 10 min</p>
<p>how can i make it invincible so my script will work in the background ?</p>
<p>I've been told that pythonw will do the work, but I cant figure out how to use it</p>
<p>any help ?
thanks</p>
| 1 | 2009-05-07T07:45:26Z | 833,364 | <p>Set the scheduled task to start the script as minimized.</p>
| 0 | 2009-05-07T07:50:13Z | [
"python"
] |
How to run a script without being in the tasktray? | 833,356 | <p>I have a scheduled task which runs a python script every 10 min</p>
<p>so it turns out that a script pops up on my desktop every 10 min</p>
<p>how can i make it invincible so my script will work in the background ?</p>
<p>I've been told that pythonw will do the work, but I cant figure out how to use it</p>
<p>any help ?
thanks</p>
| 1 | 2009-05-07T07:45:26Z | 833,391 | <blockquote>
<p>I've been told that pythonw will do the work, but I cant figure out how to use it</p>
</blockquote>
<p>Normally you just have to rename the file extension to .pyw. Then it will be executed by pythonw.</p>
| 3 | 2009-05-07T07:58:06Z | [
"python"
] |
Need help for developing facebook app | 833,406 | <p>I am trying to develop facebook app using django.</p>
<p>The problem I am facing is how to use facebook api and get user friend list.</p>
<p>view.py</p>
<pre><code>def canvas(request):
# Get the User object
user, created = FacebookUser.objects.get_or_create(id = request.facebook.uid)
return direct_to_template(request, 'canvas.fbml', extra_context={'fbuser': user,})
</code></pre>
<p>so it's working fine for me. I am getting user info in my page.</p>
<pre><code>Welcome,<fb:name uid="{{ fbuser.id }}" firstnameonly="true" useyou="false" />!
</code></pre>
<p>this is canvas.fbml</p>
<p>Help needed.</p>
<p>Thanks.</p>
| 1 | 2009-05-07T08:01:49Z | 833,454 | <p>Try using single quotes when loading up the userID etc. </p>
<p>Failing that it would appear to be either of the following
- Output error from python. The HTML / FBML output should be as follows</p>
<ul>
<li><p>Double check the attributes you are adding are correct. Case sensitive. </p></li>
<li><p>Are you loading you the correct authentication info (Keys) in this file? I'm assuming as its on the canvas its all ok. Test hte FBML in the FBML console. </p></li>
</ul>
| 0 | 2009-05-07T08:20:35Z | [
"python",
"django",
"facebook"
] |
What i need to install python 2.5 on SCO 5.0.5 | 833,624 | <p>I would love to install python2.5 on sco unix, and am wondering anybody who has attempted to do this?</p>
| 1 | 2009-05-07T09:11:34Z | 833,631 | <p>Did you already try the <a href="http://www.python.org/download/source/" rel="nofollow">standard source instructions</a>, and fail? If so, I guess it would be useful to mention what failed. This is almost a non-programming question, as it's phrased now ...</p>
| 2 | 2009-05-07T09:14:52Z | [
"python",
"unix"
] |
I need a sample of python unit testing sqlalchemy model with nose | 833,626 | <p>Can someone show me how to write unit tests for sqlalchemy model I created using nose.</p>
<p>I just need one simple example.</p>
<p>Thanks.</p>
| 22 | 2009-05-07T09:12:34Z | 833,915 | <p>You can simply create an in-memory SQLite database and bind your session to that.</p>
<p>Example:</p>
<pre><code>
from db import session # probably a contextbound sessionmaker
from db import model
from sqlalchemy import create_engine
def setup():
engine = create_engine('sqlite:///:memory:')
session.configure(bind=engine)
# You probably need to create some tables and
# load some test data, do so here.
# To create tables, you typically do:
model.metadata.create_all(engine)
def teardown():
session.remove()
def test_something():
instances = session.query(model.SomeObj).all()
eq_(0, len(instances))
session.add(model.SomeObj())
session.flush()
# ...
</code></pre>
| 35 | 2009-05-07T10:35:31Z | [
"python",
"unit-testing",
"testing",
"sqlalchemy",
"nose"
] |
I need a sample of python unit testing sqlalchemy model with nose | 833,626 | <p>Can someone show me how to write unit tests for sqlalchemy model I created using nose.</p>
<p>I just need one simple example.</p>
<p>Thanks.</p>
| 22 | 2009-05-07T09:12:34Z | 920,631 | <p>Check out the <a href="http://code.google.com/p/fixture/" rel="nofollow">fixture</a> project. We used nose to test that and it's also a way to declaratively define data to test against, there will be some extensive examples for you to use there!</p>
<p>See also <a href="http://farmdev.com/projects/fixture/" rel="nofollow">fixture documentation</a>.</p>
| 2 | 2009-05-28T12:40:17Z | [
"python",
"unit-testing",
"testing",
"sqlalchemy",
"nose"
] |
Returning http status codes in Python CGI | 833,715 | <p>Is it possible to send a status code other than 200 via a python cgi script (such as 301 redirect)</p>
| 15 | 2009-05-07T09:33:26Z | 833,728 | <p>via cgi script?</p>
<pre><code>print "Status:301\nLocation: http://www.google.com"
</code></pre>
| 20 | 2009-05-07T09:35:43Z | [
"python",
"http",
"cgi"
] |
Returning http status codes in Python CGI | 833,715 | <p>Is it possible to send a status code other than 200 via a python cgi script (such as 301 redirect)</p>
| 15 | 2009-05-07T09:33:26Z | 834,128 | <p>Via wsgi application?</p>
<pre><code>def simple_app(environ, start_response):
status = '301 Moved Permanently' # HTTP Status
headers = [('Location','http://example.com')] # HTTP Headers
start_response(status, headers)
return []
</code></pre>
| 0 | 2009-05-07T11:27:24Z | [
"python",
"http",
"cgi"
] |
Threading TCP Server as proxy between connected user and unix socket | 833,962 | <p>I'm writing web application where I need to push data from server to the connected clients. This data can be send from any other script from web application. For example one user make some changes on the server and other users should be notified about that. </p>
<p>So my idea is to use unix socket (path to socket based on user #ID) to send data for corresponding user (web app scripts will connect to this socket and write data). The second part is ThreadingTCPServer which will accept user connections and push data from unix socket to user over TCP socket connection.</p>
<p>Here is the workflow:</p>
<ol>
<li>Used connect to the TCP Server</li>
<li>Django script open unixsocket and write data to it.</li>
<li>TCP Server read data from unix socket and send it to open connection with user.</li>
</ol>
<p>I hope you understand my idea :)</p>
<p>So, I have 2 questions:</p>
<p>1.What do you think about my idea in general? Is it good or bad solution? Any recommendations are welcome.</p>
<p>2.Here is my code.</p>
<pre><code>import SocketServer
import socket
import netstring
import sys, os, os.path
import string
import time
class MyRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
try:
print "Connected:", self.client_address
user = self.request.recv(1024).strip().split(":")[1]
user = int(user)
self.request.send('Welcome #%s' % user)
self.usocket_path = '/tmp/u%s.sock' % user
if os.path.exists(self.usocket_path):
os.remove(self.usocket_path)
self.usocket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
self.usocket.bind(self.usocket_path)
self.usocket.listen(1)
while 1:
usocket_conn, addr = self.usocket.accept()
while 1:
data = usocket_conn.recv(1024)
if not data: break
self.request.send(data)
break
usocket_conn.close()
time.sleep(0.1)
except KeyboardInterrupt:
self.request.send('close')
self.request.close()
myServer = SocketServer.ThreadingTCPServer(('', 8081), MyRequestHandler)
myServer.serve_forever()
</code></pre>
<p>and I got an exception</p>
<pre><code> File "server1.py", line 23, in handle
self.usocket.listen(1)
File "<string>", line 1, in listen
error: (102, 'Operation not supported on socket')
</code></pre>
| 0 | 2009-05-07T10:46:21Z | 834,277 | <p>This is too complex. Use the <a href="http://docs.python.org/library/socketserver.html#module-SocketServer" rel="nofollow">socketserver</a> module, please. </p>
| 0 | 2009-05-07T12:08:26Z | [
"python",
"multithreading",
"sockets",
"tcp"
] |
Threading TCP Server as proxy between connected user and unix socket | 833,962 | <p>I'm writing web application where I need to push data from server to the connected clients. This data can be send from any other script from web application. For example one user make some changes on the server and other users should be notified about that. </p>
<p>So my idea is to use unix socket (path to socket based on user #ID) to send data for corresponding user (web app scripts will connect to this socket and write data). The second part is ThreadingTCPServer which will accept user connections and push data from unix socket to user over TCP socket connection.</p>
<p>Here is the workflow:</p>
<ol>
<li>Used connect to the TCP Server</li>
<li>Django script open unixsocket and write data to it.</li>
<li>TCP Server read data from unix socket and send it to open connection with user.</li>
</ol>
<p>I hope you understand my idea :)</p>
<p>So, I have 2 questions:</p>
<p>1.What do you think about my idea in general? Is it good or bad solution? Any recommendations are welcome.</p>
<p>2.Here is my code.</p>
<pre><code>import SocketServer
import socket
import netstring
import sys, os, os.path
import string
import time
class MyRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
try:
print "Connected:", self.client_address
user = self.request.recv(1024).strip().split(":")[1]
user = int(user)
self.request.send('Welcome #%s' % user)
self.usocket_path = '/tmp/u%s.sock' % user
if os.path.exists(self.usocket_path):
os.remove(self.usocket_path)
self.usocket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
self.usocket.bind(self.usocket_path)
self.usocket.listen(1)
while 1:
usocket_conn, addr = self.usocket.accept()
while 1:
data = usocket_conn.recv(1024)
if not data: break
self.request.send(data)
break
usocket_conn.close()
time.sleep(0.1)
except KeyboardInterrupt:
self.request.send('close')
self.request.close()
myServer = SocketServer.ThreadingTCPServer(('', 8081), MyRequestHandler)
myServer.serve_forever()
</code></pre>
<p>and I got an exception</p>
<pre><code> File "server1.py", line 23, in handle
self.usocket.listen(1)
File "<string>", line 1, in listen
error: (102, 'Operation not supported on socket')
</code></pre>
| 0 | 2009-05-07T10:46:21Z | 834,285 | <p>I think You should not use unix sockets. If Your app will (someday) become popular or mission-critical, You won't be able to just add another server to add scalability or to make it redundant and fail-safe.</p>
<p>If, on the other hand, You will put the data into f.e. memcached (and user's "dataset number" as the separate key) You'll be able to put data into memcached from multiple servers and read it from multiple servers. If user will disconnect and connect back from some other server, You'll still be able to get the data for him.</p>
<p>You could also use a database (to make it more fail-safe), or a mix of database and memcached if You like, but I have seen an app using unix sockets in the way You are trying to, and the programmer regreted it later. The table could have userid, data and timestamp columns and You could remember the last timestamp for the given user.</p>
| 1 | 2009-05-07T12:10:38Z | [
"python",
"multithreading",
"sockets",
"tcp"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.