What would be the best way to import multi-million record csv files into django.
Currently using python csv module, it takes 2-4 days for it process 1 million record file. It does some checking if the record already exists, and few others.
Can this process be achieved to execute in few hours.
Can memcache be used somehow.
Update: Th...
Hi,
Trying to execute someone's code, getting a syntax error. No idea why :(
def GetParsers( self, systags ):
childparsers = reduce( lambda a,b : a+b, [[]] + [ plugin.GetParsers( systags ) for plugin in self.plugins ] )
parsers = [ p for plist in [ self.parsers[t] for t in systags if self.parsers.has_key(t) ] for p in plist ]
...
Hi all,
I've been struggling with this error for several days with little headway. Basically, I'm trying to read in an image file and then use PIL to preform a specific operation on it. (my end goal is to preform a PIL paste operation).
However, whenever I load my image in, and then invoke the load() method on it (operations like s...
If you simply type an integer after the >>> prompt they give you in the IDLE interpreter, most of the time it'll simply bounce the number back at you.
>>> 3
3
>>> 8
8
>>> 10
10
Start the nubmer off with a 0 however, and some interesting errors happen.
>>> 010
8
>>> 020
16
...
I have made a class in which there are 3 functions.
def maxvalue
def min value
def getAction
In the def maxvalue function, I have made a list of actions. I want that list to be accessed in def getaction function so that I can reverse the list and then take out the first entry from it. How can do i that??
def getAction(self,gamesta...
My original though was to simply put the email address into both username and email fields when creating accounts, this doesn't work as Django limits the username field to 30 characters which may not be enough for email addresses.
My second thought was to md5 the email address, put the hash into username, and that would make it always ...
i developed an aplication built on twitter api , but i get erorrs like a mesage that i've parsed and deleted to be parsed again at the next execution , could that be because i left the twitter connection opened or is just a fault of the twitter API. I also tried to delete all direct messages because it seemed too full for me but i...
I'm working on a project using Tkinter and Python. In order to have native theming and to take advantage of the new widgets I'm using ttk in Python 2.6. My problem is how to allow the user to scroll through the tabs in the notebook widget (a la firefox). Plus, I need a part in the right edge of the tabs for a close button. The frame for ...
I'm trying to use the following code on a list of lists to create a new list of lists, whose new elements are a certain combination of elements from the lists inside the old list...if that makes any sense! Here is the code:
for index, item in outputList1:
outputList2 = outputList2.append(item[6:].extend(outputList1[index+1][6:]))
...
i have a function:
I need to first reverse the list and then take an entry from it.
Earlier, I was making the 3 functions but now I am defining the main function and the other 2 functions in it.
...
Hi all,
I'm working for small company, which operates in the automation industry.
The boss hired me because he wants to sell/give some desktop applications to his
current costumers.
He imposes me to use the Netbeans Platform (a generic desktop application framework).
A software engineer friend of his advised him to choose this framework....
While using SQLAlchemy, i add a object to a session using session.add(objname), then either explicitly flush it using session.flush or enable autoflush=True while creating the engine itself.
Now in the session, if want to return that object via session.query(classname).all(), i cannot retrieve it.
Why is that so? or is there a way in w...
Hello all,
I am working on a membership application. I would like to make a membership reminder. (member during a period of time which is not member for another period of time).
Currently, I am using set for making this calculation. See the code below.
class Member(models.Model):
...
class Membership(models.Model):
member = ...
In runserver, I can view my website no problems. (viewing it through lynx on the same machine)
But when I view the same thing through apache, (passenger) I get an error like the following:
Could not import PROJ.APP.views Error was: No module named PROJ.views
It looks like a problem with the urlconf, but again that is the same between...
Neither poplib or imaplib seem to offer proxy support and I couldn't find much info about it despite my google-fu attempts.
I'm using python to fetch emails from various imap/pop enabled servers and need to be able to do it through proxies.
Ideally, I'd like to be able to do it in python directly but using a wrapper (external program/s...
With header information in csv file, city can be grabbed as:
city = row['city']
Now how to assume that csv file does not have headers, there is only 1 column, and column is city.
...
Hi all -
I'm using PyWin32's win32process.CreateProcess to start up a GUI program that has functionality I want to use in a Python class.
I want to do the following from Python with this GUI:
sent text to individual windows within the GUI (which seem to change identifiers every time I create the process if WinSpy++ is to be believed)...
I'm trying to create a FUSE fs which transcodes all sound files to mp3. My first idea is to use gstreamer as the backend for transcoding.
I thought about using this pipeline:
gst-launch -v filesrc location=01\ New\ Born.flac ! decodebin ! audioconvert ! lame vbr=4 vbr-quality=9 ! id3v2mux ! appsink
The python bindings of fuse expect c...
I've implemented a toy web service in Twisted.Web:
from twisted.web import server, resource, http
class RootResource(resource.Resource):
def __init__(self):
resource.Resource.__init__(self)
self.putChild('test', TestHandler())
class TestHandler(resource.Resource):
isLeaf = True
def __init__(self):
res...
I am uploading google app engine application with the help of appcfg.py command from command prompt in windows.
But after one login I want to upload another application from the same command prompt but i cannot because this second application has no rights with the current login so i want to logout from this session on command prompt s...