Hi,
I installed vsFTP in a Debian box. When manually upload file using ftp command, it's ok. i.e, the following session works:
john@myhost:~$ ftp xxx.xxx.xxx.xxx 5111
Connected to xxx.xxx.xxx.xxx.
220 Hello,Welcom to my FTP server.
Name (xxx.xxx.xxx.xxx:john): ftpuser
331 Please specify the password.
Password:
230 Login successful.
Re...
I downloaded the Python 2.6.5 source, built it for OS 10.6.4 64-bit, and installed numerous dependencies. I opened a big project our team has been working on recently, ran the unit tests, and one of the tests failed because I had installed Python built using UCS-2 (I didn't know this was the default of OS X!)
In a nutshell:
I didn't sup...
I have a model which looks like this:
class Search (db.Model) :
word = db.StringProperty()
an example "word" can look like word = "thisisaword"
I want to search all entities in Search for substrings like "this" "isa" etc.
How can i do this in App engine using python?
Update:
The words here will be domain names. So there is some...
Is there a way to do a variable assignment inside a function call in python? Something like
curr= []
curr.append(num = num/2)
...
I store groups of entities in the google app engine Data Store with the same ancestor/parent/entityGroup. This is so that the entities can be updated in one atomic datastore transaction.
The problem is as follows:
I start a db transaction
I update entityX by setting entityX.flag = True
I save entityX
I query for entity where flag == T...
I populate a python dictionary based on few conditions,
My question is can we retrieve in the same order as it is populated.
questions_dict={}
data = str(header_arr[opt]) + str(row)
questions_dict.update({data : xl_data})
valid_xl_format = 7
if (type.lower() == "ma" o...
How would one do something like this in python
Mainstring:
Sub1
Sub2
Sub3
then call upon each of those values by defining a Mainstring StringNumberOne
and
StringNumberOne.Sub1 = ""
...
We're building a test harness to push binary messages out on a UDP multicast.
The prototype is using the Twisted reactor loop to push out messages, which is achieving just about the level of traffic we require - about 120000 messages per second.
We have a 16 cores on our test machine, and obviously I'd like to spread this over those co...
Hi.
Got a problem that I'm facing. and it should be pretty simple.
I have an app that places data into a dir "A". The data will be a series of files.
I want to have a continually running server, that does a continual look at the dir, and on seeing a completed file in the dir, the server spawns/forks/creates a thread (not sure of the e...
Let's assume the following data structur with three numpy arrays (id, parent_id) (parent_id of the root element is -1):
import numpy as np
class MyStructure(object):
def __init__(self):
"""
Default structure for now:
1
/ \
2 3
/ \
4 5
"""
self.ids = np.array([1,2,3,4...
I've been using Turbogears since I have a Python background, but I can't help feeling a pang of jealously seeing all the Ruby on Rails resources available.
For example, for a crude comparison of the volume of resources, check out http://www.google.com/trends?q=turbogears%2C+ruby+on+rails
What would it take for Turbogears to reach the c...
Hello,
when i run fabric-0.9.1 in cygwin, it say following error:
$ fab test.py
Traceback (most recent call last):
File "/usr/bin/fab", line 8, in <module>
load_entry_point('Fabric==0.9.1', 'console_scripts', 'fab')()
File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 318, in load_ent...
I have an interesting programming puzzle for you:
You will be given 2 things:
1. A word containing a list of english words put together :
word = "iamtiredareyou"
2. Possible subsets:
subsets = ['i', 'a', 'am', 'amt', 'm', 't', 'ti', 'tire', 'tired', 'i', 'ire', 'r', 're', 'red', 'redare', 'e', 'd', 'da', 'dar', 'dare', 'a',...
I have a custom model fields, that can have 'chain' argument.
from django.db import models
class ChainField(object):
def __init__(self, *args, **kwargs):
chain = kwargs.get('chain', False)
if chain:
self.chain = chain
del kwargs['chain']
super(self.__class__.__mro__[2], self).__init...
I've been getting more and more interested in using Pylons as my Python web framework and I like the idea of MVC but, coming from a background of never using 'frameworks/design patterns/ what ever it\'s called', I don't really know how to approach it.
From what I've read in the Pylons Book, so far, it seems I do the following:
Create ...
Does any one know how we can do this?
I have python code in eclipse and whenever it calls c++ functions, i want the break point to go to the visual studio c++ project.
...
If a string contains *SUBJECT123 how to determine that the string has subject in it in python
...
Hello,
Before I start thanking everybody.
Through my application s/w I will read syncro values which will be in angles.
When I run Python script, the values are collected in particular variables.
Suppose the range is -180 to 180.
And I got angle as -180. According to the requirement it should be +/-1 deg window;ie; between 179 and -1...
for the following code
theurl = "https://%s:%[email protected]/nic/update?hostname=%s&myip=%s&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG" % (username, password, hostname, theip)
conn = urlopen(theurl) # send the request to the url
print(conn.read()) # read the response
conn.close() # close the connection
i get the fol...
Hi all,
Is it possible to create read only files in python which can not be changed later and in which users can not change its attribute from read-only to normal file?
Please suggest.
Thanks in advance.
...