rustom writes:
> Im trying to write a program that has su permissions for some file
> system tasks and is non-su elsewhere.
On Unix, ‘su’ is a program for switching to a different user; it's not
the name of a particular user. I presume you mean “ … that has root
permissions for tome file system
Hi,
Following SQL assaignment is not working in Program.
intable_bookname=SELECT book_name FROM table_book WHERE book_name='name';
where as this works perfectly fine with psql interface
Pls help me on this
Thanks a lot in advance
Bijoy
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 29, 11:16 pm, Chris Rebert wrote:
> 2009/3/29 Scott David Daniels :
>
> > mark.sea...@gmail.com wrote:
>
> >> On Mar 29, 9:52 pm, Chris Rebert wrote:
>
> >>> On Sun, Mar 29, 2009 at 9:18 PM, wrote:
>
> ...
>
> >>> ... Also, you shouldn't use `class_ ` as the name of the first argume
Alan G Isaac wrote:
[snip]
> PS If you were also offering an answer to the second question,
> I missed it altogether, but although it is perhaps slightly
> less obvious than with a StringVar, I would ask the same
> basic question of an IntVar: why does it not behave more
> like an int? E.g., why i
Most such problems are caused by mixing tabs and spaces in the same
file. Pick one style and be consistent, and you'll be in good shape.
My approach is to always expand tabs. My tab key simply gets me to a
convenient column, there never are any tabs in my source files.
(I don't use either n
"Steven D'Aprano" wrote:
>Oh noes!!! Python will be just like nearly every other language!!!
>
>Including Python. There are already at least thirteen implementations
>(forks) of Python (although some of these are defunct or unmaintained):
>
>CPython
>Jython
>IronPython
>Python for .NET
>CLPytho
The following *extremely* simple script complains that "Socket is not
connected" when I try to call recv. Could anyone provide some quick
guidance?
http://pastebin.com/m64317b32
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I'm writing in Python for about 2 weeks (moved from Perl)
I've ported one of my modules which is a parser for a binary format (see
link bellow for the format specs)
http://etidweb.tamu.edu/cdrom0/image/stdf/spec.pdf
In the first version of the parser I was reading exactly the amount of d
Alan G Isaac wrote:
> I'm a complete newbie to GUI.
> I have a couple questions about tkinter.
>
> 1. Where is the list of changes
> in Python 3's tkinter?
I'll let someone else answer this as I don't use Python 3 myself. I guess
there are not many.
> 2. What exactly is the role of the root o
Hi Aaron
I personally don't understand how somedict.values().to_list() is
actually preferable to
list(somedict.keys())
In the standard python idiom I am constructing a new object (which I
can control the type of) using a standard language mechanism (and I
can substitute list with set or for that
Hi,
*code:* (only the class definiton and Database connection part)
import pg
__metaclass__=type
class addbook:
conn=pg.connect('secondbooks.db')
curs=conn.cursor()
*error:*
conn=pg.connect("secondbooks.db")
pg.InternalError: FATAL: database "secondbooks.db" does not exist
"Hendrik van Rooyen" writes:
> Its kind of sad to see unladen swallow, which is just
> a promise, on the list, while Shedskin, which isn't,
> is ignored.
>
> Does this say something about big corporations
> vs the small man?
I think the programs on the list were supposed to actually implement
P
Hi,
I have figured this out.
Pls excuse me.
thanks a lot
Bijoy
On Mon, Mar 30, 2009 at 12:41 PM, bijoy wrote:
> Hi,
>
> Following SQL assaignment is not working in Program.
>
> intable_bookname=SELECT book_name FROM table_book WHERE book_name='name';
>
> where as this works perfectly fine wi
Aahz wrote:
> I find the trick of using a Python list to store the doubly-linked
> list difficult to understand (as opposed to the usual mechanism of a
> node class). I understand why it was done (time and space
> efficiency), but I also still feel emotionally that it's somewhat
> sick and perver
mark.sea...@gmail.com writes:
> So I want a class ShadowRegister, which just has a value that I can
> do get/set bit sel and slice ops. I got that working with __init__.
> It was subclass from "object". Then I wanted a RegisterClass that
> was a subclass of ShadowRegister, which would read a har
mark.sea...@gmail.com wrote:
Python 2.5.3 for business reasons.
So I want a class ShadowRegister, which just has a value that I can do
get/set bit sel and slice ops. I got that working with __init__. It
was subclass from "object". Then I wanted a RegisterClass that was a
subclass of ShadowRe
Ben Finney wrote
> The key thing to realise is that, having relinquished privilege, the same
> process can't get it back again as easily. So if you need to
> do some tasks as a privileged user, do those *very* early and then drop the
> privileges for the rest of the life of the process.
>
> Takin
try
s=smtplib.SMTP('127.0.0.1')
instead. I'm guessing that it's trying to bind to the IPv6 or some other
non IPv4 localhost instance.
On Wed, Mar 18, 2009 at 11:25 AM, cassiope wrote:
> A hard drive failure forced me to rebuild my main system. Just a few
> things haven't been restored; one o
Hi All,
I had the following bit of code which was working fine until we went
into Daylight saving this weekend, now the result is an hour out.
timeString = "20090330 15:45:23"
timeFormat = '%Y-%m-%d %H:%M:%S'
modificationTime = datetime.datetime.utcfromti
On Mar 30, 1:47 pm, CinnamonDonkey
wrote:
> Hi All,
>
> I had the following bit of code which was working fine until we went
> into Daylight saving this weekend, now the result is an hour out.
>
> timeString = "20090330 15:45:23"
>
>
te_ = datetime.utcfromtimestamp(epoch)
return date_.strftime(format)
andrew
CinnamonDonkey wrote:
> Hi All,
>
> I had the following bit of code which was working fine until we went
> into Daylight saving this weekend, now the result is an hour out.
>
> timeStr
On Mon, Mar 30, 2009 at 5:17 PM, andrew cooke wrote:
> Rustom Mody wrote:
>> Ben Finney wrote
>>> The key thing to realise is that, having relinquished privilege, the
>>> same process can't get it back again as easily. So if you need to
>>> do some tasks as a privileged user, do those *very* early
Hi there,
I would like users of my web application to be able to download a backup
file of a database (using* *MySQL's *mysqldump* command).
My strategy is to use *zipfile* to create a zip file object (with the *
mysqldump* output as the contents of the zipped file) and then use *
sys.stdout* to
W. eWatson wrote:
It looks like PyFits downloads are for Linux. Isn't there anything
available for Win (xp)?
I'm now on the scipy mail list. Things look hopeful, according to the first
respondent, to meet my criteria mentioned in another sub-thread to this one:
"I'm hoping the use of this libra
Rustom Mody wrote:
> Ben Finney wrote
>> The key thing to realise is that, having relinquished privilege, the
>> same process can't get it back again as easily. So if you need to
>> do some tasks as a privileged user, do those *very* early and then drop
>> the privileges for the rest of the life of
Hello Everybody,
I would like to use a C++ gui library with the following (simplified)
interface in Python.
#include
class Gui;
class GuiObject {
public:
GuiObject(Gui *Gui) {printf("creating GuiObject(gui: %X)\n", Gui);}
~GuiObject() {printf("deleting GuiObject\n");}
v
On 3/30/2009 3:37 AM Eric Brunel apparently wrote:
The object traditionally called root is in fact an instance of the tcl
interpreter that will get the commands generated by the Tkinter module. Due to
tk architecture, creating this interpreter will also create a window, which is
inteneded to be y
On Mar 26, 1:38 pm, John Machin wrote:
> On Mar 26, 2:06 pm, Coonay wrote:
>
> > see,the zipimort takes nearly 0.5 second
>
> > D 03-25 07:53PM 21.374
> > Loading __main__
> > I 03-25 07:53PM 21.455
> > zipimporter('/base/data/home/apps/coonay/1.332322118600950324/
> > django.zip', '')
>
> ?? zip
ing fine until we went
> > into Daylight saving this weekend, now the result is an hour out.
>
> > timeString = "20090330 15:45:23"
>
> > timeFormat = '%Y-%m-%d %H:%M:%S'
>
> > modificationTime = datetime.datetime.utcfromtime
Nick Craig-Wood wrote:
I read Programming Python as an experienced programmer and like you I
enjoyed the encyclopedic nature of it. So if it appeals to you I'd
say go for it!
The fact that it doesn't use the latest version of python isn't a
problem - python doesn't change very quickly and emph
The outline of what I do (in C) is:
1. Write the CGI program in C, put setuid(0), setgid(0) statements in
that file and then perform any other actions (including calling other
scripts)
2. Set the S bit of the executable of the CGI binary compiled from the
C file (chmod +S xxx.cgi)
The C code runs
de which was working fine until we went
into Daylight saving this weekend, now the result is an hour out.
timeString = "20090330 15:45:23"
timeFormat = '%Y-%m-%d %H:%M:%S'
modificationTime = datetime.datetime.utcfromtimestamp( time.mktime
( time.strptime( time
0 Mar, 13:08, Chris wrote:
>
> > On Mar 30, 1:47 pm, CinnamonDonkey
> > wrote:
>
> > > Hi All,
>
> > > I had the following bit of code which was working fine until we went
> > > into Daylight saving this weekend, now the result is an hour
On 3/30/2009 3:37 AM Eric Brunel apparently wrote:
The string representation of Tkinter objects seems to be a design principle in
this module: it'll always evaluate to the representation this object has at
tcl level. Since a XxxVar is represented by an actual variable at tcl level,
its string rep
Hi guys ,
I am facing problems running python25 on vista . i was able to
successfully install it but when i try to run it then,
its throws errors saying Firewall issues ..
I tried disabling the firewall but no go..
Thanks in advance!!
--
http://mail.python.org/mailman/listinfo/python-list
hi,
I figured out these too.
Pls excuse me
Thanks
Bijoy
On Mon, Mar 30, 2009 at 1:30 PM, bijoy wrote:
> Hi,
>
> *code:* (only the class definiton and Database connection part)
>
> import pg
>
> __metaclass__=type
>
> class addbook:
>
> conn=pg.connect('secondbooks.db')
> curs
I had the following bit of code which was working fine until we went
> > into Daylight saving this weekend, now the result is an hour out.
>
> > timeString = "20090330 15:45:23"
>
> > timeFormat = '%Y-%m-%d %H:%M:%S'
>
>
Elementtree solved the problem! I am very impressed with the speed you
get from the cElementTree library. Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Find the .wingide folder in your home and tar it, at least in linux...
On Sat, Mar 28, 2009 at 12:26 PM, John Doe wrote:
>
> Anyone know how to back up the configuration settings like font sizes
> and colors in the Wing IDE? Thanks.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Since the email contains no code, I can only assume you're using the
bult-in open() call, and file.read(). If you didn't specify a bufsize,
a "system default" is used. I seriously doubt if 0 is the default.
Since it's already buffered, additional buffering by you might have
little effect, o
> > Its kind of sad to see unladen swallow, which is just
> > a promise, on the list, whileShedskin, which isn't,
> > is ignored.
>
> > Does this say something about big corporations
> > vs the small man?
>
> I think the programs on the list were supposed to actually implement
> Python and extensi
I've written a short post on including support for configuration down
at the language level, including a small preliminary half-functional
example of what this might look like in Python, available at
http://jasonfager.com/?p=440.
The basic idea is that a language could offer syntactic support for
On Mar 30, 1:16 pm, Rustom Mody wrote:
> Ben Finney wrote
>
> > The key thing to realise is that, having relinquished privilege, the same
> > process can't get it back again as easily. So if you need to
> > do some tasks as a privileged user, do those *very* early and then drop the
> > privilege
On Mon, 30 Mar 2009 13:30:18 +0530
bijoy wrote:
> conn=pg.connect("secondbooks.db")
> pg.InternalError: FATAL: database "secondbooks.db" does not exist
> In fact i have a database called secondboo
On Mar 30, 2:30 am, Jan Decaluwe wrote:
> mark.sea...@gmail.com wrote:
> > Python 2.5.3 for business reasons.
>
> > So I want a class ShadowRegister, which just has a value that I can do
> > get/set bit sel and slice ops. I got that working with __init__. It
> > was subclass from "object". Then
Daylight saving this weekend, now the result is an hour out.
timeString =20090330 15:45:23"
timeFormat =%Y-%m-%d %H:%M:%S'
modificationTime =atetime.datetime.utcfromtimestamp( time.mktime
( time.strptime( timeString, timeFormat ) ) )
minutesToAdvance =ateti
It needs to read HW reg and adjust ChipRegister value, or
ShadowRegister and change the HW value (order was reversed). I will
look at MyHDL again though to see if there is some reason it can print
class subclassed from intbv, or if it even has a class subclassed from
intbv, without casting as a l
On Mar 30, 3:31 pm, srepmub wrote:
> for the record, the input for Shedskin is pure Python, so there is no
> added syntax or optional type declaration system. that said, I can
> understand it not being on some list for not being production-ready.
>
> thanks,
> mark dufour.
But does ShedSkin accep
Alan G Isaac wrote:
[snip]
> On 3/30/2009 3:37 AM Eric Brunel apparently wrote:
>> The Tk instance is registered in a hidden variable in the Tkinter module.
When
>> you don't specify a master, it'll use the latest created Tk instance one by
>> default. BTW, the latest should be the only one: it is
Hi All,
I've been scratching my head all afternoon trying to work out the best/
quickest way is to delete empty directories within a tree (Windows).
I've looked at os.walk() but it seems to traverse the directory tree
in the wrong order (is it possible to reverse the order?)
It seems the only wa
On Mon, 30 Mar 2009 09:46:40 +0200, Hendrik van Rooyen wrote:
> Its kind of sad to see unladen swallow, which is just a promise, on the
> list, while Shedskin, which isn't, is ignored.
>
> Does this say something about big corporations vs the small man?
No, what it says is that I had just read a
On Mar 28, 11:07 am, Aaron Brady wrote:
> Hi,
>
> A week ago, I posted a question and an idea about Python's garbage
> collector. I got a few replies. Some days later, I posted a mock-up
> implementation of it, and got *NO* replies. Does this mean:
>
> a) It works
> b) It doesn't work
> c) It's
CinnamonDonkey wrote:
Hi All,
I've been scratching my head all afternoon trying to work out the best/
quickest way is to delete empty directories within a tree (Windows).
I've looked at os.walk() but it seems to traverse the directory tree
in the wrong order (is it possible to reverse the order
Steven D'Aprano wrote:
On Mon, 30 Mar 2009 09:46:40 +0200, Hendrik van Rooyen wrote:
Its kind of sad to see unladen swallow, which is just a promise, on the
list, while Shedskin, which isn't, is ignored.
Does this say something about big corporations vs the small man?
No, what it says is tha
Hi all,
urllib2 correctly detects proxies as configured in my preferences pane
on OS X 10.5:
Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> urllib2.ProxyHa
I am trying to create a log level called userinfo for the python
logging. I read the source code and tried to register the level to the
logging namespace with the following source:
from logging import Logger
# create the custom log level
CinnamonDonkey wrote:
> Hi All,
>
> I've been scratching my head all afternoon trying to work out the best/
> quickest way is to delete empty directories within a tree (Windows).
>
> I've looked at os.walk() but it seems to traverse the directory tree
> in the wrong order (is it possible to reverse
Hi,
I'm work on a testing framework for Python. Until now I have
implemented the main features of PyUnit and JUnit 4.x. I like the
annotation syntax of JUnit 4.x and it's theory concept is great
therefore you can imagine how my framework will be.
I plan a lot of additionally features which are n
My understanding was that rmtree removes a whole tree not just the
empty directories?
eg.
root
- file1
- file2
- dir1
- dir2
- file3
- dir3
I would expect; dir1 and dir3 to be deleted and nothing else touched.
My attempt came up with:
import os
import shutil
def isDirEmpty( path ):
Revised:
root
+ Dir1
+ Dir2
+ Dir3
+ NotEmptyDir
File1
File2
Result:
Root
+ NotEmptyDir
File1
File2
---
import os
import shutil
def isDirEmpty( path ):
if not os.path.isdir( path ):
return False
contents = os.listdir( path )
i
On Mon, 30 Mar 2009 06:40:00 -0700, jfager wrote:
> I've written a short post on including support for configuration down at
> the language level, including a small preliminary half-functional
> example of what this might look like in Python, available at
> http://jasonfager.com/?p=440.
>
> The b
On Mar 27, 11:29 am, a...@pythoncraft.com (Aahz) wrote:
> [posted & e-mailed, please respond to newsgroup]
>
> In article ,
>
>
>
> cassiope wrote:
>
> >In attempting to diagnose the cause, I tried directly executing the
> >lines inside the python2.5 interpreter:
>
> > import smtplib
> >
Hi,
Here my problem description:
Given the following class:
class Node(object):
def __init__(self, name, children=[], parent=None):
self.name = name
self.level = ''
self.children = children
self.parent = parent
def __repr__(self):
name = self.__cl
Hi,
This is just a reminder that we have a Pyowa meeting this week. It
will be held at Durham Center in Ames, IA on the ISU campus from 7-9
p.m. Directions are on the website (www.pyowa.org). Topics include the
following:
1) What PyCon attendees thought of PyCon (likes, dislikes, etc)
2) Code sni
On Mon, 30 Mar 2009 08:14:55 -0700, CinnamonDonkey wrote:
> My understanding was that rmtree removes a whole tree not just the empty
> directories?
So it seems:
>>> os.mkdir('die-die-die')
>>> os.mkdir('die-die-die/stuff')
>>> shutil.rmtree('die-die-die')
>>>
On Mar 30, 10:33 am, Mike Driscoll wrote:
> Hi,
>
> This is just a reminder that we have a Pyowa meeting this week. It
> will be held at Durham Center in Ames, IA on the ISU campus from 7-9
> p.m. Directions are on the website (www.pyowa.org). Topics include the
> following:
>
> 1) What PyCon atte
I'm trying to compile the wrappers for ANN (Approximate Nearest Neighbor) from
http://scipy.org/scipy/scikits/wiki/AnnWrapper, either the main one (scikits) or
the attachment in the main page.
However, the command "python setup.py build" produces the exception:
"ImportError: No module named nu
On Mon, 30 Mar 2009 07:50:49 -0700, pruebauno wrote:
> I myself asked about how to write a library to efficiently do union and
> intersection of sets containing time intervals some time ago on this
> list and got little to no answers. It is a tricky problem.
With all the confidence of somebody w
On Mar 30, 11:17 am, Steven D'Aprano wrote:
> On Mon, 30 Mar 2009 06:40:00 -0700, jfager wrote:
> > I've written a short post on including support for configuration down at
> > the language level, including a small preliminary half-functional
> > example of what this might look like in Python, ava
Here again is example:
from ctypes import *
class REG_INFO(Structure):
_fields_ = [
('address', c_ubyte),
('message', c_char * 256),
('size', c_ubyte)
]
class myclass(object):
#
# def __new__(class_, init_val, size, reg_info):
def __init__(self, init_
Hi,
I am trying to call an unbound method (Map.Background) but getting the
following error:
TypeError: unbound method background() must be called with Map instance as
first argument (got nothing instead)
Here is some of the code(not completed)
Thanks in Advance
- Zach
Code:
class Knight(g
On Mar 3, 4:01 am, Graham Dumpleton
wrote:
> On Mar 3, 8:53 am, Rey Bango wrote:
>
> > Hi,
>
> > I'd like to upgrade the installed version of Python that came standard
> > on OS X (Leopard) with either 2.6.1 or 3.0.1. Before I stick my foot
> > in it, I just wanted to get a better understanding o
Alia Khouri yahoo.com> writes:
> Given the following class:
>
> class Node(object):
> def __init__(self, name, children=[], parent=None):
> self.name = name
> self.level = ''
> self.children = children
> self.parent = parent
>
> def __repr__(self):
>
2009/3/30 Zach Goscha :
> Hi,
>
> I am trying to call an unbound method (Map.Background) but getting the
> following error:
> TypeError: unbound method background() must be called with Map instance as
> first argument (got nothing instead)
>
> Here is some of the code(not completed)
>
> Thanks in
Adrian Dziubek wrote:
> Could you explain your high level goal for this? It looks like a very
> wicked way of doing things. Have You tried to read the list methods'
> documentation? Maybe there you find something you need (like
> list.index)?
Hello,
I have a "disambiguation" function that modifi
Eric Brunel said:
>> The Tk instance is registered in a hidden variable in the
>> Tkinter module. When
>> you don't specify a master, it'll use the latest created Tk
>> instance one by
>> default. BTW, the latest should be the only one: it is
>> quite unsafe to create
>> several Tk insta
mark.sea...@gmail.com wrote:
Here again is example:
from ctypes import *
class REG_INFO(Structure):
_fields_ = [
('address', c_ubyte),
('message', c_char * 256),
('size', c_ubyte)
]
class myclass(object):
#
# def __new__(class_, init_val, size, reg_info
On Mon, 2009-03-30 at 11:05 -0500, Zach Goscha wrote:
> Hi,
>
> I am trying to call an unbound method (Map.Background) but getting the
> following error:
> TypeError: unbound method background() must be called with Map
> instance as first argument (got nothing instead)
>
> Here is some of the
On Mon, 30 Mar 2009 03:30:04 -0500
Nick Craig-Wood wrote:
> >>> class Node(object):
> ... __slots__ = ["prev", "next", "this"]
> ... def __init__(self, prev, next, this):
> ... self.prev = prev
> ... self.next = next
> ... self.this = this
[...]
> So the Node cla
On Mar 30, 6:47 pm, bieff...@gmail.com wrote:
> On Mar 30, 1:16 pm, Rustom Mody wrote:
>
>
>
> > Ben Finney wrote
>
> > > The key thing to realise is that, having relinquished privilege, the same
> > > process can't get it back again as easily. So if you need to
> > > do some tasks as a privilege
mark.sea...@gmail.com wrote:
...
It seems like there's no way to do what I'm trying. I am confined to
Python 2.5.3 for business reasons.
So I want a class ShadowRegister, which just has a value that I can do
get/set bit sel and slice ops. I got that working with __init__. It
was subclass from
Rustom Mody wrote:
I don't think this is necessary a python problem but a generic, SUID
scripts considered dangerous, problem.
The essence of your program is that you only want information, that is
great! Since that makes it all a bit simpler.
How about writing a cronjob that outputs the re
ryan wrote:
I am facing problems running python25 on vista . i was able to
successfully install it but when i try to run it then,
its throws errors saying Firewall issues ..
I tried disabling the firewall but no go..
Yes, we believe you. Read "smart questions"
http://www.catb.org/~esr/fa
prakash jp gmail.com> writes:
> Hi all,
>
> In windows environment, how to send email from one gmail address to another
gmail (or another mail) addrress
>
>
Gmail requires SSL smtp support which is missing in Python stdlib. However, you
can look at this example (http://www.example-code.com/p
IDLE (3.1a1) accepts
a,*b = re.split(str,pattern)
and does the right thing ('a' gets the first result and 'b' gets
the rest).
pydev configured to use the exact same Python 3.1a1 runtime doesn't
like this syntax (in my source, column 23 is the asterisk):
Encountered "*" at line 32, colu
mark.sea...@gmail.com writes:
> class myclass(object):
> #
> # def __new__(class_, init_val, size, reg_info):
> def __init__(self, init_val, size, reg_info):
>
> # self = object.__new__(class_)
> self.reg_info = reg_info
> print self.reg_info.message
> self.
On Mar 30, 9:40 am, Scott David Daniels wrote:
> mark.sea...@gmail.com wrote:
> > ...
> > It seems like there's no way to do what I'm trying. I am confined to
> > Python 2.5.3 for business reasons.
>
> > So I want a class ShadowRegister, which just has a value that I can do
> > get/set bit sel an
On Mar 30, 10:53 am, David Bolen wrote:
> mark.sea...@gmail.com writes:
> > class myclass(object):
> > #
> > # def __new__(class_, init_val, size, reg_info):
> > def __init__(self, init_val, size, reg_info):
>
> > # self = object.__new__(class_)
> > self.reg_info = reg_info
On Sat, Mar 28, 2009 at 1:17 AM, Mark Hammond wrote:
>> Please note: I want to build my own code in Debug mode for debugging.
>> I don't want to build or use the debug version of Python. I also can't
>
> Python does this on purpose so you don't accidentally mix different versions
> of the C runtim
On Mar 30, 12:40 pm, Jim Garrison wrote:
> IDLE (3.1a1) accepts
>
> a,*b = re.split(str,pattern)
>
> and does the right thing ('a' gets the first result and 'b' gets
> the rest).
>
> pydev configured to use the exact same Python 3.1a1 runtime doesn't
> like this syntax (in my source, colum
If I cast it long then it prints fine, but I was hoping there would be
a slicker way (to accomplish this in the class itself).
print 'bird val = 0x%016X' % long(bird)
--
http://mail.python.org/mailman/listinfo/python-list
Jim Garrison wrote:
IDLE (3.1a1) accepts
a,*b = re.split(str,pattern)
and does the right thing ('a' gets the first result and 'b' gets
the rest).
pydev configured to use the exact same Python 3.1a1 runtime doesn't
like this syntax (in my source, column 23 is the asterisk):
Encountered "*"
After taking out the class myclass stuff, the code worked for me in
Python 2.6.1, through the cat line. Could you please tell us what
version of Python you're running this on?
import sys
print "Python version: ", sys.version
yielded (on my machine)
Python version: 2.6.1 (r261:67517, Dec 4
Johan Compen wrote:
> If Python doesn't include the _d.lib file, then why does the header
> file reference it? I would prefer manual control over which lib file
> to use. (And I don't want to disable _DEBUG for other reasons).
>
> Could the header file be changed so it alwas uses the release lib?
On Mar 30, 11:53 am, Dave Angel wrote:
> After taking out the class myclass stuff, the code worked for me in
> Python 2.6.1, through the cat line. Could you please tell us what
> version of Python you're running this on?
>
> import sys
> print "Python version: ", sys.version
>
> yielded (on my m
On Mon, Mar 30, 2009 at 2:23 PM, Jim Garrison wrote:
> Jim Garrison wrote:
>
>> IDLE (3.1a1) accepts
>>
>>a,*b = re.split(str,pattern)
>>
>> and does the right thing ('a' gets the first result and 'b' gets
>> the rest).
>>
>> pydev configured to use the exact same Python 3.1a1 runtime doesn't
On Mar 30, 12:01 pm, mark.sea...@gmail.com wrote:
> On Mar 30, 11:53 am, Dave Angel wrote:
>
> > After taking out the class myclass stuff, the code worked for me in
> > Python 2.6.1, through the cat line. Could you please tell us what
> > version of Python you're running this on?
>
> > import sy
Thanks Gabriel. Your solution works like a charm. (-:
AK
--
http://mail.python.org/mailman/listinfo/python-list
>>> IDLE (3.1a1) accepts
>>>
>>> a,*b = re.split(str,pattern)
>>>
>>> and does the right thing ('a' gets the first result and 'b' gets
>>> the rest).
>>>
>>> pydev configured to use the exact same Python 3.1a1 runtime doesn't
>>> like this syntax (in my source, column 23 is the asterisk):
>>>
>>
> Most such problems are caused by mixing tabs and spaces in the same file.
> Pick one style and be consistent, and you'll be in good shape.
>
> My approach is to always expand tabs. My tab key simply gets me to a
> convenient column, there never are any tabs in my source files.
>
> (I don't use
1 - 100 of 156 matches
Mail list logo