Erk. MySQL 4. I imagine that has TEXT data-types also?
On 3/18/06, Adam Cripps <[EMAIL PROTECTED]> wrote:
> On 3/17/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
> > Adam Cripps wrote:
> > > On 3/17/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
> > >>Why are you using a BLOB when the content is text?
I just completed an assignment out of Learning Python
in which I used the Cmd class from the cmd module to
create a little shell:
import cmd, os, shutil, sys
class shell(cmd.Cmd):
def do_EOF(self, line):
sys.exit()
def do_ls(self, line):
if line == '': dirs = [os.
On 17 Mrz 2006, [EMAIL PROTECTED] wrote:
> As you see, the problem is that there is another
> directory under testFiles called testDir, but the
> function doesn't check the directory for files. The
> function needs to find every directory (including
> subdirectories within directories). Any hint
Recursion.
if os.path.isdir(d): describeDirectory(d)
Since your printing from the function itself, you may want to add a
level or depth arguement with a default value of 0.
def describeDirectory(directory, level=0):
Then call the function recursively with describeDirectory(d,level+1)
Use the
I am trying to write a function that takes a
directory's name, finds any subdirectories, and then
prints out the size of the files in all found
directories.
import os, os.path
def describeDirectory(directory):
dirList = [directory]
for d in os.listdir(directory):
if os.path.isdir(
On Fri, Mar 17, 2006, Pawel Kraszewski wrote:
>Dnia piÄ
tek, 17 marca 2006 18:41, Adam napisaÅ:
>
>> > The more general problem is to get a list of mounted file systems.
>
>> How about just reading the mtab? That's usually /etc/mtab it should be
>> readable as a user and it means you don't have to
On Fri, Mar 17, 2006, Adam wrote:
>On 17/03/06, Bill Campbell <[EMAIL PROTECTED]> wrote:
>> On Fri, Mar 17, 2006, Michael Lange wrote:
>> >On Fri, 17 Mar 2006 00:36:35 -0700
>> >fortezza-pyt <[EMAIL PROTECTED]> wrote:
>> >
>> >> If there a semi-standard way to test if a file system has been mounted
Dnia piątek, 17 marca 2006 18:41, Adam napisał:
> > The more general problem is to get a list of mounted file systems.
> How about just reading the mtab? That's usually /etc/mtab it should be
> readable as a user and it means you don't have to rely on any other
> programs.
Or always-up-to-date &
On 17/03/06, Bill Campbell <[EMAIL PROTECTED]> wrote:
> On Fri, Mar 17, 2006, Michael Lange wrote:
> >On Fri, 17 Mar 2006 00:36:35 -0700
> >fortezza-pyt <[EMAIL PROTECTED]> wrote:
> >
> >> If there a semi-standard way to test if a file system has been mounted
> >> or not using Python? In the Linux
On Fri, Mar 17, 2006, Michael Lange wrote:
>On Fri, 17 Mar 2006 00:36:35 -0700
>fortezza-pyt <[EMAIL PROTECTED]> wrote:
>
>> If there a semi-standard way to test if a file system has been mounted
>> or not using Python? In the Linux command line, I can type "mount" and
>> see all mounted file sys
On 3/17/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Adam Cripps wrote:
> > On 3/17/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
> >>Why are you using a BLOB when the content is text?
> >
> > I'm using BLOB because I want them to be able to write content that is
> > longer than 255 chars.
>
> I'm n
if the data is not binary, you can use TEXT type - accepts all readable
characters and data, BLOB type is more for binary data storage, and
MYSQL's Varchar type only stores up to 255 characters. (65,536 bits, or
64Kbits)
If you are storing Binary data (DES-3 encrypted data, or image data, for
Adam Cripps wrote:
> On 3/17/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
>>Why are you using a BLOB when the content is text?
>
> I'm using BLOB because I want them to be able to write content that is
> longer than 255 chars.
I'm no MySQL expert but the docs say VARCHAR fields can be up to 65,535
On 3/17/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Adam Cripps wrote:
> > I'm trying to build a mini-CMS for my class to manage a single
> > webpage, using CGI and mysql. The children will be storing their main
> > content in a BLOB within a Mysql database.
> >
> > When I query the content colum
Adam Cripps wrote:
> I'm trying to build a mini-CMS for my class to manage a single
> webpage, using CGI and mysql. The children will be storing their main
> content in a BLOB within a Mysql database.
>
> When I query the content column, I get a strange return like this:
>
> array('c', 'This is a
I'm trying to build a mini-CMS for my class to manage a single
webpage, using CGI and mysql. The children will be storing their main
content in a BLOB within a Mysql database.
When I query the content column, I get a strange return like this:
array('c', 'This is a test ')
- when the only text I
On Fri, 17 Mar 2006 00:36:35 -0700
fortezza-pyt <[EMAIL PROTECTED]> wrote:
> If there a semi-standard way to test if a file system has been mounted
> or not using Python? In the Linux command line, I can type "mount" and
> see all mounted file system, and then see if the one I am looking for is
Ryan Ginstrom wrote:
> I'm (still) having trouble using Japanese in python.
>
> I want to use Japanese with the win32com module. But while I can retrieve
> Japanese text from a COM server without problems, if I try to send Japanese
> text to a COM server it comes out garbled.
>
> Here is an examp
linda.s wrote:
> Is there any good tutorial about using python to call R modules?
Are you using RPy? It's docs look pretty good.
http://rpy.sourceforge.net/
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Fri, March 17, 2006 1:06 pm, fortezza-pyt wrote:
> If there a semi-standard way to test if a file system has been mounted
> or not using Python? In the Linux command line, I can type "mount" and
> see all mounted file system, and then see if the one I am looking for is
> in the list. While I co
If there a semi-standard way to test if a file system has been mounted
or not using Python? In the Linux command line, I can type "mount" and
see all mounted file system, and then see if the one I am looking for is
in the list. While I could replicate this with
Python, I am curious if there is a
21 matches
Mail list logo