Re: A Comparison Of Dynamic and Static Languiges

2006-10-21 Thread Scott M.
Perhaps you should do your own work so you'll understand the concept and learn something? Also, widely posting your real (unaltered) email address in forums like this is a sure way to get noticed by spammers. Good luck. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm doing a

Vim/Python Help

2006-11-09 Thread Scott Smith
To all you vi/vim users out there. I am just getting into python and am trying to learn how to use the python.vim script. I really like the fact that it autoindents for me while inserting defs etc, but how do I move my cursor to back to outer block (say at the end of a def) to continue wit

Re: Vim/Python Help

2006-11-09 Thread Scott Smith
Thank you! Python Rocks! "Tim Chase" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> I am just getting into python and am trying to learn how to use the >> python.vim script. I really like the fact that it autoindents for me >> while inserting defs etc, but how do I move my cur

Help Installing smartypants.py

2006-06-27 Thread Scott McCracken
I just got Python 2.4 setup locally (Mac OS X) and am trying to extend it by installing both the markdown and smartypants plugins. Ultimately I'd like to be able use both in a custom CMS I'm building with Django. Installing markdown was a snap by following the instructions at http://www.freewisdom

email questions

2006-02-08 Thread Scott Frankel
python2.4/smtplib.py", line 303, in connect raise socket.error, msg socket.error: (61, 'Connection refused') Python 2.4.1 MacOSX 10.4.3 Is there a better/easier way to send a plain text message? Thanks in advance! Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: email questions

2006-02-08 Thread Scott Frankel
nonnumeric port" error upon instantiation. Instantiating with the port number, s = smtplib.SMTP("mail..net:@.com", portNum) yields the following error: socket.gaierror: (7, 'No address associated with nodename') Suggestions? Thanks again Scott

Re: email questions

2006-02-08 Thread Scott Frankel
Yes, I was doing something wrong: I was connecting to the localhost after instantiation. All better now. Thanks for the tips! Scott On Feb 8, 2006, at 11:04 AM, Carsten Haese wrote: > > Then you're doing something wrong. The line > > s = smtplib.SMTP("mail.ispname

Does the Python/C interface support Queue objects?

2005-05-05 Thread scott . manton
I'm a new user of the Python C interface. I would like to know if it is possible to put items on a standard python Queue object in C, and pop them from Python. Does the Python/C interface support Queue objects? A little background. I made a C dll that sets up a thread for collecting data from

Multiple-reader-one-writer (MROW) locking -- soliciting improvements

2005-05-05 Thread Matthew Scott
After being introduced to the concept of MROW locking, I sought a general implementation of it in Python that implemented reentrant locks, had a simple interface, and was unit tested. I found some implementations, but none had all three of these qualities, so I wrote this recipe: http://aspn.acti

Just remember that Python is sexy

2005-05-23 Thread Scott Kirkwood
I often can't remember that to remove spaces from a string whether it's strip() or trim(), and when finding patterns with the re library whether it's find() or search() and when iterating over key, values of a dictionary whether it's items() or entries(). But then I remember that Python is "sexy".

Re: Just remember that Python is sexy

2005-05-24 Thread Scott Kirkwood
Silly but true. It started with trying to figure how to remember it's strip() and not trim(). Then it went downhill from there. -- http://mail.python.org/mailman/listinfo/python-list

PyTables Error: ...import *

2005-06-01 Thread benjamin . scott
Hello, I am using an XP box and Python 2.3 (Enthought Edition). I am getting the same error with both of the .exe's listed on sourceforge: tables-1.0.win32-py2.3.exe tables-1.0.LB.win32-py2.3.exe Note that the installation seems to go fine. Although, when I run the test_all.py file it seems to

Re: Just remember that Python is sexy

2005-06-03 Thread Scott Kirkwood
Yes, but we don't want it to get out of hand, like calling it orgy() instead of join(). Or condom() instead of secure(). Or onClimax() instead of onFinished() :-)On 5/31/05, Eric Pederson <[EMAIL PROTECTED]> wrote: > I often can't remember that to remove spaces from a string whether it's> strip()

Re: Free Air Conditioners!!!!!!

2007-08-21 Thread Scott M.
Oh my God! How did you know?!! You were so smart to post that here! <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://freeairconditioners.blogspot.com/ > -- http://mail.python.org/mailman/listinfo/python-list

Re: which language allows you to change an argument's value?

2007-10-01 Thread Scott Gifford
e reference won't be changed, but even that can be subverted by the function's author with casting. -Scott. -- http://mail.python.org/mailman/listinfo/python-list

Best way to document Python code...

2007-01-22 Thread Scott Huey
API? Thanks, Scott Huey -- http://mail.python.org/mailman/listinfo/python-list

newbie question: ftp.storbinary()

2007-01-23 Thread Scott Ballard
uming that I should use storbinary( command, file[, blocksize]) to transfer the files. the documentation says "command should be an appropriate "STOR" command: "STOR filename"." I can't seem to figure out an `appropriate "STOR" command' is???

Looking for contract developer(s) - where can I find them?

2007-02-21 Thread Scott SA
i.e. URLs of projects and what you did on them and/or sample code showing _typical_ style of work). Thanks for any assitance, greatly appreciated. Scott -- http://mail.python.org/mailman/listinfo/python-list

Instances of BaseException and family don't provide __module__?

2007-11-02 Thread Scott Dial
cure and I don't understand why user-defined exception instances should have a different set of attributes than the built-in exception instances. As well as this is a change from 2.4- >2.5 that breaks existing code for no apparent reason. This smells like it was an overlooked mistake and not a

Re: Binary search tree

2007-11-12 Thread Scott SA
the url's, their index values and counts could be found by: url_keys= unique_urls.keys() for url_key in url_keys: url_idxs= unique_urls[url_key] url_hits= len(url_idxs) Depending upon the data you may have associated with your URLs, or whatever else you're working with, this is a very sweet 'shortcut'. I hope this helps, Scott * To be trully Python-esque, 'habits' would be employed and the value would have been 'Nun', but I guess the namesake can only be carried so far (^8 -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary search tree

2007-11-12 Thread Scott SA
On 11/12/07, Scott SA ([EMAIL PROTECTED]) wrote: Uhm sorry, there is a slightly cleaner way of running the second option I presented (sorry for the second post). >If you would find an index and count useful, you could do something like this: > >for idx in range

Re: which Python ? asks beginner

2007-11-17 Thread Scott SA
n be a precarious philosophy to live by, so why live on the edge, when you don't know where the edge is? (let alone how sharp, steep or deap it is once you get there). 0.02 Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Interfaces.

2007-11-19 Thread Scott SA
On 11/17/07, Duncan Booth ([EMAIL PROTECTED]) wrote: >Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > >> Benjamin wrote: >>> Python is has duck typing. "If it quacks like a duke, it's duck." >> >> How do dukes quack, exactly? :) > >They quack with a North-eastern Scottish accent of course. > >Th

Re: may be a bug in string.rstrip

2007-11-22 Thread Scott SA
exe') '123' >>> reg.sub('','123.EXE') '123' >>> reg.sub('','123.WenDy') '123' ... would you like fries with that? Just imagine what this would look like using the previous non-regex examples, or maybe not as halloween was _last_ month (scary stuff indeed!). Here are some links to some great docs 8^): <http://docs.python.org/lib/module-re.html> <http://www.amk.ca/python/howto/regex/> S&R, what you want, is described in more detail here: <http://www.amk.ca/python/howto/regex/regex.html#SECTION00062> And more links at: <http://www.google.com/search?q=python+regex> HTH Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: may be a bug in string.rstrip

2007-11-23 Thread Scott SA
;) While the shorthand is cleaner, I'm not always the guy maintaining the code. Thanks Scott PS. Not all was a loss, I did learn something from one of the other replies... not that it helps "the rest of the world". -- http://mail.python.org/mailman/listinfo/python-list

How to import whole namespace into global symbol table? (newbie)

2006-04-27 Thread Scott Simpson
Suppose I have the following python program: def func(): from sys import stderr, exit try: f = open("foo", 'r') except IOError: print >> stderr, "Input file foo does not exist" exit(1) def main(): import sys if len(args) != 0: sys.exit

Re: Awesome PySIG meeting last night

2006-04-28 Thread Ben Scott
On 4/28/06, Ted Roche <[EMAIL PROTECTED]> wrote: > Ten folks attended the monthly Python Special Interest Group meeting, > held monthly at the Amoskeag Business Incubator in Manchester. > > Ben was harassed. I must say, the level of harrassment was fairly low. I expect a higher quality of heckl

Re: Choosing a new language

2007-12-28 Thread Gary Scott
ot;confusion" stage of Lisp parentheses, so they don't bother me at all. > > I need advice from people who have been coding in all three, and who > can share some views and experiences. > > Please, if you don't know ALL three by deep experience, don't respond

Persistent HTTP Connections with Python?

2008-01-10 Thread Scott Sharkey
the urllib functions, or do I need to use the httplib functions for this kind of work. Pointers and/or sample code would be much appreciated. Thanks! -scott -- http://mail.python.org/mailman/listinfo/python-list

apache/mod_wsgi daemon mode

2008-02-03 Thread Scott SA
HI, I'm posting this here because it is, I believe, a python config issue (mine) that is not correct, but frustration and inexperience has left me without further [visible] options for rectification. I am trying to configure mod_wsgi to run in daemon mode with Apache. I can easily get it to ru

RE: apache/mod_wsgi daemon mode

2008-02-03 Thread Scott SA
On 2/3/08, Brian Smith ([EMAIL PROTECTED]) wrote: >Scott SA wrote: >> I am trying to configure mod_wsgi to run in daemon mode with >> Apache. I can easily get it to run 'normally' under Apache >> but I obtain permission errors _or_ process-failures i

naive packaging question

2008-03-26 Thread Scott Sharkey
27;d designate a different class in some other way? Hopefully this is enough info for you to see what I'm trying to accomplish. It's a bit like the DB interfaces, where there is a generic DB API, and then the different drivers to implement that API (MySQL, etc). Thanks for any suggestions! -scott -- http://mail.python.org/mailman/listinfo/python-list

import urllib2 fails with Python 2.6.1 on Vista

2009-01-17 Thread Scott MacDonald
310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2 >>> Whats going on?? Thanks, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: import urllib2 fails with Python 2.6.1 on Vista

2009-01-18 Thread Scott MacDonald
something like that? Thanks, Scott On Sun, Jan 18, 2009 at 12:44 AM, Gabriel Genellina wrote: > En Sat, 17 Jan 2009 17:13:00 -0200, Scott MacDonald > escribió: > > I googled a bit this morning search for an answer to this problem but have >> come up empty so far. Can anyone

Re: import urllib2 fails with Python 2.6.1 on Vista

2009-01-18 Thread Scott MacDonald
Ah yes, with your help I seem to have solved my own problem. I had PYTHONPATH defined to point to the 2.5 directory. Thanks! Scott On Sun, Jan 18, 2009 at 11:01 AM, Scott MacDonald < scott.p.macdon...@gmail.com> wrote: > Yes, I see your point. Not sure how that would happen. It is

Re: import urllib2 fails with Python 2.6.1 on Vista

2009-01-19 Thread Scott MacDonald
I think I set it a long time ago to get the python VTK bindings working... On Mon, Jan 19, 2009 at 5:58 AM, Gabriel Genellina wrote: > En Sun, 18 Jan 2009 16:08:07 -0200, Scott MacDonald < > scott.p.macdon...@gmail.com> escribió: > > Ah yes, with your help I seem to have sol

Find the location of a loaded module

2009-02-20 Thread Aaron Scott
I'm running into a problem that's rapidly reaching keyboard-smashing levels. I'm trying to import a module into Python, but it seems like Python is almost randomly loading the module from an entirely different directory, one that shouldn't be in the module search path. When I tell Python to load a

Re: Find the location of a loaded module

2009-02-20 Thread Aaron Scott
Okay, I'm going out of my mind. I have three directories -- 'act1', 'act2', and 'act3'. Each of these has a module named 'story'. Through mod_python, I need to load 'story' in the directory 'act1'. I do it like this: req.content_type = "text/html" sys.path.append(os.path.dirname(

Re: Find the location of a loaded module

2009-02-20 Thread Aaron Scott
Here's another clue: if I'm trying to run the script from the directory 'act1', but it's loading the module from 'act2', if I rename the module directory in 'act2' and refresh, the module still reports that it's running from '/home/www/---/docs/act2/story/game.pyc'... even though that files no long

Re: Find the location of a loaded module

2009-02-20 Thread Aaron Scott
And more madness... Executed from inside 'act1', which contains the directory / module 'story': directory = os.path.dirname(__file__) req.write(str(directory)) story = apache.import_module('story', path=[directory]) Results: File "/home/www/---/docs/act1/play.py", l

Re: Find the location of a loaded module

2009-02-20 Thread Aaron Scott
Son of a bitch. It gets worse. > Executed from inside 'act1', which contains the directory / module > 'story': > >         directory = os.path.dirname(__file__) >         req.write(str(directory)) >         story = apache.import_module('story', path=[directory]) > > Results: > > /home/www/---/do

Re: Find the location of a loaded module

2009-02-20 Thread Aaron Scott
> > 'req.write(story.game.Save())' returns '/home/www/--/docs/act2/ > storylab/game.pyc' as the file being accessed. > Sorry, that should have read: > 'req.write(story.game.Save())' returns > '/home/www/--/docs/act2/story/game.pyc' as the file being accessed. -- http://mail.python.org/mailman/lis

Re: Find the location of a loaded module

2009-02-20 Thread Aaron Scott
And finally, an epilogue. So, the problem lies with how Python cached the modules in memory. Yes, the modules were in two different locations and yes, the one that I specified using its direct path should be the one loaded. The problem is, the module isn't always loaded -- if it's already in memor

Checking a string against multiple matches

2008-12-01 Thread Aaron Scott
I've been trying to read up on this, but I'm not sure what the simplest way to do it is. I have a list of string. I'd like to check to see if any of the strings in that list matches another string. Pseudocode: if "two" in ["one", "two", "three", "four"]: return True Is there any built-in i

Re: Checking a string against multiple matches

2008-12-01 Thread Aaron Scott
Damn you, Python, and your loose documentation! It never occurred to me to actually TRY my pseudocode, since I couldn't find anything on that type of statement. Anyway, feel free to ignore me from now on. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Dictionary Algorithm Question

2008-12-16 Thread Scott MacDonald
You might be interested in the "Beautiful Code" book: http://oreilly.com/catalog/9780596510046/ It has a chapter on Python's dict implementation that is pretty good. On Tue, Dec 16, 2008 at 10:51 AM, Brigette Hodson wrote: > Hello! I am in a beginning algorithms class this semester and I am work

Single string vs list of strings

2008-10-30 Thread Scott Sharkey
Hi All, I have a need to determine whether a passed variable is a single string, or a list of strings. What is the most pythonic way to do this? Thanks. -Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming exercises/challenges

2008-11-18 Thread Scott MacDonald
What size of a project are you looking to work on? I enjoy learning in a similar way as you it seems. Recently I have been interested in data visualization problems. Maybe trying to replicate something from a website like: http://www.visualcomplexity.com/vc/ would interest you? Scott On Tue

Best way to pickle functions

2009-04-03 Thread Aaron Scott
I have a number of functions that I need to pickle without necessarily knowing their names in advance. My first thought was to put all the functions in a class, then pickle the class, but it doesn't really work like I expected it to. import cPickle class PickleClass:

Re: Best way to pickle functions

2009-04-03 Thread Aaron Scott
> Pickling the source code is much sturdier.  It's very unlikely that > the same code runs differently in different interpreters.  It's much > more likely that the same code runs the same, or not at all. Okay, I've run into another problem. I've saved the code to a string, so I can call it up when

Re: Best way to pickle functions

2009-04-03 Thread Aaron Scott
Never mind. Solved the problem by putting the functions in a class and dumping that into a string. Then, when I need it, I executed the string to get myself the class, then created an instance of that class which gave me access to those functions along with the correct scope. Probably not the smart

Re: Best way to pickle functions

2009-04-03 Thread Aaron Scott
> Why not use import ?  Simply recreate the source file, if necessary, and > import it again. > Ah, you'd think it would be that easy :P The problem with just importing a module is that the module is then cached in memory. Multiple copies of the program are running on a server, and each of them h

Module caching

2009-04-03 Thread Aaron Scott
Is there a way to make a Python app running in mod_python with zero persistence? I have an app that should be resetting its variables every time you access it, but sometimes -- and only sometimes -- the variables persist through a couple refreshes. They'll even persist through multiple browsers, so

Re: Module caching

2009-04-03 Thread Aaron Scott
Okay, I'm at my wit's end. I have a Python app, running via mod_python. There are variables in this app that, when changed, save their changes to a pickled file tied to a session ID. Then, when the page is accessed again, the variables are loaded from the respective file. But, when one user uses t

Re: Module caching

2009-04-03 Thread Aaron Scott
Huzzah, another post. I just discovered that even physically deleting the variable doesn't work. The module storylab.game has the class InitGame, which contains "daemons = {}". A user runs the code, resulting in some values in "daemons": "{'berry2': , 'berry3': , 'berry1': }". These are pickled.

Re: Module caching

2009-04-03 Thread Aaron Scott
> are you an experienced python programmer? > Yeah, I'd link to think I'm fairly experienced and not making any stupid mistakes. That said, I'm fairly new to working with mod_python. All I really want is to have mod_python stop caching variables. This seems like it should be easy enough to do, bu

Re: Module caching

2009-04-04 Thread Aaron Scott
>         req.write(str(lab.game.settings.daemons)) >         del lab.game.settings >         req.write(str(lab.game.settings.daemons)) >         lab.game.settings = lab.game.InitGame() >         req.write(str(lab.game.settings.daemons)) > Sorry, that should have been: req.write(str(lab.g

Re: Module caching

2009-04-08 Thread Aaron Scott
> Anyway, this person also posted on mod_python list. One of the things > I highlighted there was that mod_python for some configurations is > multithreaded and as such they may not be properly protecting > variables if they are storing them at global scope. They haven't > responded to any comments

CrystalFontz 635 project

2009-04-15 Thread Scott Flynn
I'm finally around to playing around with my LCD module. I chose Linux for OS, pygtk for the GUI, a CF635 Python library written by Thomas Cauley (found on CF website) for a starting point in sending commands to the LCD, and gobject.io_add_watch for listening for packets coming from the LCD. It bec

Re: CrystalFontz 635 project

2009-04-15 Thread Scott Flynn
I think I found the answer to the last question. "A primitive lock is a synchronization primitive that is not owned by a particular thread when locked." -17.2.2. Lock Objects So that's a no. On Wed, Apr 15, 2009 at 8:55 PM, Scott Flynn wrote: > > I'm finally around to

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-29 Thread Barry Scott
On 22 Apr 2009, at 07:50, Martin v. Löwis wrote: If the locale's encoding is UTF-8, the file system encoding is set to a new encoding "utf-8b". The UTF-8b codec decodes non-decodable bytes (which must be >= 0x80) into half surrogate codes U+DC80..U+DCFF. Forgive me if this has been covered.

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-30 Thread Barry Scott
On 30 Apr 2009, at 05:52, Martin v. Löwis wrote: How do get a printable unicode version of these path strings if they contain none unicode data? Define "printable". One way would be to use a regular expression, replacing all codes in a certain range with a question mark. What I mean by prin

Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

2009-04-30 Thread Barry Scott
On 30 Apr 2009, at 21:06, Martin v. Löwis wrote: How do get a printable unicode version of these path strings if they contain none unicode data? Define "printable". One way would be to use a regular expression, replacing all codes in a certain range with a question mark. What I mean by pr

Re: Any idea to emulate tail -f

2009-05-05 Thread Paul Scott
On Mon, 2009-05-04 at 23:50 -0700, CTO wrote: > You might want to try http://pyinotify.sourceforge.net/. Works well on > Linux systems. Otherwise, I'd watch the mtime on the file and fork to > handle the change. > pyinotify works really well. If you need to watch a file, simply use the IN_MODIFY

Updates to enviironment variables and ctypes

2009-05-12 Thread Scott Flynn
I was hoping I could update LD_LIBRARY_PATH at runtime and load a library through ctypes from there, but I haven't been able to. I've tried all of these. os.environ['LD_LIBRARY_PATH'] = "./lib" os.putenv('LD_LIBRARY_PATH', "./lib") os.system("export LD_LIBRARY_PATH=./lib") lib = CDLL("libevaluato

Resize ctypes array

2009-05-28 Thread Scott Sibley
I'd like to resize a ctypes array. As you can see, ctypes.resize doesn't work like it could. I can write a function to resize an array, but I wanted to know some other solutions to this. Maybe I'm missing some ctypes trick or maybe I simply used resize wrong. The name c_long_Array_0 seems to tell m

Re: Resize ctypes array

2009-05-28 Thread Scott Sibley
I found an answer to this over on Stackoverflow. http://stackoverflow.com/questions/919369/resize-ctypes-array On Thu, May 28, 2009 at 1:25 AM, Scott Sibley wrote: > I'd like to resize a ctypes array. As you can see, ctypes.resize doesn't > work like it could. I can write a fu

Shell-independent *nix setup script

2008-05-22 Thread scott . hafeman
into the user's environment, so why not use a richer language where the setup logic is independent of the user's shell being used. Thanks for your feedback, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Shell-independent *nix setup script

2008-05-23 Thread scott . hafeman
On May 22, 5:29 pm, brad <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > Is it worthwhile maintaining a production application setup script in > > Python as opposed to shell-script?   > > I do not think so. Perhaps 'in conjunction with', but not 'opposed > to'... sh is the lowest

Writing a function from within Python

2008-05-28 Thread Aaron Scott
Is it possible to change the content of a function after the function has been created? For instance, say I make a class: class MyClass: def ClassFunction(self): return 1 And I create an object: MyObject = MyClass() Is there any way to cha

Re: Convert Word .doc to Acrobat .pdf files

2008-06-06 Thread Paul Scott
On Fri, 2008-06-06 at 16:22 +0530, Dinil Karun wrote: > hi, > > I am using the below code but i am getting a error saying pyUno module > not found. > can u please help. I just wrote the same thing! Take a look at http://cvs2.uwc.ac.za/trac/python_tools/browser/oooconv It should do what you wan

Error importing modules with mod_python

2008-07-21 Thread Aaron Scott
I've installed mod_python, and everything seems to be working, but it fails when I try to import another file into the file that's actually producing the output. I have these lines at the top of index.py: from mod_python import apache from storylab import * ... and in the directory where index.py

Using variables across modules

2008-07-23 Thread Aaron Scott
I'm having some trouble understanding how Python handles variables across multiple modules. I've dug through the documentation, but I still find myself at a loss. When you import a module, are you creating an instance of the variables within? For instance, if I have one file, "variables.py", which

Re: Using variables across modules

2008-07-23 Thread Aaron Scott
> Just wirte test code ! variables.py: myvar = 5 print myvar foo.py: from variables import * def PrintVar(): print myvar bar.py: from variables import * from foo import * print myvar myvar = 2 print myvar PrintVar() "python bar.py"

Re: Using variables across modules

2008-07-23 Thread Aaron Scott
> first read this to learn how objects and variables work in Python: > >      http://effbot.org/zone/python-objects.htm > > and then read this to learn how from-import works, and when you're > supposed to use it: > >      http://effbot.org/zone/import-confusion.htm > > hope this helps! > Awesome.

ctypes - unloading implicitly loaded dlls

2008-07-27 Thread Scott Pigman
Here's what I'm struggling with (as best as I can understand it): I'm writing a program that uses functionality from two different sets of cdlls which reside in two different directories, call them 'libA.dll' and 'libB.dll'. Although I don't directly use it, both directories contain a dll with th

Beginner advice

2008-03-30 Thread Paul Scott
I have been tasked to come up with an audio recorder desktop (cross platform if possible - but linux only is OK) that: 1. records a lecture as an MP3 file (pymedia?) 2. Provides a login form for server credentials 3. Uploads via XMLRPC (pyxmlrpclib) to the server as a podcast I have been working

Re: Beginner advice

2008-03-31 Thread Paul Scott
On Mon, 2008-03-31 at 06:45 +, Marc 'BlackJack' Rintsch wrote: > There is an `xmlrpclib` in the standard library, so there is no need for > an external package here. I even think that pyXMLRPClib is the one that's > integrated in the standard library, so the external one might be "dead". >

Re: Beginner advice

2008-03-31 Thread Paul Scott
On Mon, 2008-03-31 at 04:02 -0700, Graham Ashton wrote: > pyGTK is great. I used it quite heavily a year or so ago. GTK is a > nice tool kit from the user's perspective too; you can make some > rather attractive and usable applications with it, and the GUI builder > is a boon. Obviously it integra

Re: Command line input

2008-03-31 Thread Paul Scott
On Mon, 2008-03-31 at 12:39 -0700, [EMAIL PROTECTED] wrote: > How do I receive input from the command line in Python? I have used: sys.argv[ 1 ] I have been doing Python for around 2 days now, so please do double check that! --Paul All Email originating from UWC is covered by disclaimer http

First Python project - comments welcome!

2008-04-07 Thread Paul Scott
I have started, and made some progress (OK it works, but needs some love) on my first real Python application. http://cvs2.uwc.ac.za/trac/python_tools/browser/podder I would love some feedback on what I have done. In total this has taken me 5 nights to do (I am working on it at night as PHP, not

Re: First Python project - comments welcome!

2008-04-07 Thread Paul Scott
On Mon, 2008-04-07 at 07:05 -0400, Steve Holden wrote: > The code looks pretty good to someone that doesn't know Gtk graphics. > Err, neither do I, so I guess that means its OK? :) > 184: self.wTree2=gtk.glade.XML(globaldir+"podder.glade","serverdialogue") > > could really do with using os.p

Re: First Python project - comments welcome!

2008-04-07 Thread Paul Scott
On Mon, 2008-04-07 at 09:56 -0700, Lie wrote: > I don't know if it was just me, but I can't just scan through your > code briefly to know what it is about (as is with any non-trivial > codes), only after looking through the website's Roadmap I realized > it's something to do with audio and recordi

Re: First Python project - comments welcome!

2008-04-08 Thread Paul Scott
On Mon, 2008-04-07 at 06:20 -0700, [EMAIL PROTECTED] wrote: > > If anyone on this list is willing/able, please do give me a few > > pointers, even if it is "This is total crap - RTFM and come back when > > you are ready" I would really appreciate it! > > Ok, since you asked for it: > Awesome fe

Linux Mag's "Introduction to Python Decorators"

2008-04-09 Thread Scott SA
t is very good (IMO, FWIW). I hope this helps others as much as it has for me, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: a name error

2008-04-14 Thread Paul Scott
On Tue, 2008-04-15 at 13:54 +0800, Penny Y. wrote: > import urllib2,sys > try: > r=urllib2.urlopen("http://un-know-n.com/";) > except URLError,e: > print str(e) > sys.exit(1) > > print r.info() > > > But got the errors: > > Traceback (most recent call last): > File "t1.py", line

Re: Brand New!

2008-04-15 Thread Paul Scott
On Wed, 2008-04-16 at 02:35 -0300, Gabriel Genellina wrote: > I'm unsure if teaching Javascript, VBScript and Python at the same time is > a good thing, I'd think one would get a language soup and mix all the > concepts, but if it works for you, go ahead. > For other resources, see the beginne

Re: Is massive spam coming from me on python lists?

2008-04-20 Thread Paul Scott
On Mon, 2008-04-21 at 02:01 -0400, Brian Vanderburg II wrote: > I've recently gotten more than too many spam messages and all say > Sender: [EMAIL PROTECTED] I'm wondering > if my mail list registration is now being used to spam myself and > others. If so, sorry, but I'm not the one sending m

@classmethod question

2008-04-23 Thread Scott SA
... RecipieClass.get_ingrendients(['cookies','cake','bread']) 8C Flour 2C Sugar ... Of course any suggestions on how this might be better approached would be interesting too. TIA, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: @classmethod question

2008-04-29 Thread Scott SA
Recipie.get('cookie').ingredients >print Recipies.get_ingredients_for('cookie', 'cake', 'bread') Yes, thank you. While my example didn't accurately portray my original thoughts, this is an educational example of merit. I'm still crossing the bridge of conceptual understanding into practical application. Decoration appears very useful, it's practical application requires a level of thought I'm not fluent. Google is helping. >My 2 cents... You're short-changing yourself ;-) Thanks for your input, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: @classmethod question

2008-04-29 Thread Scott SA
On 4/23/08, Ivan Illarionov ([EMAIL PROTECTED]) wrote: >On 24 ???, 07:27, Scott SA <[EMAIL PROTECTED]> wrote: >> I'm using the @classemethod decorator for some convenience methods and for > >It would make sense to separate instance-level and class-level >behav

Re: PIL and IPTC

2008-04-30 Thread Scott SA
ttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/500266> And another python-based (non PIL) one here: <http://www.jfroche.be/open-source/python-iptc-parser/iptc.py/view> While not a direct answer, I hope this is helpful, Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Signals/Slots support in Python

2008-05-01 Thread Scott SA
On 5/1/08, Brian Vanderburg II ([EMAIL PROTECTED]) wrote: >I don't know if any such support is already built in, so I ended up >making my own simple signals/slots like mechanism. If anyone is >interested then here it is, along with a simple test. It can connect to >normal functions as well as

Re: Photo gallery software

2008-05-01 Thread Scott SA
tagging: <http://code.google.com/p/django-tagging/> It easily allows configuration of different image sizes and integrates with generic templates providing gallery and detail view support. HTH Scott -- http://mail.python.org/mailman/listinfo/python-list

Nested os.path.join()'s

2008-05-05 Thread Paul Scott
Today, I needed to concatenate a bunch of directory paths and files together based on user input to create file paths. I achieved this through nested os.path.join()'s which I am unsure if this is a good thing or not. example: if os.path.exists(os.path.join(basedir,picdir)) == True : blah bla

Re: Nested os.path.join()'s

2008-05-05 Thread Paul Scott
On Mon, 2008-05-05 at 16:21 +0200, Paul Scott wrote: > example: > > if os.path.exists(os.path.join(basedir,picdir)) == True : > blah blah > Sorry, pasted the wrong example... Better example: pics = glob.glob(os.path.join(os.path.join(basedir,picdir),'*'))

Re: Nested os.path.join()'s

2008-05-05 Thread Paul Scott
On Mon, 2008-05-05 at 10:34 -0400, Jean-Paul Calderone wrote: > How about not nesting the calls? > > >>> from os.path import join > >>> join(join('x', 'y'), 'z') == join('x', 'y', 'z') > True > >>> > Great! Thanks. Didn't realise that you could do that... :) --Paul All Email o

mod_python and updated files

2008-08-18 Thread Aaron Scott
I have mod_python running on my server, but when I chance a Python file on the server, Apache needs to be restarted in order to have the changes take effect. I assume this is so mod_python can run persistently, but it's becoming quite a headache for development. Is there a way to turn off the persi

Reading binary data

2008-09-10 Thread Aaron Scott
I've been trying to tackle this all morning, and so far I've been completely unsuccessful. I have a binary file that I have the structure to, and I'd like to read it into Python. It's not a particularly complicated file. For instance: signature char[3] "GDE" version uint32 2 attr_co

Re: Reading binary data

2008-09-10 Thread Aaron Scott
> signature, version, attr_count = struct.unpack('3cII', > yourfile.read(11)) > This line is giving me an error: Traceback (most recent call last): File "test.py", line 19, in signature, version, attr_count = struct.unpack('3cII', file.read(12)) ValueError: too many values to unpack -- htt

<    1   2   3   4   5   6   7   8   9   10   >