Ansuman Dash wrote:
I am downloading files using various command (because files are
different) meant for a executable.
What is various commands? Are you using wget/curl or similar
command-line downloader programs? Or are you using a python-based script
(that uses urllib)? Or are you using a
Hi,
I have written it like that. It is like press 1 and it ll download file1 and
press 2 it ll download file2 etc
But my question was I am using time.sleep() to make my script to wait for
the file download and then validate it in log file, so is there any other
way I can synchronize my code
On Thu, Sep 17, 2009 at 7:24 PM, Kent Johnson ken...@tds.net wrote:
2009/9/17 Emad Nawfal (عماد نوفل) emadnaw...@gmail.com:
Hi Tutors,
I want to color-code the different parts of the word in a morphologically
complex natural language. The file I have looks like this, where the
fisrt
Ansuman Dash wrote:
Hi,
I have written it like that. It is like press 1 and it ll download file1
and press 2 it ll download file2 etc
What is like that? We are not psychic that could read your mind...
Describe the way you downloaded the file.
On Fri, 2009-09-18 at 14:46 +0530, Ansuman Dash wrote:
I have written it like that. It is like press 1 and it ll download
file1 and
press 2 it ll download file2 etc
But without providing people how you accomplish this there is no way to
help.
But my question was I am using time.sleep()
On Thu, Sep 17, 2009 at 4:59 PM, Katt the_only_kat...@verizon.net wrote:
- Original Message - From: Kent Johnson ken...@tds.net
time.localtime().tm_sec will give you the number of seconds as an
integer without any conversions.
Thank you for your quick response. I didn't expect to
Excellent, the thing works!
Thanx a lot!
- Original Message -
From: Kent Johnson
To: Igor Mavrović - ma...@irb
Cc: Rich Lovely ; tutor@python.org
Sent: Wednesday, September 16, 2009 7:06 PM
Subject: Re: [Tutor] Fw: utf locale sorting
How about this (assuming both
The idea is that Python calls VB.net program. VB.Net program gets data and than
forward data back to Python for further processing..
One way to do this is by compiling vb.net program to exe. And than call exe by
Python code. Data exchange goes via Access Data Base (Python write in MC
Hello,
On Sep 18, 2009, at 5:16 AM, Ansuman Dash wrote:
I have written it like that. It is like press 1 and it ll download
file1 and press 2 it ll download file2 etc
But my question was I am using time.sleep() to make my script to
wait for the file download and then validate it in log
Hi,
Is anyone familiar with this error:
dbi.internal-error: [Microsoft][SQL Server Driver]Invalid cursor state in
EXEC
This error is triggered by the first sql statement call in an accessor
module which purpose is only to get data from a source module and feed it
into a database:
Kristina:
I would format it as follows:
self.cursor.execute(SELECT CUSTID FROM Stories WHERE NAME = '%s' % name)
Kristina Ambert wrote:
Hi,
Is anyone familiar with this error:
dbi.internal-error: [Microsoft][SQL Server Driver]Invalid cursor state
in EXEC
This error is triggered by the first
On Fri, Sep 18, 2009 at 11:49 AM, Jeff Johnson j...@dcsoftware.com wrote:
Kristina:
I would format it as follows:
self.cursor.execute(SELECT CUSTID FROM Stories WHERE NAME = '%s' % name)
No, that is a recipe for SQL injection attacks such as this:
http://xkcd.com/327/
Hi,
i'm putting file in a DB as BLOB entries. To serve them, i need to
take Content-Type headers.
So, i'm looking for a function that returnes the filetype, given a data str.
I've found many other topics like this in python mail-archive, but any
of them contains the solution.
Can you help me,
On 9/18/2009 10:05 AM ad...@gg-lab.net said...
Hi,
i'm putting file in a DB as BLOB entries. To serve them, i need to
take Content-Type headers.
So, i'm looking for a function that returnes the filetype, given a data str.
I've found many other topics like this in python mail-archive, but any
Kent:
How about this:
self.cursor.execute(SELECT CUSTID FROM Stories WHERE NAME = '%s' %
(name, ))
Question, does execute know to substitute the question mark with name?
self.cursor.execute(SELECT CUSTID FROM Stories WHERE NAME= ?, (name, ))
TIA
Kent Johnson wrote:
On Fri, Sep 18, 2009 at
Otonicar Ales wrote:
The idea is that Python calls VB.net program. VB.Net program gets data
and than forward data back to Python for further processing..
One way to do this is by compiling vb.net program to exe. And than
call exe by Python code. Data exchange goes via Access Data Base
Hi Emile,
that functions requires a filename/path. Just like this one (for images)
http://docs.python.org/library/imghdr.html
Ok, i don't have a filename. I get the file from a BLOB in a db. Any idea?
Thankyou for your precious help.
2009/9/18 Emile van Sebille em...@fenx.com:
On 9/18/2009
I'm trying to get my head around the organization of a larger Python
project.
1. Am I right in thinking that in Python, you don't have the concept
of something like a precompiled header and that every file that wants
to use, say vector.py needs to import that module?
2. How are Python
On Fri, Sep 18, 2009 at 2:14 PM, Jeff Johnson j...@dcsoftware.com wrote:
Kent:
How about this:
self.cursor.execute(SELECT CUSTID FROM Stories WHERE NAME = '%s' % (name,
))
No, that has the same result as your original. For example,
In [3]: name = Kent'; drop table Stories;--
In [4]: SELECT
On Fri, Sep 18, 2009 at 2:14 PM, Warren Marshall epic...@gmail.com wrote:
I'm trying to get my head around the organization of a larger Python
project.
1. Am I right in thinking that in Python, you don't have the concept of
something like a precompiled header and that every file that wants
On Fri, Sep 18, 2009 at 2:21 PM, ad...@gg-lab.net ad...@gg-lab.net wrote:
Hi Emile,
that functions requires a filename/path.
Did you even look at the link? There is a from_buffer() method also.
Kent
2009/9/18 Emile van Sebille em...@fenx.com:
I'd take a look at python-magic at
Patrick Sabin wrote:
When I needed thumbnails of my images, I created them using ImageMagick.
ImageMagick is a very nice tool for editing images and since it is
called from the command line it is easy to invoke it from a programming
language. There are python-bindings for it, but I
Oh, i'm sorry.
I've read the README, but haven't noticed that
m.from_buffer(open(testdata/test.pdf).read(1024))
was exactly what i was looking for.
Ok, i'll try it and let you know :D
2009/9/18 Kent Johnson ken...@tds.net:
On Fri, Sep 18, 2009 at 2:21 PM, ad...@gg-lab.net ad...@gg-lab.net
Thanks for the clarification Kent!
Kent Johnson wrote:
On Fri, Sep 18, 2009 at 2:14 PM, Jeff Johnson j...@dcsoftware.com wrote:
Kent:
How about this:
self.cursor.execute(SELECT CUSTID FROM Stories WHERE NAME = '%s' % (name,
))
No, that has the same result as your original. For example,
In
I have a array with this data in it
0.0046,0.095,0.0904,521456,['MCI 521456 0.0904'],['ATT 521 0.0919'],['IDT 521
0.095'],['None']
0.0083,0.0192,0.0109,39023821,['MCI 39023821 0.0109'],['ATT 39 0.012'],['IDT 39
0.0192'],['SPR 39 0.0135']
0.0421,0.0681,0.026,73462,['MCI 73462 0.0260'],['ATT 7
Hello,
I have done a decorator that I used to ensure that the keyword arguments
passed to a constructor are the correct/expected ones. The code is the
following:
from functools import wraps
def keyargs_check(keywords):
This decorator ensures that the keys passed in kwargs are the onces that
Ok, a good news for me:
i've modified my script, adding a:
import magic
line at the top of it. But I got this error:
No module named magic
Ok, so magic is not installed on GAE. I've then uploaded it and it
loaded succesfully. New error:
No module named _ctypes
And, reading the full debug i
Excellent, OK, this is becoming clearer ...
So if I wanted a common library of code that several Python apps would
be using, best practices would say I should put that into a directory
that the projects can see and import it as a package.module. Cool...
- Warren
(epic...@gmail.com)
On
2009/9/18 Rayon evosw...@hotmail.com:
I will assume array == python list.
I have a array with this data in it
How are you reading the data? Do you convert all the numbers to
floats? If so you will need to think about precision of the floats. If
you want to preserve the precision look into the
On Fri, Sep 18, 2009 at 4:10 PM, ad...@gg-lab.net ad...@gg-lab.net wrote:
Ok, so magic is not installed on GAE. I've then uploaded it and it
loaded succesfully. New error:
No module named _ctypes
And, reading the full debug i got this:
File
On Fri, Sep 18, 2009 at 4:15 PM, Warren Marshall epic...@gmail.com wrote:
Excellent, OK, this is becoming clearer ...
So if I wanted a common library of code that several Python apps would be
using, best practices would say I should put that into a directory that the
projects can see and
I'm going to be making a simple program, that is a few books like A is
for..., B is for..., but it will be many built into one,
Sorry, I don't understand?
*By that, I mean it will be like a childrens book, teaching the letters. You've read
them. example A is for apple, a yummy treat.
2009/9/18 Manuel de la Pena man...@themacaque.com:
Hello,
I have done a decorator that I used to ensure that the keyword arguments
passed to a constructor are the correct/expected ones. The code is the
following:
from functools import wraps
def keyargs_check(keywords):
This decorator
Should probably clean up my code properly before submitting, to hide
some of the noobish errors like forgetting to put quotes round
strings...
class Demo(object):
... def __init__(self, name=, surname=, age=0):
... print name, surname, age
...
Demo(name='Rich',
I am trying to use a parameter of a function to call a word inside a
dictionary.
Here is my code
wordList = {
'Apple' : [A delicious snack],
'Word' : [This code is not working...],
}
def define(word):
print wordList['Word']
When I use define('Apple') it returns ['This code is not
On Sat, Sep 19, 2009 at 9:27 AM, Corey Richardson kb1...@aim.com wrote:
I am trying to use a parameter of a function to call a word inside a
dictionary.
Here is my code
wordList = {
'Apple' : [A delicious snack],
'Word' : [This code is not working...],
}
def define(word):
print
Corey Richardson wrote:
I am trying to use a parameter of a function to call a word inside a
dictionary.
Here is my code
wordList = {
'Apple' : [A delicious snack],
'Word' : [This code is not working...],
}
def define(word):
print wordList['Word']
You put quotess around word which
37 matches
Mail list logo