On Fri, 4 Jun 2010 10:57:07 am GoodPotatoes wrote:
> I have been given a legacy database, and need to read the binaryfiles
> out to a disk. The table has columns "filename" and "binaryFile",
> where the binaryFile is a BLOB
>
> My python script so far is:
>
> import pyodbc
> cnxn=pyodbc.Connectio
Environment:
Sybase/ODBC/Windows/Python2.5
I have been given a legacy database, and need to read the binaryfiles out to a
disk. The table has columns "filename" and "binaryFile", where the binaryFile
is a BLOB
My python script so far is:
import pyodbc
cnxn=pyodbc.Connection("DSN=sybasedatabas
On Fri, 4 Jun 2010 03:10:41 am Alan Gauld wrote:
> "Tino Dai" wrote
>
> >Is there a way to express this:
> >isThumbnail = False
> >if size == "thumbnail":
> >isThumbnail = True
> >
> > like this:
> > [ isThumbnail = True if size == "thumbnail" isThumbnail =
> > False ]
On Fri, 4 Jun 2010 09:00:13 am ALAN GAULD quoted Tino Dai who wrote:
> "Tino Dai" wrote
[...]
> >> I have code that is unpythonic in many places. It works, but
> >> it's ugly. One of those unpythonic places is I'm initializing some
> >> variable such as a list,dict, or whatever outside of if/
On Fri, 4 Jun 2010 12:45:52 am Colin Talbert wrote:
> I thought when you did a for uline in input_file each single line
> would go into memory independently, not the entire file.
for line in file:
reads one line at a time, but file.read() tries to read everything in
one go. However, it should f
Fowarding to the list.
Remember to use Reply ALL when replying.
Alan G.
"Tino Dai" wrote
>>>
>>>
>>> Is there a way to express this:
isThumbnail = False
if size == "thumbnail":
isThumbnail = True
like this:
[ isThumbnail
"Alex Hall" wrote
*somehow, your instance of the program starts up a server that
broadcasts something; your enemy has selected "client", and is now
(SOMEHOW) listening for the signal your server is broadcasting
*the signal is picked up, and, SOMEHOW, you and your opponent
connect
and can sta
On 6/3/2010 8:50 AM Tino Dai said...
Hi All,
Is there a way to express this:
isThumbnail = False
if size == "thumbnail":
isThumbnail = True
like this:
[ isThumbnail = True if size == "thumbnail" isThumbnail = False ]
and the scoping extending to one lev
On 3 June 2010 21:02, Colin Talbert wrote:
> I couldn't find any example of it in use and wasn't having any luck getting
> it to work based on the documentation.
Good examples of the bz2 module can be found at [1].
greets
Sander
[1] http://www.doughellmann.com/PyMOTW/bz2/
Hi all,
I am a CS major, so I have had the required networking class. I get
the principles of networking, sockets, and packets, but I have never
had to actually implement any such principles in any program. Now I
have this Battleship game (not a school assignment, just a summer
project) that I am t
On Thu, Jun 3, 2010 at 1:02 PM, Colin Talbert wrote:
>
> Dave,
> I think you are probably right about using decompressor. I
> couldn't find any example of it in use and wasn't having any luck getting it
> to work based on the documentation. Maybe I should try harder on this
> front.
>
On Thu, 3 Jun 2010 11:50:42 -0400
Tino Dai wrote:
> Hi All,
>
> Is there a way to express this:
> isThumbnail = False
> if size == "thumbnail":
> isThumbnail = True
>
> like this:
> [ isThumbnail = True if size == "thumbnail" isThumbnail = False ]
> and the sc
Dave,
I think you are probably right about using decompressor. I
couldn't find any example of it in use and wasn't having any luck getting
it to work based on the documentation. Maybe I should try harder on this
front.
Colin Talbert
GIS Specialist
US Geological Survey - Fort Collins S
Colin Talbert wrote:
You are so correct. I'd been trying numerous things to read in this file
and had deleted the code that I meant to put here and so wrote this from
memory incorrectly. The code that I wrote should have been:
import bz2
input_file = bz2.BZ2File(r'C:\temp\planet-latest.osm
"Colin Talbert" wrote
I thought when you did a for uline in input_file each single line
would go
into memory independently, not the entire file.
Thats true but your code snippet showed you using read()
which reads the whole file...
I'm pretty sure that this is not your code, because you ca
"Tino Dai" wrote
Is there a way to express this:
isThumbnail = False
if size == "thumbnail":
isThumbnail = True
like this:
[ isThumbnail = True if size == "thumbnail" isThumbnail =
False ]
Bob showed one way, you could also do:
isThumbnail = True if size == "thumbna
On 6/3/2010 11:50 AM, Tino Dai wrote:
Hi All,
Is there a way to express this:
isThumbnail = False
if size == "thumbnail":
isThumbnail = True
How I do that is:
isThumbnail = size == "thumbnail":
like this:
[ isThumbnail = True if size == "thumbnail" isThumbnail
On 06/03/10 01:37, Jim Byrnes wrote:
>
>>> some older procedural languages I always end up becoming confused by
>>> the large number of built in methods.
>>
>> C is one of the simplest procedural languages around
>> and yet it comes with a huge library of functions (several
>> hundred in some case
Hi All,
Is there a way to express this:
isThumbnail = False
if size == "thumbnail":
isThumbnail = True
like this:
[ isThumbnail = True if size == "thumbnail" isThumbnail = False ]
and the scoping extending to one level above without resorting to the
global keywo
Hello Steven,
Thanks for the reply. Also this is my first post to tu...@python
so I'll reply all in the future.
However, a file of that size changes things drastically. You can't
expect to necessarily be able to read the entire 9.2 gigabyte BZ2 file
into memory at once, let along the
20 matches
Mail list logo