On Friday 07 August 2009 21:31, Mark Young wrote:
> Hi, I was reading a tutorial, and it mentioned the "import this" easter
> egg. I was curious, and looked up the contents of the module, and dscovered
> that it had attributes c, d, i, and s. I was wondering if anyone had any
> clue what these attr
"Mark Young" wrote
I was curious, and looked up the contents of the module, and dscovered
that
it had attributes c, d, i, and s. I was wondering if anyone had any clue
what these attributes were supposed to mean.
Mostly they are just variables used to construct the message. The values
are
Something else to note: you can find any module's location by looking it up in
the dictionary sys.modules. For instance:
Python 2.4.4 (#2, Oct 22 2008, 19:52:44)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>
On Fri, Aug 7, 2009 at 10:18 PM, Tim Johnson wrote:
> Hello:
> I am currently using python 2.5 and do a lot of database programming
> with MySQLdb.
>
> I need to tighten up control over queries since I am concerned about
> malicious injections.
If you use the two argument form of cursor.execute -
Mark Young wrote:
Hi, I was reading a tutorial, and it mentioned the "import this" easter egg.
I was curious, and looked up the contents of the module, and dscovered that
it had attributes c, d, i, and s. I was wondering if anyone had any clue
what these attributes were supposed to mean. I think
* Kent Johnson [090808 05:06]:
> On Fri, Aug 7, 2009 at 10:18 PM, Tim Johnson wrote:
>
> If you use the two argument form of cursor.execute - passing the
> parameter values in a sequence, rather than substituting them yourself
> - then you have to worry about injection attacks. The DB-API module
On Fri, Aug 7, 2009 at 5:35 PM, David Kim wrote:
> I've been learning python in a vacuum for the past few months and I
> was wondering whether anyone would be willing to take a look at some
> code? I've been messing around with sqlite and matplotlib, but I
> couldn't get all the string substitutio
What I am trying to do is find the mail folder for our lotus notes files.
I get it by doing the following:
lotusnotesmaildir = glob.glob('C:\Documents and Settings/pkinariwala/Local
Settings/Application Data/lotus/notes/data/'+'*mail*/')
That returns: ['C:\\Documents and Settings/pkinariwala/Loc
"Paras K." wrote
lotusnotesmaildir = glob.glob('C:\Documents and
Settings/pkinariwala/Local
Settings/Application Data/lotus/notes/data/'+'*mail*/')
You don't need the plus.
lotusnotesmaildir = glob.glob('C:\Documents and Settings/pkinariwala/Local
Settings/Application Data/lotus/notes/data
On Sat, Aug 8, 2009 at 2:33 PM, Paras K. wrote:
> What I am trying to do is find the mail folder for our lotus notes files.
>
> I get it by doing the following:
>
> lotusnotesmaildir = glob.glob('C:\Documents and Settings/pkinariwala/Local
> Settings/Application Data/lotus/notes/data/'+'*mail*/')
>
Thanks so much for the comments! I appreciate the look. It's hard to know
what the best practices are (or if they even exist).
On Sat, Aug 8, 2009 at 2:28 PM, Kent Johnson wrote:
>
> You don't seem to actually have a main(). Are you running this by importing
> it?
>
> I would make a separate func
Hi I am porting some of my code over from Applescript to Python. There
is one thing I am not really sure how to do. I want to be able to drop
a file onto a python script (or app I guess) and have the python script
use the path to the file that was dropped on it as sys.argv[1]
In applescript it
"pedro" wrote
is one thing I am not really sure how to do. I want to be able to drop
a file onto a python script (or app I guess) and have the python script
use the path to the file that was dropped on it as sys.argv[1]
I may be wrong but I thought that, provided you had the path and
sh
Thanks everybody, I didn't know modules ran code when you imported them, I
just thought they defined the functions, etc. in them. Thanks for the info.
I'm going to go look at the module's code now that I know where it's at.
Mark Young
___
Tutor maillist
14 matches
Mail list logo