On May 17, 11:45 am, gwhite wrote:
> 1. If running from the system command line, or the Sypder "run"
> button, "__name__" is "__main__" rather than "newbie00", as seen
> above.
>
> So, how would I get the file name newbie00.py in these two noted
> cases?
You can get it from the file name:
i
On Wed, 16 May 2012 18:45:39 -0700, gwhite wrote:
> #!
> # Filename: newbie00.py
"Supposed to"? Nothing -- it is completely optional.
#! ("hash-bang") lines currently do nothing on Windows machines, they are
just comments. However, on Unix and Linux machines (and Macintosh?) they
are interpre
I have continued my research in literature algorithms in Python. The
algorithms in Knuth's volumes 1 -- 3 either have been incorporated
into Python, or they can be easily implemented with Python. Quite as
John Nagle said here. However, the Fascicles in Vol. 4 to my opinion
contain nontrivially
On Wed, May 16, 2012 at 6:45 PM, gwhite wrote:
> Hi,
>
> I am a newbie running the latest pythonxy (2.7.2.1) & spyder and
> python 2.7.2. I suspect my questions are mostly basic to python, and
> not specific to Spyder or iPython.
>
> Note: Up until now, I mainly used MATLAB, and thus need to de-
On 5/16/2012 9:45 PM, gwhite wrote:
Hi,
I am a newbie running the latest pythonxy (2.7.2.1)& spyder and
python 2.7.2. I suspect my questions are mostly basic to python, and
not specific to Spyder or iPython.
Note: Up until now, I mainly used MATLAB, and thus need to de-program
myself appropr
On 17/05/12 13:02, Mark R Rivet wrote:
It seems like all the info on tkinter is around the 2000 time frame.
Is tkinter still being developed/supported?
The main page of the python 3.2.3 documentation for tkinter can be found
here...
http://docs.python.org/py3k/library/tkinter.html?highlight=t
I have a copy of this book and was wondering how relevant the content
is considering the publish date is 2000. Are people still using this
information? Anyone have any experience with this book? I guess what I
mean, is, any of the code in this book deprecated? or does it still
contain information
On Sat, 12 May 2012 12:40:28 -0700 (PDT), Sverre
wrote:
>I searched for widgets used for PLC automation or lab instrumentation
>like gauges, led's etc. in the net, but didn't found anything because
>of those massive link spam sites. In the case there isn't any
>solution, with which toolkit would
On 5/16/2012 11:02 PM, Mark R Rivet wrote:
It seems like all the info on tkinter is around the 2000 time frame.
Is tkinter still being developed/supported?
tkinter is CPython's tk interface. tcl/tk is still being developed at
Active State. The Windows release for Py 3.3 will come with 8.5.11,
It seems like all the info on tkinter is around the 2000 time frame.
Is tkinter still being developed/supported?
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico wrote:
On Thu, May 17, 2012 at 9:01 AM, Ethan Furman wrote:
A record is an interesting critter -- it is given life either from the user
or from the disk-bound data; its fields can then change, but those changes
are not reflected on disk until .write_record() is called; I do thi
Hello,
I currently build a lot of interfaces/wrappers to other applications using
bash/shell. One short coming for it is it lacks a good method to handle
arguments so I switched to python a while ago to use 'argparse' module. Its
a great complement to subprocess module. I was wondering if there is
Hi,
I am a newbie running the latest pythonxy (2.7.2.1) & spyder and
python 2.7.2. I suspect my questions are mostly basic to python, and
not specific to Spyder or iPython.
Note: Up until now, I mainly used MATLAB, and thus need to de-program
myself appropriately.
I use Win7-64.
I wrote the f
On 17 May 2012 11:13, Chris Angelico wrote:
> On Thu, May 17, 2012 at 9:01 AM, Ethan Furman wrote:
> > A record is an interesting critter -- it is given life either from the
> user
> > or from the disk-bound data; its fields can then change, but those
> changes
> > are not reflected on disk unt
On Thu, May 17, 2012 at 9:01 AM, Ethan Furman wrote:
> A record is an interesting critter -- it is given life either from the user
> or from the disk-bound data; its fields can then change, but those changes
> are not reflected on disk until .write_record() is called; I do this
> because I am fr
On Wed, May 16, 2012 at 6:53 PM, Charles Hixson
wrote:
> Thanks. It looks like either would do what I need. Any suggestion as to
> how to choose between them? E.g., is AST better supported? faster? (I'm
> tending towards AST purely because it seems more tied to Python, but of
> course that *c
On Wed, 16 May 2012 17:48:19 +0200, Marco wrote:
> Hi all, because
>
> "There should be one-- and preferably only one --obvious way to do it",
>
> there should be a difference between the two methods in the subject, but
> I can't find it:
The Fine Manual has more detail, although I admit it isn
Tim Delaney wrote:
On 17 May 2012 07:33, Ethan Furman wrote:
Just hit a snag:
In cPython the deterministic garbage collection allows me a
particular optimization when retrieving records from a dbf file --
namely, by using weakrefs I can tell if the record is still in
memory and active, and if s
On Wed, May 16, 2012 at 4:53 PM, Charles Hixson
wrote:
> On 05/16/2012 03:11 PM, Ian Kelly wrote:
>>
>> On Wed, May 16, 2012 at 3:52 PM, Charles Hixson
>> wrote:
>>
>>>
>>> I want to persist simple dicts, but due to the security problems with
>>> (un)pickle, I'd prefer to not use shelve, and the
On 05/16/2012 03:11 PM, Ian Kelly wrote:
On Wed, May 16, 2012 at 3:52 PM, Charles Hixson
wrote:
I want to persist simple dicts, but due to the security problems with
(un)pickle, I'd prefer to not use shelve, and the only way I could see to
persist them onto sqlite also invoked pickle.
As
Ian Kelly wrote:
On Wed, May 16, 2012 at 3:33 PM, Ethan Furman wrote:
Just hit a snag:
In cPython the deterministic garbage collection allows me a particular
optimization when retrieving records from a dbf file -- namely, by using
weakrefs I can tell if the record is still in memory and active
There are many choices rather then raw python C API calls. Boost, PyCXX and
ctypes are worth investigating. PyCXX requires you code in C++ but hides lots
of the issues of using the Python API from you. It also supports python 2 and
3.
Barry - PyCXX maintainer
--
http://mail.python.org/mailma
On 17 May 2012 07:33, Ethan Furman wrote:
> Just hit a snag:
>
> In cPython the deterministic garbage collection allows me a particular
> optimization when retrieving records from a dbf file -- namely, by using
> weakrefs I can tell if the record is still in memory and active, and if so
> not hit
On Wed, May 16, 2012 at 3:52 PM, Charles Hixson
wrote:
> I want to persist simple dicts, but due to the security problems with
> (un)pickle, I'd prefer to not use shelve, and the only way I could see to
> persist them onto sqlite also invoked pickle.
>
> As (un)pickle allows arbitrary system comma
On Wed, May 16, 2012 at 3:33 PM, Ethan Furman wrote:
> Just hit a snag:
>
> In cPython the deterministic garbage collection allows me a particular
> optimization when retrieving records from a dbf file -- namely, by using
> weakrefs I can tell if the record is still in memory and active, and if so
I want to persist simple dicts, but due to the security problems with
(un)pickle, I'd prefer to not use shelve, and the only way I could see
to persist them onto sqlite also invoked pickle.
As (un)pickle allows arbitrary system commands to be issued, I'd really
rather just use a simple convert
On Wed, May 16, 2012 at 3:07 PM, Thomas 'PointedEars' Lahn
wrote:
> RTFM.
>
> $ python3 -c 'print("42".isdecimal.__doc__ + "\n");
> print("42".isdigit.__doc__)'
> S.isdecimal() -> bool
>
> Return True if there are only decimal characters in S,
> False otherwise.
>
> S.isdigit() -> bool
>
> Return
Just hit a snag:
In cPython the deterministic garbage collection allows me a particular
optimization when retrieving records from a dbf file -- namely, by using
weakrefs I can tell if the record is still in memory and active, and if
so not hit the disk to get the data; with PyPy (and probably
Marco wrote:
> Hi all, because
>
> "There should be one-- and preferably only one --obvious way to do it",
>
> there should be a difference between the two methods in the subject, but
> I can't find it:
>
> >>> '123'.isdecimal(), '123'.isdigit()
> (True, True)
> >>> print('\u0660123')
> ٠123
I recommend this book :- "beginning python from novice to professional"
On Wed, May 9, 2012 at 4:13 PM, Miki Tebeka wrote:
> > I am going to learn python for some plot issues. which book or sources,
> do you recommend please?
> The tutorial is pretty good if you already know how to program.
> I
On 16 mai, 17:48, Marco wrote:
> Hi all, because
>
> "There should be one-- and preferably only one --obvious way to do it",
>
> there should be a difference between the two methods in the subject, but
> I can't find it:
>
> >>> '123'.isdecimal(), '123'.isdigit()
> (True, True)
> >>> print('\u06
On 05/16/2012 06:24 PM, Ulrich Eckhardt wrote:
Marco wrote:
>>>> '123'.isdecimal(), '123'.isdigit()
> (True, True)
>>>> print('\u0660123')
> ٠123
>>>> '\u0660123'.isdigit(), '\u0660123'.isdecimal()
> (True, True)
>>>> print('\u216B')
> Ⅻ
>>>> '\u216B'.isdecimal(), '
On Wed, May 16, 2012 at 8:59 AM, ytj wrote:
> Hello, all:
>
> I have two programs, one is written in py3k, the other is written in
> python 2. I am wondering how to make them work together except port
> the python 2 code to py3k? Is that possible to expose python2's
> function to py3k? In other wo
On Wed, May 16, 2012 at 7:59 AM, ytj wrote:
> Hello, all:
>
> I have two programs, one is written in py3k, the other is written in
> python 2. I am wondering how to make them work together except port
> the python 2 code to py3k?
Porting the Python 3 code to Python 2 is also an option:
http://pyp
On Wed, May 16, 2012 at 10:24 AM, Ulrich Eckhardt wrote:
> Marco wrote:
>> >>> '123'.isdecimal(), '123'.isdigit()
>> (True, True)
>> >>> print('\u0660123')
>> ٠123
>> >>> '\u0660123'.isdigit(), '\u0660123'.isdecimal()
>> (True, True)
>> >>> print('\u216B')
>> Ⅻ
>> >>> '\u216B'.isdecimal(), '\
Marco wrote:
> >>> '123'.isdecimal(), '123'.isdigit()
> (True, True)
> >>> print('\u0660123')
> ٠123
> >>> '\u0660123'.isdigit(), '\u0660123'.isdecimal()
> (True, True)
> >>> print('\u216B')
> Ⅻ
> >>> '\u216B'.isdecimal(), '\u216B'.isdigit()
> (False, False)
[chr(a) for a in range(0x2) if
On 16/05/2012 16:48, Marco wrote:
Hi all, because
"There should be one-- and preferably only one --obvious way to do it",
there should be a difference between the two methods in the subject, but
I can't find it:
>>> '123'.isdecimal(), '123'.isdigit()
(True, True)
>>> print('\u0660123')
٠
On Wed, May 16, 2012 at 9:48 AM, Marco wrote:
> Hi all, because
>
> "There should be one-- and preferably only one --obvious way to do it",
>
> there should be a difference between the two methods in the subject, but I
> can't find it:
>
'123'.isdecimal(), '123'.isdigit()
> (True, True)
It's been a long time since I did any Python and I've never done that
In C I'm used to storing function ptrs and then having to use some other
constructs to call them.
To be able to store func and then use func to call itself like that threw
me...it's very elegant.
Thank you very much for your very
Hi all, because
"There should be one-- and preferably only one --obvious way to do it",
there should be a difference between the two methods in the subject, but
I can't find it:
>>> '123'.isdecimal(), '123'.isdigit()
(True, True)
>>> print('\u0660123')
٠123
>>> '\u0660123'.isdigit(), '\u06601
On Wed, May 16, 2012 at 8:08 AM, e-mail mgbg25171
wrote:
> def execute (code) :
> p = 0
> while p < len(code) :
> func = code[p]
> p += 1
> newP = func(code,p)
> if newP != None :
> p = newP
>
> I'm trying to work out what this does
>
> code
Hello, all:
I have two programs, one is written in py3k, the other is written in
python 2. I am wondering how to make them work together except port
the python 2 code to py3k? Is that possible to expose python2's
function to py3k? In other words, I want to embed the Python 2
interpreter into my py
Hi,
please don't top-post (I fixed the citation order below).
Nibin V M, 16.05.2012 16:30:
> On Wed, May 16, 2012 at 7:53 PM, Stefan Behnel wrote:
>> Nibin V M, 16.05.2012 16:16:
>>> I am trying to use cPanel XML-API and every API call return data in XML
>>> format. I would like to know how to m
thank you Stefan. but the XML output is assigned to a variable; how to
process the variable with XML contents?
On Wed, May 16, 2012 at 7:53 PM, Stefan Behnel wrote:
> Nibin V M, 16.05.2012 16:16:
> > I am trying to use cPanel XML-API and every API call return data in XML
> > format. I would like
Hi,
Wingware has released version 4.1.6 of Wing IDE, an integrated development
environment designed specifically for the Python programming language.
Wing IDE is a cross-platform Python IDE that provides a professional code
editor with vi, emacs, and other key bindings, auto-completion, call tip
Nibin V M, 16.05.2012 16:16:
> I am trying to use cPanel XML-API and every API call return data in XML
> format. I would like to know how to manipulate the data here.
>
> For eg: How can I read the CPU load data from the below output
>
>
>
> 0.000.000.00
Here's some untested code to print the
Hi,
I am trying to use cPanel XML-API and every API call return data in XML
format. I would like to know how to manipulate the data here.
For eg: How can I read the CPU load data from the below output
0.000.000.00
Thank you,
--
Regards
Nibin.
--
http://mail.python.org/mailman/listinfo/
def execute (code) :
p = 0
while p < len(code) :
func = code[p]
p += 1
newP = func(code,p)
if newP != None :
p = newP
I'm trying to work out what this does
code is a list of function addresses and numbers
What on earth is funct(code,p) doing
On Sun, May 13, 2012 at 2:29 PM, Alec Taylor wrote:
> There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2].
Ordered dict are useful, but they only remember the ordered in which
they were added, you can not order them a on key.
Thanks for the links.
>
> If you are looking for th
On 05/16/2012 05:20 AM, zayatzz wrote:
> On May 16, 11:50 am, Matej Cepl wrote:
>> On 16.5.2012 10:36, zayatzz wrote:
>>
>>> /opt/bin/python^M: bad interpreter: No such file or directory
>> Your script has CRLF end-of-lines. Change it to plain Unix LF.
>>
>> Matěj
> Thanks :) but i have no idea wh
On May 16, 11:50 am, Matej Cepl wrote:
> On 16.5.2012 10:36, zayatzz wrote:
>
> > /opt/bin/python^M: bad interpreter: No such file or directory
>
> Your script has CRLF end-of-lines. Change it to plain Unix LF.
>
> Matěj
Thanks :) but i have no idea what that means or how to achieve that.
Alan
-
On Wed, May 16, 2012 at 6:36 PM, zayatzz wrote:
> There is one problem though...
>
> when i start script with shebang like
> #!/opt/bin/python
>
> and then try to run the script i get:
>
> /opt/bin/python^M: bad interpreter: No such file or directory
You have a Windows end-of-line \r\n instead of
On 16.5.2012 10:36, zayatzz wrote:
/opt/bin/python^M: bad interpreter: No such file or directory
Your script has CRLF end-of-lines. Change it to plain Unix LF.
Matěj
--
http://mail.python.org/mailman/listinfo/python-list
zayatzz, 16.05.2012 10:22:
> On May 15, 7:42 pm, Miki Tebeka wrote:
>>> Can someone point me towards a resource or two which will tell me how
>>> to do this - im not very good with whole linux/servers stuff. Im using
>>> ubuntu linux - if that makes any difference.
>>
>> Did not test, but this is t
There is one problem though...
when i start script with shebang like
#!/opt/bin/python
and then try to run the script i get:
/opt/bin/python^M: bad interpreter: No such file or directory
/opt/bin/python
/opt/bin/python2
/opt/bin/python2.7 all start this new version of python, but none of
those
On May 15, 7:42 pm, Miki Tebeka wrote:
> > Can someone point me towards a resource or two which will tell me how
> > to do this - im not very good with whole linux/servers stuff. Im using
> > ubuntu linux - if that makes any difference.
>
> Did not test, but this is the direction I would take:
> *
ANNOUNCING
eGenix.com pyOpenSSL Distribution
Version 0.13.0-1.0.0j
An easy-to-install and easy-to-use distribution
of the pyOpenSSL Python interface for
57 matches
Mail list logo