On Oct 18, 8:53 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Abandoned <[EMAIL PROTECTED]> writes:
> > > When you load it, convert the string to dict with cPickle.loads
> > > instead of with eval.
>
> > Yes i understand and this very very good ;)
>
> Good! :-)
>
> > psycopg2.ProgrammingError: in
Hello,
Was about to report the same problem with setup.py.
Regards,
David
2007/10/18, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> On Oct 17, 4:12 am, Greg Ewing <[EMAIL PROTECTED]> wrote:
> > Pyrex 0.9.6.3 is now available:
> >
> >http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
> >
> > M
On Oct 18, 7:44 pm, MRAB <[EMAIL PROTECTED]> wrote:
> It returns '' when number == 0, so you need to test for that case:
>
> > def baseN(number, N=2):
> > """
> > >>> baseN(9, 2)
> > '1001'
> > """
> > assert 2 <= N <= 10
> > assert isinstance(number, int) and number >= 0
>
Robert Kern wrote:
> [david] wrote:
>> Steve Lamb wrote:
>>> On 2007-10-17, Byung-Hee HWANG <[EMAIL PROTECTED]> wrote:
Just click "Ctrl-L", then you can reply to lists directly if you use
good mailer like mutt or thunderbird or evolution ;;
>>> Thunderbird only if it has the list-rep
Hello,
I have the following single line in my .py file:
from PyQt4 import QtCore, QtGui
if i run it from eric, i get the following error:
unhandled RuntimeError
"the PyQt4.QtCore and qt modules both wrap the QObject class"
i think that eric is probably trying to load both Qt3 and Qt4, but i don
I'm curious if anyone has ever tried using nosetests along with
minimock.
I'm trying to get the two to play nice and not making progress. I
also wonder if I'm using minimock incorrectly.
Here's the code I want to test, saved in a file dtfun.py.
class Chicken(object):
"I am a chicke
En Thu, 18 Oct 2007 23:44:27 -0300, Ixiaus <[EMAIL PROTECTED]>
escribió:
> I have just come across a site that discusses Python's 'for' and
> 'while' loops as having an (optional) 'else' structure.
>
> At first glance I interpreted it as being a bit like the 'default'
> structure in PHP's switch
On Oct 18, 6:12 pm, Monty Taylor <[EMAIL PROTECTED]> wrote:
> Hey everybody,
>
> MySQL has put up a poll onhttp://dev.mysql.comasking what your primary
> programming language is.
But it doesn't ask that, it asks what your
primary programming language is FOR DEVELOPING
MYSQL APPLICATIONS.
In my ca
I have just come across a site that discusses Python's 'for' and
'while' loops as having an (optional) 'else' structure.
At first glance I interpreted it as being a bit like the 'default'
structure in PHP's switch block... But the switch block isn't a loop,
so, I am now confused as to the reason f
I have just come across a site that discusses Python's 'for' and
'while' loops as having an (optional) 'else' structure.
At first glance I interpreted it as being a bit like the 'default'
structure in PHP's switch block... But the switch block isn't a loop,
so, I am now confused as to the reason f
En Thu, 18 Oct 2007 19:21:15 -0300, milan_sanremo
<[EMAIL PROTECTED]> escribió:
> I've read the library entry for pickle a couple of times, and I'm
> still not
> sure what data is maintained when an item is pickled and sent over a
> socket.
For most "normal" objects, all their instance attribut
That was a very helpful answer Steven, thank you for taking the time
to write it!
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday 18 October 2007 15:23, Frank Aune wrote:
> Hello,
>
> I use ConfigParser and actually quite like it, EXCEPT that it doesnt
> preserve the section order of the original config file when writing a new.
> This behaviour is hopeless IMO, and I've been looking for alternatives.
>
> I've b
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 17 Oct 2007 13:41:06 +0200, Hrvoje Niksic wrote:
>
>> The current implementation of += uses __add__ for addition and __iadd__
>> for addition that may or may not be in-place. I'd like to know the
>> rational
On Oct 18, 2:56 pm, Metalone <[EMAIL PROTECTED]> wrote:
> In particular I want to know how to tell if reading and writing to the
> console can occur.
> Something like
> sys.isConsolePresent()
Look at sys.executable to find the name of the binary for the Python
interpreter.
--
http://mail.python.
On Oct 18, 4:39 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi,
> Does any one know whare I can find some code to phrase a rss feeds?
> Thank you,
> Ted
Try http://feedparser.org/
--
http://mail.python.org/mailman/listinfo/python-list
Hey everybody,
MySQL has put up a poll on http://dev.mysql.com asking what your primary
programming language is. Even if you don't use MySQL - please go stick
in a vote for Python. I'm constantly telling folks that Python needs
more love, but PHP and Java are kicking our butts...
(I know the w
On Oct 18, 7:05 am, Michele Simionato <[EMAIL PROTECTED]>
wrote:
> On Oct 17, 5:58 pm, Ixiaus <[EMAIL PROTECTED]> wrote:
>
> > def bin2dec(val):
> > li = list(val)
> > li.reverse()
> > res = [int(li[x])*2**x for x in range(len(li))]
> > print sum(res)
>
> > It basically does the sam
Ok, I finally got it figured out. The secret which no one told me what
that if you're doing embedding, you have to initialize your modules!
BOOST_PYTHON_MODULE(Enums){ ... } defines the function initEnums()
which must be called before you can import the module. Finally figured
it out by looking he
Hi,
Does any one know whare I can find some code to phrase a rss feeds?
Thank you,
Ted
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I use ConfigParser and actually quite like it, EXCEPT that it doesnt preserve
the section order of the original config file when writing a new. This
behaviour is hopeless IMO, and I've been looking for alternatives.
I've been reading the interesting discussion on python-dev about improve
On Oct 19, 7:56 am, Metalone <[EMAIL PROTECTED]> wrote:
> In particular I want to know how to tell if reading and writing to the
> console can occur.
> Something like
> sys.isConsolePresent()
Have you tried:
sys.stdin.isatty()
sys.stdout.isatty()
Graham
--
http://mail.python.org/mailman/li
On Wed, 17 Oct 2007 23:06:24 -0700, Ixiaus wrote:
> I know '<<' is shifting x over by n bits; but could you point me to some
> literature that would explain why it is the same as "x*2**n"? (Googling
> only returns bit shift, but doesn't necessarily explain the manner in
> which you are using it)
On Tue, 16 Oct 2007 18:55:22 +, Duncan Booth wrote:
> Sami Vaisanen <[EMAIL PROTECTED]> wrote:
>
>> Hello group,
>>
>> I'm writing a C++ based application that embeds the python engine. Now I
>> have a problem regarding exception/error information. Is there a way to
>> get the exception mes
On Thu, 13 Sep 2007 21:26:33 -0400, Carsten Haese wrote:
> On Thu, 2007-09-13 at 18:05 -0700, Thierry Masson wrote:
>> Hello,
>>
>> I'm trying to use the C API to extend Python. I've looked at various
>> books and web sites (including the docs at python.org) and I can't get
>> any of the samples
On Thursday 18 October 2007 19:26:59 Vinay Sajip wrote:
> The same technique applies to the arguments passed to the constructor.
>
> Hope this helps,
>
Thank you! This seems like exactly what I was looking for.
Very impressive logging framework btw - I use it whenever I can =)
Cheers,
Frank
--
On Thu, 18 Oct 2007 14:05:34 -0300, Sebastian Bassi wrote:
> On 10/18/07, Adam Atlas <[EMAIL PROTECTED]> wrote:
>>
>> Use the builtin function "eval".
>
> What is the difference with os.system()?
Everything.
eval() evaluates Python expressions like "x.append(2+3)".
os.system() calls your opera
I've read the library entry for pickle a couple of times, and I'm
still not
sure what data is maintained when an item is pickled and sent over a
socket.
Two importable modules:
class envelope():
def __init__(self, rec, d):
self.recipient = rec
self.listData
On Oct 18, 3:52 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Thu, 18 Oct 2007 15:24:27 +1000, Ben Finney wrote:
> > Steven D'Aprano <[EMAIL PROTECTED]> writes:
>
> >> and help(reversed) but neither gives any insight to what happens when
> >> you use reversed() on a sequenc
In particular I want to know how to tell if reading and writing to the
console can occur.
Something like
sys.isConsolePresent()
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 17, 4:12 am, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Pyrex 0.9.6.3 is now available:
>
>http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
>
> Main features of this release:
>
>* The C API now uses just one name in the module namespace,
> instead of a name per C function.
>
>
On 18 oct, 16:55, Sushant <[EMAIL PROTECTED]> wrote:
> Does gateway.py has the python interpreter in the top (i.e.,
> #!/usr/local/bin/python)
The OP said he's on Windows so that doesn't matter.
> On Thursday 18 October 2007 2:13 pm, Simon Pickles wrote:
>
> > os.spawnv(os.P_NOWAIT, "gateway
> > The OP's problem is that he suffers from the delusion that people want
> > to steal the source code for hisCGIscript.
Why is assuming someone may try to get my source CGI delusional?
I'm on a shared server (Dreamhost). The CGI itself has 755 permissions
to execute, but what about folder permi
On Oct 18, 11:56 am, "Tim Arnold" <[EMAIL PROTECTED]> wrote:
> Hi, I'm using the Image module to resize PNG images from 300 to 100dpi for
> use in HTML pages, but I'm losing some vertical and horizontal lines in the
> images (usually images of x-y plots).
>
> Here's what I do:
> import Image
> def
On 18 oct, 13:46, mathieu <[EMAIL PROTECTED]> wrote:
> On Oct 18, 6:36 pm, mathieu <[EMAIL PROTECTED]> wrote:
> > > I am trying to use strptime to parse my microseconds but I was not
> > > able the documentation for it. The only list I found was:
> Ok final version is simply:
>
> s1 = "20070619"
Hi,
I got problems while running Eric Blossom's FM receiver's example codes
from the GNURadio tutorial page; the RF front end reads the signal input
from daughter board, and when the compiler tried to call mothods to set
values for IF and gain, such as set_AGC(), get_output_freq(), etc... it
On 18 Okt., 22:08, Paul McNett <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Oct 19, 7:32 am, Florian Lindner <[EMAIL PROTECTED]> wrote:
> >> Hello,
> >> I have a string:
>
> >> INSERT INTO mailboxes (`name`, `login`, `home`, `maildir`, `uid`,
> >> `gid`, `password`) VALUES (%s, %s,
On 18 Ott, 06:15, Xah Lee <[EMAIL PROTECTED]> wrote:
> [...]
Half lost on my firmness gains to more glad heart,
Or violent and from forage drives
A glimmering of all sun new begun
Both harp thy discourse they march'd,
Forth my early, is not without delay;
For their soft with whirlwind; and balm.
U
On Oct 18, 1:38 pm, Bruno Desthuilliers wrote:
> Abandoned a écrit :
> (snip)
>
> > I'm very confused :(
> > I try to explain main problem...
> > I have a table like this:
> > id-1 | id-2 | value
> > 23 24 34
> > 56 68 66
> > 56 98 32455
> > 55 62 655
> > 56
[EMAIL PROTECTED] wrote:
> On Oct 19, 7:32 am, Florian Lindner <[EMAIL PROTECTED]> wrote:
>> Hello,
>> I have a string:
>>
>> INSERT INTO mailboxes (`name`, `login`, `home`, `maildir`, `uid`,
>> `gid`, `password`) VALUES (%s, %s, %s, %s, %i, %i, %s)
>>
>> that is passed to a MySQL cursor from MySQ
> Is there a way to do:
>
> s = "I like python %i%s of the time."
> print s % (99, "%")
>
> without having to pass in "%"?
You mean like
s = "I like python %i%% of the time."
print s % 99
http://docs.python.org/lib/typesseq-strings.html
-tkc
--
http://mail.python.org/mailman/listinfo
Does gateway.py has the python interpreter in the top (i.e.,
#!/usr/local/bin/python)
-Sushant.
On Thursday 18 October 2007 2:13 pm, Simon Pickles wrote:
> Well, I tried:
>
> os.spawnv(os.P_NOWAIT, "gateway.py", ())
>
> and got:
>
> OSError: [Errno 8] Exec format
>
> Simon Pickles wrote:
Is there a way to do:
s = "I like python %i%s of the time."
print s % (99, "%")
without having to pass in "%"?
Thanks,
Gerard
--
http://mail.python.org/mailman/listinfo/python-list
dmitrey a écrit :
> Hi all,
> I have the code like this one:
>
> from myMisc import ooIter
> class MyClass:
Unless you have a need for compatibility with aged Python versions,
you'd be better using new-style classes:
class MyClass(object):
> def __init__(self): pass
This is the default be
On Oct 19, 8:22 am, dmitrey <[EMAIL PROTECTED]> wrote:
> Hi all,
> I have the code like this one:
>
> from myMisc import ooIter
> class MyClass:
> def __init__(self): pass
> iterfcn = lambda *args: ooIter(self) # i.e pass the class instance
> to other func named ooIter
> field2 = val2
>
On Oct 19, 7:32 am, Florian Lindner <[EMAIL PROTECTED]> wrote:
> Hello,
> I have a string:
>
> INSERT INTO mailboxes (`name`, `login`, `home`, `maildir`, `uid`,
> `gid`, `password`) VALUES (%s, %s, %s, %s, %i, %i, %s)
>
> that is passed to a MySQL cursor from MySQLdb:
>
> ret = cursor.execute(sql,
Hi all,
I have the code like this one:
from myMisc import ooIter
class MyClass:
def __init__(self): pass
iterfcn = lambda *args: ooIter(self) # i.e pass the class instance
to other func named ooIter
field2 = val2
field3 = val3 # etc
So it yields "global name 'self' is not defined"
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I don't understand how reversed() is operating. I've read the description
| in the docs:
|
| reversed(seq)
| Return a reverse iterator. seq must be an object which supports the
| sequence protocol (the __len__() method
Hi, I'm using the Image module to resize PNG images from 300 to 100dpi for
use in HTML pages, but I'm losing some vertical and horizontal lines in the
images (usually images of x-y plots).
Here's what I do:
import Image
def imgResize(self,filename):
img = Image.open(filename)
dpi
On 10/18/07, Cory <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a hopefully quick question about how to use Boost.Python to
> export an Enum.
> I am embedding python in C++ and am currently exporting my classes in
> the following way:
>
> nameSpace["OBJECT"] = class_("OBJECT")
> .def("getTy
On Oct 18, 2:25 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> >> Note that the starting index is determined at creation time, not when
> >> the iteration begins. So, if you create a reversed object over a list
> >> containing 3 elements, the first return
On Oct 18, 9:47 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Debajit Adhikary <[EMAIL PROTECTED]> wrote:
>
> > How does "a.extend(b)" compare with "a += b" when it comes to
> > performance? Does a + b create a completely new list that it assigns
> > back to a? If so, a.extend(b) would seem to be
Hello,
I have a string:
INSERT INTO mailboxes (`name`, `login`, `home`, `maildir`, `uid`,
`gid`, `password`) VALUES (%s, %s, %s, %s, %i, %i, %s)
that is passed to a MySQL cursor from MySQLdb:
ret = cursor.execute(sql, paras)
paras is:
('flindner', '[EMAIL PROTECTED]', '/home/flindner/', '/home
www.nayloon.com business2business website.Full dynamic and 2 language
10 pages.You post your products you can find customer from all over
world.Try it.You will see the different.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2007-10-18 at 19:53 +0200, Hrvoje Niksic wrote:
> Don't
> forget to also use a bind variable, something like:
>
> cursor.execute("INSERT INTO cache2 VALUES (?)", a)
I second the advice, but that code won't work. The bind parameters must
be a sequence, and psycopg2 (unfortunately) uses %s
Well, I tried:
os.spawnv(os.P_NOWAIT, "gateway.py", ())
and got:
OSError: [Errno 8] Exec format
Simon Pickles wrote:
> Hello,
>
> I have several servers which link to each other (and of course, to clients).
>
> At present, I am starting them in turn manually. Is there a way with
>
Abandoned <[EMAIL PROTECTED]> writes:
> > When you load it, convert the string to dict with cPickle.loads
> > instead of with eval.
>
> Yes i understand and this very very good ;)
Good! :-)
> psycopg2.ProgrammingError: invalid byte sequence for encoding "UTF8":
> 0x80
> HINT: This error can a
Hello,
I have several servers which link to each other (and of course, to clients).
At present, I am starting them in turn manually. Is there a way with
python to say, "open gateway.py in a new interpreter window"?
I looked at execv, etc, but they seem to replace the current process.
Ah, maybe
On Oct 18, 7:06 am, Ixiaus <[EMAIL PROTECTED]> wrote:
[...]
> I know '<<' is shifting x over by n bits; but could you point me to
> some literature that would explain why it is the same as "x*2**n"?
I haven't got literature but I've got a (hopefully straightforward)
explanation:
In binary 2 is 10
On Thursday 18 October 2007 09:09, Grant Edwards wrote:
> I like the solution somebody sent me via PM:
>
> def toggle():
> while 1:
> yield "Even"
> yield "Odd"
>
That was me.
Sorry, list, I meant to send it to everyone but I my webmail didn't respect
the list* headers :(.
Th
Abandoned a écrit :
(snip)
> I'm very confused :(
> I try to explain main problem...
> I have a table like this:
> id-1 | id-2 | value
> 23 24 34
> 56 68 66
> 56 98 32455
> 55 62 655
> 56 28 123
> ( 3 millions elements)
>
> I select where id=5
Richard Brodie a écrit :
> "Matimus" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> I think several people have given you the correct answer, but for some
>> reason you aren't getting it. Instead of saving the string
>> representation of a dictionary to the database...
>
> Mi
Abandoned a écrit :
(snip)
> import cPickle as pickle
> a="{2:3,4:6,2:7}"
> s=pickle.dumps(a, -1)
> g=pickle.loads(s);
> print g
> '{2:3,4:6,2:7}'
>
> Thank you very much for your answer but result is a string ??
>
Of course it's a string. That's what you pickled. What did you hope ? If
you want
Abandoned a écrit :
> On Oct 18, 6:51 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> On Thu, 18 Oct 2007 08:41:30 -0700, Abandoned wrote:
>>> import cPickle as pickle
>>> a="{2:3,4:6,2:7}"
>>> s=pickle.dumps(a, -1)
>>> g=pickle.loads(s);
>>> print g
>>> '{2:3,4:6,2:7}'
>>> Thank you ver
On 15 Oct, 15:15, Frank Aune <[EMAIL PROTECTED]> wrote:
> What I'm wondering, is if its possible to specify the database handler in a
> config file like:
>
> [handler_database]
> class=DBHandler
> level=DEBUG
> formatter=database
> args=('localhost', uid='root')
>
> I've seen the log_test14.py exam
"Matimus" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I think several people have given you the correct answer, but for some
> reason you aren't getting it. Instead of saving the string
> representation of a dictionary to the database...
Mind you, if this were Jeopardy, "Store
On 18 Okt, 17:24, Steve Holden <[EMAIL PROTECTED]> wrote:
> allen.fowler wrote:
[Quoting IamIan...]
> >> One CGI question - since all of my CGIs are spitting out HTML is their
> >> source code safe? wget and linking to the source deliver the output
> >> HTML. Are there any other methods of trying
On 10/18/07, Adam Atlas <[EMAIL PROTECTED]> wrote:
>
> Use the builtin function "eval".
What is the difference with os.system()?
--
Sebastián Bassi (セバスティアン). Diplomado en Ciencia y Tecnología.
Curso Biologia molecular para programadores: http://tinyurl.com/2vv8w6
GPG Fingerprint: 9470 0980 620D
On Oct 18, 7:40 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Abandoned <[EMAIL PROTECTED]> writes:
> > Sorry i can't understand :(
> > Yes my database already has data in the "{..}" format and i select
> > this and i want to use it for dictionary..
>
> But, do you use Python to create that data?
-- Forwarded message --
From: Roc Zhou <[EMAIL PROTECTED]>
Date: Oct 19, 2007 12:48 AM
Subject: Re: Pyinotify : which user ?
To: Sébastien Weber <[EMAIL PROTECTED]>
The command lsof or fuser can report who is using the file, maybe you can
have a look at their source code, but they
Abandoned <[EMAIL PROTECTED]> writes:
> Sorry i can't understand :(
> Yes my database already has data in the "{..}" format and i select
> this and i want to use it for dictionary..
But, do you use Python to create that data? If so, simply convert it
to pickle binary format instead of "{...}".
On Oct 16, 9:17 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Tue, 16 Oct 2007 11:52:22 -0700, fabdeb wrote:
> > the first: what is the differences between a function and a classe?
>
> A class bundles data and functions into one object.
>
> > In which case i should use a function ?
>
On Oct 18, 6:36 pm, mathieu <[EMAIL PROTECTED]> wrote:
> On Oct 18, 6:00 pm, mathieu <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi there,
>
> > I am trying to use strptime to parse my microseconds but I was not
> > able the documentation for it. The only list I found was:
>
> > http://docs.python.org/
On Oct 18, 9:09 am, Abandoned <[EMAIL PROTECTED]> wrote:
> On Oct 18, 6:57 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Abandoned wrote:
> > > On Oct 18, 6:35 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> > >> Abandoned wrote:
> > >> > On Oct 18, 6:14 pm, "Diez B. Roggisch" <[E
On Oct 18, 6:00 pm, mathieu <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I am trying to use strptime to parse my microseconds but I was not
> able the documentation for it. The only list I found was:
>
> http://docs.python.org/lib/module-time.html
>
> So I can get seconds with %S, but nowhere is
Abandoned <[EMAIL PROTECTED]> writes:
> I select where id=56 and 100.000 rows are selecting but this took 2
> second. (very big for my project)
> I try cache to speed up this select operation..
> And create a cache table:
> id-1 | all
> 56{68:66, 98:32455, 62:655}
If you use Python to create
On Oct 18, 7:02 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Abandoned <[EMAIL PROTECTED]> writes:
> > import cPickle as pickle
> > a="{2:3,4:6,2:7}"
> > s=pickle.dumps(a, -1)
> > g=pickle.loads(s);
> > print g
> > '{2:3,4:6,2:7}'
>
> > Thank you very much for your answer but result is a string ?
Abandoned <[EMAIL PROTECTED]> writes:
> import cPickle as pickle
> a="{2:3,4:6,2:7}"
> s=pickle.dumps(a, -1)
> g=pickle.loads(s);
> print g
> '{2:3,4:6,2:7}'
>
> Thank you very much for your answer but result is a string ??
Because you gave it a string. If you give it a dict, you'll get a
dict:
On Oct 18, 6:57 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Abandoned wrote:
> > On Oct 18, 6:35 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> Abandoned wrote:
> >> > On Oct 18, 6:14 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> >> Abandoned wrote:
> >> >> > Thanks you all
Hi there,
I am trying to use strptime to parse my microseconds but I was not
able the documentation for it. The only list I found was:
http://docs.python.org/lib/module-time.html
So I can get seconds with %S, but nowhere is there a microsecond
symbol...
Thanks for pointer to doc,
-Mathieu
Hello,
I'm actually writing an application with pyinotify which watchs a
directory.
Pyinotify lets me know the events (access, modify, suppression, etc.) on
and in the directory, but not the users who are responsable of them.
Does someone know a library which could give me that information (who'
Abandoned wrote:
> On Oct 18, 6:35 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Abandoned wrote:
>> > On Oct 18, 6:14 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> >> Abandoned wrote:
>> >> > Thanks you all answer..
>> >> > But "eval" is very slow at very big dictionary {2:3,4:5,6:1
Version 1.4 of my scalar class is available at
http://RussP.us/scalar.htm
No major changes. I have corrected the "repr" function to make it more
useful, and I have added a "unit_type" function that returns the type
of a unit (e.g., time, length, force). The unit_type function is
intended mainly f
On Oct 18, 6:51 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Thu, 18 Oct 2007 08:41:30 -0700, Abandoned wrote:
> > import cPickle as pickle
> > a="{2:3,4:6,2:7}"
> > s=pickle.dumps(a, -1)
> > g=pickle.loads(s);
> > print g
> > '{2:3,4:6,2:7}'
>
> > Thank you very much for your answe
On Thu, 18 Oct 2007 08:41:30 -0700, Abandoned wrote:
> import cPickle as pickle
> a="{2:3,4:6,2:7}"
> s=pickle.dumps(a, -1)
> g=pickle.loads(s);
> print g
> '{2:3,4:6,2:7}'
>
> Thank you very much for your answer but result is a string ??
In Python terms yes, strings in Python can contain any by
On Oct 18, 6:35 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Abandoned wrote:
> > On Oct 18, 6:14 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> Abandoned wrote:
> >> > Thanks you all answer..
> >> > But "eval" is very slow at very big dictionary {2:3,4:5,6:19}
> >> > (100.000 el
On Oct 18, 6:26 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Abandoned <[EMAIL PROTECTED]> writes:
> > 173.000 dict elements and it tooks 2.2 seconds this very big time
> > for my project
>
> If you're generating the string from Python, use cPickle instead.
> Much faster:
>
> >>> import time
> >>
Abandoned wrote:
> On Oct 18, 6:14 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Abandoned wrote:
>> > Thanks you all answer..
>> > But "eval" is very slow at very big dictionary {2:3,4:5,6:19}
>> > (100.000 elements)
>> > Is there any easy alternative ?
>>
>> How big? How slow? For me,
Abandoned <[EMAIL PROTECTED]> writes:
> 173.000 dict elements and it tooks 2.2 seconds this very big time
> for my project
If you're generating the string from Python, use cPickle instead.
Much faster:
>>> import time
>>> d = dict((i, i+1) for i in xrange(17))
>>> len(d)
17
>>> s=repr(d)
allen.fowler wrote:
>> One CGI question - since all of my CGIs are spitting out HTML is their
>> source code safe? wget and linking to the source deliver the output
>> HTML. Are there any other methods of trying to steal the source CGI I
>> need to protect against?
>>
>> Thank you.
>
> Not sure I
Fabian Braennstroem wrote:
> Hi,
>
> I would like to use python to start an terminal, e.g. xterm, and login on a
> remote machine using rsh or ssh. This could be done using 'xterm -e ssh
> machine', but after the login I would like to jump to a given directory.
> Does anyone have an idea how to do
On Oct 18, 6:14 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Abandoned wrote:
> > Thanks you all answer..
> > But "eval" is very slow at very big dictionary {2:3,4:5,6:19}
> > (100.000 elements)
> > Is there any easy alternative ?
>
> How big? How slow? For me, a 1-element list takes
Abandoned wrote:
> Thanks you all answer..
> But "eval" is very slow at very big dictionary {2:3,4:5,6:19}
> (100.000 elements)
> Is there any easy alternative ?
How big? How slow? For me, a 1-element list takes 0.04 seconds to be
parsed. Which I find fast.
Diez
--
http://mail.python.o
Thanks you all answer..
But "eval" is very slow at very big dictionary {2:3,4:5,6:19}
(100.000 elements)
Is there any easy alternative ?
--
http://mail.python.org/mailman/listinfo/python-list
rc wrote:
> On Oct 17, 11:07 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> rc wrote:
>> > How to insert NULL values in to int field using params.
>>
>> > I'm trying to use pymssql.execute, passing the operation and list of
>> > params. One of the values in the params is a NULL value going
On Oct 18, 12:25 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> I prefer the calendar module in that case:
>
> py> import locale
> py> locale.setlocale(locale.LC_ALL, '')
> 'Spanish_Argentina.1252'
> py>
> py> import calendar
> py> calendar.month_abbr[12]
> 'Dic'
> py> def prev_months(since,
Abandoned wrote:
> I want to convert a string to command..
> For example i have a string:
> a="['1']"
> I want to do this list..
> How can i do ?
The correct wording here would be expression. To evaluate expressions, there
is the function eval:
a = eval("['1']")
But beware: if the expression co
On Oct 18, 10:23 am, Abandoned <[EMAIL PROTECTED]> wrote:
> I want to convert a string to command..
> For example i have a string:
> a="['1']"
> I want to do this list..
> How can i do ?
Use the builtin function "eval".
--
http://mail.python.org/mailman/listinfo/python-list
I want to convert a string to command..
For example i have a string:
a="['1']"
I want to do this list..
How can i do ?
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 18, 3:48 pm, Iain King <[EMAIL PROTECTED]> wrote:
> On Oct 18, 2:29 am, Grant Edwards <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 2007-10-17, Debajit Adhikary <[EMAIL PROTECTED]> wrote:
>
> > > # Start of Code
>
> > > def evenOdd():
> > > values = ["Even", "Odd"]
> > > state = 0
> > >
1 - 100 of 142 matches
Mail list logo