>> Hello, I thought I understood **kwargs until I stumbled with this
>> function:
>>
>> def changeflexion(myword, mytag, **dicty):
>>:
>>
>> but when I import the module and call:
>> a = conjugate.changeflexion('estaban', 'VLFin', conjugate.mydict)
>> I get this error:
>> TypeError: changef
On Sat, Jun 6, 2009 at 5:37 PM, Nick Burgess wrote:
> Thanks everyone, the following code works great. It returns the name
> of the file and the row that matched the reqex. Is it posible to take
> the regex compile from user input? To make it take an argument, like
>
>> csvSearch.py 10.192.55
>
Can you try that again?
Kent
On Sat, Jun 6, 2009 at 4:20 PM, Essah Mitges wrote:
>
> from math import sin, cos, pi import pygame displayWidth = 640displayHeight
> = 480fpsLimit = 90 def sinInterpolation(start, end, steps=30): values =
> [start] delta = end - start for i in range(1, steps
On Tue, Jun 02, 2009 at 04:40:43PM -0500, W W wrote:
>
>On Tue, Jun 2, 2009 at 1:30 PM, Dave Angel <[1]da...@ieee.org> wrote:
>
> You could use the commercial Komodo IDE. It's got a debugger that
> runs the Python code as a separate process, so it can be used for
> GUI debuggi
"Gonzalo Garcia-Perate" wrote
Hello tutor, What's the simplest way of creating a list with a range
of numbers above and below a given number?
...
this works fine, but is there a simpler way of doing it? a one liner? :)
I'd probably use a list comprehesion:
L = [n for n in range(lower, uppe
2009/6/6 Nick Burgess :
> Is it posible to take
> the regex compile from user input? To make it take an argument, like
>
>> csvSearch.py 10.192.55
You can use raw_inpout() see [1] for the docs
user_input = raw_input('Please provide input')
Greets
Sander
[1] http://docs.python.org/library/fun
Thanks everyone, the following code works great. It returns the name
of the file and the row that matched the reqex. Is it posible to take
the regex compile from user input? To make it take an argument, like
> csvSearch.py 10.192.55
af = re.compile(sys.argv[1])
pattern = re.compile(af)
2009/6/6 Emile van Sebille :
>> for f in files:
>> print f
>> csv.reader(open (f), delimiter=' ', quotechar='|')
>
> you open it here, but don't save a reference to the opened file. Try...
> ff = csv.reader(open (f), delimiter=' ', quotechar='|')
> reader(...)
> csv_reader
from math import sin, cos, pi
import pygame
displayWidth = 640displayHeight = 480fpsLimit = 90
def sinInterpolation(start, end, steps=30):values = [start]delta = end
- startfor i in range(1, steps):n = (pi / 2.0) * (i / float(steps -
1))values.append(start + delta *
On 6/6/2009 1:07 PM Nick Burgess said...
f seems to be a string containing the file names, so csv.reader isnt
actually opening them.. maybe i will play with os.walk..?
files = glob.glob("*.csv")
Almost there...
for f in files:
print f
csv.reader(open (f), delimiter=' ', quotechar='
On 6/6/2009 12:31 PM Gonzalo Garcia-Perate said...
Hello tutor, What's the simplest way of creating a list with a range
of numbers above and below a given number?
see the function below:
def within_range( self, number, median, threshold=5 ):
# build a list of (threshold) numbers abo
f seems to be a string containing the file names, so csv.reader isnt
actually opening them.. maybe i will play with os.walk..?
files = glob.glob("*.csv")
for f in files:
print f
csv.reader(open (f), delimiter=' ', quotechar='|')
for row in f:
for cell in row:
if p
On 6/6/2009 12:19 PM Nick Burgess said...
Thank you. The data is pretty much random throughout the csv's so I
think I it would have to iterate over the entire rows . I need to
search all .csv files in the current directory. I can get glob to
return a list of files. How could I get csv.reader
Hello tutor, What's the simplest way of creating a list with a range
of numbers above and below a given number?
see the function below:
def within_range( self, number, median, threshold=5 ):
# build a list of (threshold) numbers above and below median
range_list = range( media
Thank you. The data is pretty much random throughout the csv's so I
think I it would have to iterate over the entire rows . I need to
search all .csv files in the current directory. I can get glob to
return a list of files. How could I get csv.reader to open all the
files in the list? My loop
"Eduardo Vieira" wrote in message
news:9356b9f30906061044i4ded250fif3b387e64a117...@mail.gmail.com...
Hello, I thought I understood **kwargs until I stumbled with this
function:
def changeflexion(myword, mytag, **dicty):
global er_verbs
global ar_verbs
global ir_verbs
#global di
Eduardo Vieira wrote:
Hello, I thought I understood **kwargs until I stumbled with this function:
def changeflexion(myword, mytag, **dicty):
global er_verbs
global ar_verbs
global ir_verbs
#global dicty
for item in dicty:
if myword in item and mytag in item[1]:
Hello, I thought I understood **kwargs until I stumbled with this function:
def changeflexion(myword, mytag, **dicty):
global er_verbs
global ar_verbs
global ir_verbs
#global dicty
for item in dicty:
if myword in item and mytag in item[1]:
if dicty[item].end
> In simple terms I was trying to create a 'folder with a view' which
> displays all the data it contains on one page, rather than having to
> view each node individually.
In that case I'd probably create a FolderView class with a show or display
method.
If you want to do something with the c
On Tue, Jun 2, 2009 at 5:06 PM, Allen Fowler wrote:
>
> Hello,
>
> I'm looking for some suggestions as to the filesystem source code layout for
> a new project.
>
> Here is what I am thinking so far:
>
> root_folder/
> - app/ -- Code for our pylons/django/TG/etc web app
> - web/ -- Public static
On Sat, Jun 6, 2009 at 10:43 AM, Norman Khine wrote:
> http://docs.hforge.org/itools/web.html although this is for the newer
> version, in my case i am maintaining an older version.
>From that page it seems that itools does as I suggest. They claim to
follow the Model-View-Controller pattern which
http://docs.hforge.org/itools/web.html although this is for the newer
version, in my case i am maintaining an older version.
On Sat, Jun 6, 2009 at 3:24 PM, Kent Johnson wrote:
> On Sat, Jun 6, 2009 at 8:26 AM, Norman Khine wrote:
>
>>> You probably don't want the view code in the same class with
On Sat, Jun 6, 2009 at 8:26 AM, Norman Khine wrote:
>> You probably don't want the view code in the same class with the data.
>> It's generally a good idea to separate the model - the representation
>> of data - from the view - the display of the data.
>
> In iTools, each class has a view, edit, s
Hi
On Sat, Jun 6, 2009 at 2:38 PM, Alan Gauld wrote:
>
> "Norman Khine" wrote
>
>> In my application I have 3 folders each containing images, something like:
>>
>> $ tree -L 3 /database/companies/company/
>> |-- product
>> | |-- itinerary
>> | | |-- img1.gif
>> | | |-- img1.gif.metadata
"Norman Khine" wrote
In my application I have 3 folders each containing images, something
like:
$ tree -L 3 /database/companies/company/
|-- product
| |-- itinerary
| | |-- img1.gif
| | |-- img1.gif.metadata
| | |-- day1
| | | |-- img2.gif
| | | `-- img2.gif.metadat
Thanks for the reply.
I am using the iTools python library from http://hforge.org
(http://git.hforge.org/) and the data is stored as XML files.
On Sat, Jun 6, 2009 at 1:02 PM, Kent Johnson wrote:
> On Sat, Jun 6, 2009 at 5:04 AM, Norman Khine wrote:
>> Hello,
>> I would like help to design the fol
On Sat, Jun 6, 2009 at 5:04 AM, Norman Khine wrote:
> Hello,
> I would like help to design the following:
> http://paste.lisp.org/display/81448
Product.get_days() may have a bug, it only returns the first container it finds.
You probably don't want the view code in the same class with the data.
I
Hello,
I would like help to design the following:
In my application I have 3 folders each containing images, something like:
$ tree -L 3 /database/companies/company/
|-- product
| |-- itinerary
| | |-- img1.gif
| | |-- img1.gif.metadata
| | |-- day1
| | | |-- img2.gif
| |
28 matches
Mail list logo