python is a python

2009-01-30 Thread x
python is a python



--
http://mail.python.org/mailman/listinfo/python-list


xpn

2018-01-03 Thread x@x.x
need to fix those quirks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: do ya still use python?

2021-04-20 Thread X Guest
we are in ML industry where python is used widely.

On Tue, Apr 20, 2021, at 8:53 AM, Jon Ribbens via Python-list wrote:
> On 2021-04-20, Paul Rubin  > wrote:
> > Ethan Furman mailto:ethan%40stoneleaf.us>> writes:
> >> List, my apologies -- not sure how that one got through.
> >
> > It was trollishly written but was a reasonable observation on the state
> > of the Usenet group.  I didn't realize it had come through (or reached)
> > the mailing list.  Anyway the state of affairs for us Usenet die-hards
> > isn't so great.
> 
> Why do you say that? The group seems quite lively to me
> (and no I'm not counting spam etc).
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

--
  https://xguest.net/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ANNOUNCE: Altova ... blah blah blah

2005-01-24 Thread X-Man
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
remove-this-xs4all.nl says...
> Altova Announcements wrote:
> > Altova Unveils .
> [spam]
> 
> Well now, I didn't like their products very much already,
> but this spam has certainly made them drop another few
> steps down on my scale. Hmpf.
> 
> --Irmen
> 

Yes. I find Altova's work to be high-quality but narrow-minded and 
arrogant. 

An example: Though all of the marketing material for StyleVision extols 
its usefulness for arbitrary, free-standing forms and reports, the only 
HTML or PDF one can actually generate is restricted to a frustrating 
subset which Altova has decided is useful -- and "useful" to them means 
"already supported by the Altova Authentic front end".
 
-- 
http://mail.python.org/mailman/listinfo/python-list


two embedded problem. one maybe is python bug.

2006-08-03 Thread yy x
hi,all,
 
 
 
the content of a.py :
#coding:gb2312#/usr/local/bin/pythonimport randomprint random.randint(0,10)
 
the c program:

#include int main(){    Py_Initialize();    PyRun_SimpleString("import sys");    PyRun_SimpleString("sys.path.append('.')");
    PyRun_SimpleString("import a");    Py_Finalize();
    return 0;}
the gcc cmd line:
   g++ -o a a.c -I/usr/local/include/python /usr/local/lib/libpython -lm -lpthread -ldl
First problem:
    when i run the a, the error msg is :
  Traceback (most recent call last):  File "", line 1, in ?  File "./a.py", line 1SyntaxError: encoding problem: with BOM
 
but if i first import a.py through the python cmd line.  This problem disappears.(but second problem appears)(now  I think  the a import a.pyc not a.py)
I think  it's python bug, isn't it?
Second problem,
   Traceback (most recent call last):  File "", line 1, in ?  File "a.py", line 3, in ?    import random  File "/usr/local/lib/python2.4/random.py", line 44, in ?
    from math import log as _log, exp as _exp, pi as _pi, e as _eImportError: /usr/local/lib/python2.4/lib-dynload/math.so: undefined symbol: PyExc_OverflowError.
 
Pls give me some advice, i am crazy.thanks
 
 
 
 
 
 
 
 
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: HOST - dreamhost.com / Liberality (Hosting, Basic Requirement)

2006-06-05 Thread Tim X
Joachim Durchholz <[EMAIL PROTECTED]> writes:

> Ilias Lazaridis schrieb:
>> crossposted to 5 groups, which are affected by this case.
>> followup not applicable.
>
> Actually, in this case, yes.
>
>> It _seems_ that Mr. Xah Les's account was terminated by dreamhost.com
>> because of
>> a) the inability of several people to detect the interconnections
>> within writings which lead to perfectly valid cross-posts within the
>> usenet.
>
> Actually, his posts are mostly off-topic.
>
>> b) the non-liberal and essentially non-professional way of how
>> dreamhost.com deals with abuse complaints.
>
> Unless you give some concrete facts, this is simply slander.
> URLs don't count.
>
>> To dreamhost.com:
>> You should install an autoresponder to your abuse email, which
>> reminds
>> people that it is
>> * nearly inpossible to rate the content posted to usenet
>> * neally inpossible to detect validity of cross-posts
>>   especially within complex analytical/philosophical writings
>> * other important facts
>
> Why are you wasting our mental bandwidth with that?
> Besides, it's utter nonsense. There's an infinity of invalid reasons,
> so you can't rule them out with an autoresponder.
>
>> People can then decide if they still wish to send the abuse complain
>> (e.g. can follow a link within the autoresponder).
>
> Nope. Finding out the provider is enough of a barrier. Additional
> barriers are not really necessary.
> Xah Lee has been irritating people for months.
>
> I do share your concerns. Complaint handling often is unprofessional.
> However, in Xah Lee's case, he's indeed been irritating too many
> people for a too long time that *some* sanction is in fact
> appropriate.
> I routinely kill his threads, but I'm reading a specific newsgroup for
> a purpose, and Xah Lee requires me to kill his. He's essentially doing
> semantic spam - analytical and philosophical writings may be well and
> fine, but they aren't appropriate on the newsgroups that I frequent
> (or only in very specific ways that Xah Lee doesn't address).
>
>> To anyone:
>> Any form of censorship and "suppression of freedom of expression"
>> should be kept out of from open-source projects and from usenet.
>> It is the within the responsibility of every entity (including
>> commercial companies) to act against it.
>> http://dev.lazaridis.com/base/wiki/LiberalProjectDefinition
>
> There are many important goals. Free speech is indeed very high on the
> list. On the other hand, I'm pretty sure that Xah Lee will find
> another provider.

I think the other point here is that everyone *assumes* Xah's account
was cancelled simply because of a campaign to report him for spamming
multiple newsgroups. I suspect there were other factors involved. for
all anyone knows, the provider might have been getting complaints from
people about Xah's account, website, e-mail and newsgorup posting for
ages and just decided it was more trouble than it was worth to keep
him as a customer. 

Personally, I didn't report Xah to his provider, but I do believe he
was a troll (which he himself admits) and which is confirmed by the
fact he never hangs around to defend or debate his posts which seem
more often than not deliberately designed to start a flamewar. 

Bottom line is everyone seems to have just accepted Xah's claims and
now we have lots of outraged netters screaming about free speech.
Given Xah's desire to provoke emotion etc, its even possible Xah
created this whole thing just for entertainment!

On usernet, I think the secret is "believe nothing, question
everything" and remember, on the net, nobody knows your a dog!


-- 
tcross (at) rapttech dot com dot au
-- 
http://mail.python.org/mailman/listinfo/python-list


Apologies for cross post [was Re: HOST - dreamhost.com / Liberality (Hosting, Basic Requirement)]

2006-06-05 Thread Tim X

My apologies for not trimming the long list of crossposted groups. I
hit 'y' when thinking 'n'! 

Tim
-- 
tcross (at) rapttech dot com dot au
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Reddit broke - should have remained on Lisp?

2006-06-29 Thread Tim X
"Luis M. González" <[EMAIL PROTECTED]> writes:

> Alok wrote:
>> While posting a comment on http://www.reddit.com I got an error page
>> with the following curious statement on it.
>>
>> "reddit broke (sorry)"
>> "looks like we shouldn't have stopped using lisp..."
>>
>> See screenshot at
>> http://photos1.blogger.com/blogger/1773/1980/1600/reddit-broke.jpg
>>
>> Whether they truly repent not using lisp or otherwise, their site
>> appears to be 3 times slower ...
>>
>> Alok
>
>
> I don't know if this is true or not, but blaming a language for a poor
> development is a little bit ridiculous...
>
Although I'd like to agree with you and the principal is sound,
unfortunately it does not always hold in the real world. In the years
I've been programming, there have certainly been situations in which a
poorly implemented or poorly designed language has made developing
reliable software near impossible.

Admittedly this is not as common as it was in the 80s when you had
lots of companies developing their own "better" languages for certain
domains and there were a lot of 4GLs promising the world, it is still
possible to have a situation in which a development fails because of a
poorly chosen language. 

Actually, I've just remember the introduction to PCL where Peter talks
about his fathers experience with lisp in the 80s. In this example,
choosing lisp saved a development project which was looking very much
like it was going to be a complete failure. If do something like
selecting a different language saves a development project, isn't it
also reasonable to suggest that the converse could be true and that
selecting the wrong language could have a negative impact on
development?
 
Tim

-- 
tcross (at) rapttech dot com dot au
-- 
http://mail.python.org/mailman/listinfo/python-list

The question in source code about of funciton--PyObject_CallFunction (in file abstract.c)

2006-01-22 Thread yy x
hi,all.
 I have remarked the statement of question with blue color in the following funcition, Counld someone answer me?
 
thanks
 
 
 
PyObject *PyObject_CallFunction(PyObject *callable, char *format, ...){ va_list va; PyObject *args, *retval;
 if (callable == NULL)  return null_error();
 if (format && *format) {  va_start(va, format);  args = Py_VaBuildValue(format, va);  va_end(va); } else  args = PyTuple_New(0);
 if (args == NULL)  return NULL;
 if (!PyTuple_Check(args)) {  PyObject *a;
  a = PyTuple_New(1);  if (a == NULL)   return NULL;  if (PyTuple_SetItem(a, 0, args) < 0)   return NULL;//if return from here, why not release the a and args??
  args = a; } retval = PyObject_Call(callable, args, NULL);
 Py_DECREF(args);
 return retval;}
-- 
http://mail.python.org/mailman/listinfo/python-list

How to call a mothod in a class by the method name string and the instance?

2006-02-15 Thread yy x
hi, all:
  for example, the following class:
class test:    def funca(self):    print  "in funca"
    def funcb(self):    print  "in funcb"
t = test()
t.funca()
 
    In the plain way,  i will excute the funca by the code "t.funca() ",
but if i wanna to excute the funca by "t" and string "funca", how will i do?
 
maybe the idea is similiar to "call(t, "funca") ".
 
best regards.
 
 
 
 
 
 
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-04 Thread Tim X
George Neuner  writes:

> On Wed, 3 Oct 2007 09:36:40 + (UTC), [EMAIL PROTECTED] (Bent C
> Dalager) wrote:
>
>>In article <[EMAIL PROTECTED]>, David Kastrup  <[EMAIL PROTECTED]> wrote:
>>>[EMAIL PROTECTED] (Bent C Dalager) writes:
>>>
>>>> In article <[EMAIL PROTECTED]>,
>>>> Frank Goenninger  <[EMAIL PROTECTED]> wrote:
>>>>>
>>>>>Well, I didn't start the discussion. So you should ask the OP about the 
>>>>>why. I jumped in when I came across the so often mentioned "hey, it's 
>>>>>all well defined" statement was brought in. I simply said that if that 
>>>>>"well-definedness" is against "common understanding" then I don't give 
>>>>>a damn about that clever definitions. Because I have to know that there 
>>>>>are such definitions - always also knowing that free is not really 
>>>>>free.
>>>>
>>>> "Liberated" is a valid meaning of the word "free".
>>>
>>>No.  It is a valid meaning of the word "freed".
>>
>>Only if you're being exceedingly pedantic and probably not even
>>then. Webster 1913 lists, among other meanings,
>>
>>Free
>>(...)
>>"Liberated, by arriving at a certain age, from the control
>>of parents, guardian, or master."
>>
>>The point presumably being that having been "liberated", you are now
>>"free".
>
> I don't think knowing the meaning of a word is being pedantic.
> "Freed" is derived from "free" but has a different, though associated,
> meaning.  Words have meaning despite the many attempts by Generation X
> to assert otherwise.  Symbolism over substance has become the mantra
> of the young.
>
> The English language has degenerated significantly in the last 30
> years.  People (marketers in particular) routinely coin ridiculous new
> words and hope they will catch on.  I remember seeing a documentary
> (circa 1990?) about changes in the English language.  One part of the
> program was about the BBC news and one of its editors, whom the staff
> called the "protector of language", who checked the pronunciation of
> words by the news anchors.  The thing that struck me about this story
> was the number of BBC newspeople who publicly admitted that they could
> hardly wait for this man to retire so they could write and speak the
> way they wanted rather than having to be "correct".
>
> Dictionaries used to be the arbiters of the language - any word or
> meaning of a word not found in the dictionary was considered a
> colloquial (slang) use.  Since the 1980's, an entry in the dictionary
> has become little more than evidence of popularity as the major
> dictionaries (OED, Webster, Cambridge, etc.) will now consider any
> word they can find used in print.
>

Language is not a static 'set in stone' thing. It changes and while some
may find the changes unwelcome, it will change anyway. Although I have no
evidence to support it, I suspect that 'free' wold have been more commonly
associated with meanings other than 'free of cost' pre-capitalism. Checking
a few dictionaries seems to indicate that its meaning along the lines of
free from restriction, control, freedom, liberated etc is more in keeping
with its origins than an interpretation of free of cost and that even in
that context, it meant free from the restriction of having to be paid for.

The bottom line is that free has different meanings and if a group decides
to use that term and at the same time specify which context it means it to
apply, then I think that is reasonable. Ask your wife what she thinks is
meant by a free variable and she may say that it is a variable that has no
cost (as in free beer), This doesn't mean that its use is wrong or
incorrect.

I once asked RMS why he chose free, given the ambiguity it would cause,
over alternatives, such as freedom, liberated or even unrestricted. His
response was that at the time, free as in freedom was the concious
association they had and other associations and resulting ambiguity did not
occur to them until it was too late. This seems reasonable enough. If your
focus was to ensure that software was free from what you perceived to be
restrictions that would ultimately reduce your individual freedom, then
free fits. The fact this has led to confusion amongst consumers in a
capitalist based economy probably says as much about modern values and the
changing balance between consumerism compared to freedom than anything
else. 

Tim

"The Americans are identical to the British in all respects except, of
course, language.&quo

FedEx UN Travel Destinations

2007-02-13 Thread Agent X
UN Spons.ored Southern Vacation Packages http://vacationdestiny.blogspot.com/ 
@-- d


-- 
http://mail.python.org/mailman/listinfo/python-list


how to transfer a python object to other computer?

2006-04-19 Thread yy x
    Hey, all.Now I wanna to transfer a object to other computer, Maybe I could serialize the object to a file by pickle moudle, then send the file and get it from the file.But I think the efficency is awful, because the disk io is very slow. 

 Someone could do me a favor to give me some idea?
 
Best Wish.
 
 
 
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-25 Thread Tim X
Mitch <[EMAIL PROTECTED]> writes:

> John Bokma wrote:
>> Mitch <[EMAIL PROTECTED]> wrote:
>> 
>>> John Bokma wrote:
>>> [...]
 You're mistaken. All you need to do is report it. After some time Xah
 will either walk in line with the rest of the world, or has found
 somewhere else to yell. As long as it's not my back garden and not
 around 4AM, I am ok with it.

>>> Walk in line with the rest of the world?  Pah.
>>>
>>> This is no-ones back garden.
>> Funny how people who always think they can "change Usenet" have no
>> clue about what Usenet is and how it works in the first place.
>
> Who said anything about changing it?  I like it just the way it is.
>
>> Usenet is just that, each server participating can be thought of as
>> being the back yard of the news master.
>
> Sure, each server has terms and conditions that apply, doesn't mean
> you should be able to ban people from speaking just because you don't
> like what they say.  My point is that this isn't *your* back garden,
> it isn't *my* back garden.  It isn't something I own, and it *IS*
> something I can filter and/or ignore.  Someone shouting in your back
> garden is a whole different ball game where your desires prevail.  Not
> here.  You know what you are getting into when you sign in, and it is
> your responsibility to deal with those you don't agree with
> personally.
>
> I understand you consider his writings spam, and so can see why you
> have reported him.  All I'm saying is that as long as the articles are
> remotely on topic, I believe he has a right to post his opinions here.
>
>> If you have no clue about how Usenet works, first read up a bit.
>> What a Usenet server is, a feed, and how Usenet is distributed.
>> And then come back if you finally have something to say that you can
>> back up.
>> 
>
> Thankfully I'm aware enough of all the above that I don't feel the need.
>
> As these are all opinions, I don't see any need to "back up" any of it.

Personally, I think this is getting a bit out of hand. Originally,
John and others suggested reporting Xah to his ISP for spamming
multiple groups. There was never any suggestion I have seen (except
from Xah himself) that the objective was to gag his "contraversial"
thoughts/comments/ideas. I have no problem with him posting comments
which are relevant to the group he posts to. However, I do object to
anyone who has the arrogance to believe their opinions are so
important they should be posted to any remotely related group they can
think of. 

I don't agree with nearly 99% of what Xah says - he often raises a
well known issue (i've not seen anything original yet), outlines it
reasonably well, but then proposes solutions which strike me as being
very poorly considered or narrow of thought. He also tends to look at
something for a couple of days and then rubbish it with a tone of
authority and experience he obviously hasn't yet obtained. 

However, he has just as much right to do so as anyone else and
therefore, its not because of his content he should be reported - its
because of his irresponsability in how he distributes it.

I also seem to remember a page on his website from a couple of years
back in which he admits enjoying trolling and starting flame wars -
but I can't find it now, so maybe I'm mistaken. However, I suspect
this is the main motivation for his posts rather than a genuine desire
to solve problems he perceives. At any rate, its not
like he hasn't been told his constant behavior of mass cross posting
was considered bad form - he has been told many many times and just
ignores it. 

If someone wrote up there essays and got them printed on millions of
leaflets which they then dumped all over the place, would you be
outraged when they were fined for littering and claim their right to
free speech was being gagged? Of course not. This is the same. I think
most would have no problem with Xah posting if he did it in a
responsible manner. 

Note that normally I try to remove all the cross posted groups in
replies to Xah's thread, but this time, I'm leaving them as I feel the
nature of this thread warrants it. If you disagree, please don't
hesitate to report me to my ISP as I'm more than willing to defend my
decision. If I lose, there not an ISP I'd want to stay with anyway!

Tim
-- 
tcross (at) rapttech dot com dot au
-- 
http://mail.python.org/mailman/listinfo/python-list


Help with wxPython program :.: return 1?

2009-04-05 Thread Kenny x
Hello, I have a problem with my wxPython 2.8 Application.
The program opens and closes and on KomodoEdit it says "wxstreamredirect.py
returned 1.'
 What's wrong?
http://paste.pocoo.org/show/80/

P.S. I compared my source code to the source code in wxPython in Action,
and it looks the same! Why does my program open, then return 1 and close?

Any help Appreciated! :)

~ Xarver
--
http://mail.python.org/mailman/listinfo/python-list


wxPython 2.8 for Python 2.6 on Linux

2009-04-18 Thread Kenny x
Hello, I use Ubuntu 8.10 and the latest version of Python.

I started programming wxPython on my Windows computer,

but now I have access to my ubuntu box, and want wxPython for 2.6

All the debs in the package manager are for 2.5, not 2.6

How can I Install wxPython for Python 2.6 without building from the source?

Any help appreciated, I need this solved! :)
--
http://mail.python.org/mailman/listinfo/python-list


wxPython 2.8 for Python 2.6

2009-04-19 Thread Kenny x
I hate building from the source.

Especially when wxPython has all these flags and I don't know what they
mean.

Is there any way?

I hate building from the source, and want to use Python 2.6 with wxPython
2.8
--
http://mail.python.org/mailman/listinfo/python-list


Python, VB math simple problem

2006-03-31 Thread Mr X






Hi looking for help with what should be a fairly simple Python problem, relating to VB inter-operability.

Got a great response from a fellow named Matt at [EMAIL PROTECTED], pointed me in some good directions - some areas, concerns still foggy on, the below thread is included any feedback on this simple dilemma

would be very appreciated.



Thanks,



D



thread follows below;





 

To: 	[EMAIL PROTECTED]	   

Subject: 	Problem with Python math functions and VB	   

Date: 	3/30/2006 9:39:28 PM	   

 Download Message Display Headers Printer Friendly 			 

Previous | Next 



Wondering if you might either know how to solve the following.



I've a background in Visual Basic, and am using an old version, 4.0, it compiles to a smaller executable which I prefer. I find myself in an odd situation, needing a very simple yet powerful capability of Python for a VB app

Im working on.



Simply, a large 300 digit number is divided by a smaller number ranging from 1 to 3 digits. I.e;



This large 300 digit number is generated as a string from the VB app, and I want to input this somehow

from the VB app directly to Python for simple math operations.



Where; x = 300 digit number, y = divisor ( say '37')





x / 37



I want to divide x by y but I want the remainder of this division to at least 3 or 4 decimal places, so my Python script at the command line;



x %y /y. = z



So now I want to take the resultant, the full number plus its remainder, and I want to round this number up

to the next highest number and divide it by the same constant;



z rounded up to next highest number (never the lowest)



so



z /y = z Long



Remove the 'L' at the end, round up the last digit of z = Z



Then;



Z %y /y. = a



Then I want the last five digits of z (not Z) and a truncated at the end, so the last digit before

the decimal point and the four digits past the decimal point printed to a text file.



I want to be able to open the text file with the VB app and use this data as inputs.

==



Ok, so here is my dilemma, I know VERY litle about Python and a fair bit about VB.



Ideally, I'd love to be able to simply have some extremely small executable that just accepts inputs

does the calculations above and then spits out the outputs. If it were possible to write some

simple lines of math code in Python and then compile these scripts in Python to a Windows

compatible executable,that would be fantastic.



If I could simply have my VB app, 'call' the name of the tiny Python executable, and then the Python executable

just automatically looked for a named text file (created by the VB app) and extracted the 300 digit number from this, then performed the calcs, then spit this data out as a new text file name it created, which I could then use the VB app to open and read from, THAT would be ideal.



However, I don't know if Python can compile scripts to an exe? If it can how could I find out how to do this?



If it doesn't, how could I get VB to directly pass commands to the Python command line and then automatically

extract the outputs? Shelling out from VB to Python would be tough to the command line I think, since the Python command line uses the 'Edit / Mark, Paste' approach to inserting, copy inputs, outputs and this would be virtually untenable, as far as I can tell to automate in a VB shell out routine.



So basically, how the heck can I access Pythons ability to perform simple calculations on very large numbers, easily, from within VB 4.0 ? There must be a way, it seems like such a simple think to do, especially since the actual math operations are so simple, straight forward, and would never change.



Any ideas?







--

Matthew,  thanks for your response. 



<-Original Message-> 

>From: Matthew Dixon Cowles

>Sent: 3/31/2006 9:41:18 AM

>To: [EMAIL PROTECTED]

>Cc: [EMAIL PROTECTED]

>Subject: Re: [Python-Help] Problem with Python math functions and VB



>I'm sure that there's a way to do that, but I'm not familiar with 

>Visual Basic and I don't know what inter-process communication 

>facilities it offers. 



Is there a person or group you might direct me to that has worked with this 

inter-process communication between VB and Python?



>I don't think that Python is going to be able to do that for you out 

>of the box. Hundreds of digits of floating-point precision is a lot. 



Could you explain that a bit more, sorry Im not sure what you mean

by 'out of the box' ?  If I run the Python command line screen in windows

and manually type out a very large number, say 180 digits; where 'X' = very large number;



X %37 /37.



returns what Im after, value wise.  but of course I don't want to do this manually each time

for every dividend.



>You might find t

Python, VB math simple problem

2006-03-31 Thread Mr X






Hi looking for help with what should be a fairly simple Python problem, relating to VB inter-operability.

Got a great response from a fellow named Matt at [EMAIL PROTECTED], pointed me in some good directions - some areas, concerns still foggy on, the below thread is included any feedback on this simple dilemma

would be very appreciated.



Thanks,



D



thread follows below;





 

To: 	[EMAIL PROTECTED]	   

Subject: 	Problem with Python math functions and VB	   

Date: 	3/30/2006 9:39:28 PM	   

 Download Message Display Headers Printer Friendly 			 

Previous | Next 



Wondering if you might either know how to solve the following.



I've a background in Visual Basic, and am using an old version, 4.0, it compiles to a smaller executable which I prefer. I find myself in an odd situation, needing a very simple yet powerful capability of Python for a VB app

Im working on.



Simply, a large 300 digit number is divided by a smaller number ranging from 1 to 3 digits. I.e;



This large 300 digit number is generated as a string from the VB app, and I want to input this somehow

from the VB app directly to Python for simple math operations.



Where; x = 300 digit number, y = divisor ( say '37')





x / 37



I want to divide x by y but I want the remainder of this division to at least 3 or 4 decimal places, so my Python script at the command line;



x %y /y. = z



So now I want to take the resultant, the full number plus its remainder, and I want to round this number up

to the next highest number and divide it by the same constant;



z rounded up to next highest number (never the lowest)



so



z /y = z Long



Remove the 'L' at the end, round up the last digit of z = Z



Then;



Z %y /y. = a



Then I want the last five digits of z (not Z) and a truncated at the end, so the last digit before

the decimal point and the four digits past the decimal point printed to a text file.



I want to be able to open the text file with the VB app and use this data as inputs.

==



Ok, so here is my dilemma, I know VERY litle about Python and a fair bit about VB.



Ideally, I'd love to be able to simply have some extremely small executable that just accepts inputs

does the calculations above and then spits out the outputs. If it were possible to write some

simple lines of math code in Python and then compile these scripts in Python to a Windows

compatible executable,that would be fantastic.



If I could simply have my VB app, 'call' the name of the tiny Python executable, and then the Python executable

just automatically looked for a named text file (created by the VB app) and extracted the 300 digit number from this, then performed the calcs, then spit this data out as a new text file name it created, which I could then use the VB app to open and read from, THAT would be ideal.



However, I don't know if Python can compile scripts to an exe? If it can how could I find out how to do this?



If it doesn't, how could I get VB to directly pass commands to the Python command line and then automatically

extract the outputs? Shelling out from VB to Python would be tough to the command line I think, since the Python command line uses the 'Edit / Mark, Paste' approach to inserting, copy inputs, outputs and this would be virtually untenable, as far as I can tell to automate in a VB shell out routine.



So basically, how the heck can I access Pythons ability to perform simple calculations on very large numbers, easily, from within VB 4.0 ? There must be a way, it seems like such a simple think to do, especially since the actual math operations are so simple, straight forward, and would never change.



Any ideas?







--

Matthew,  thanks for your response. 



<-Original Message-> 

>From: Matthew Dixon Cowles

>Sent: 3/31/2006 9:41:18 AM

>To: [EMAIL PROTECTED]

>Cc: [EMAIL PROTECTED]

>Subject: Re: [Python-Help] Problem with Python math functions and VB



>I'm sure that there's a way to do that, but I'm not familiar with 

>Visual Basic and I don't know what inter-process communication 

>facilities it offers. 



Is there a person or group you might direct me to that has worked with this 

inter-process communication between VB and Python?



>I don't think that Python is going to be able to do that for you out 

>of the box. Hundreds of digits of floating-point precision is a lot. 



Could you explain that a bit more, sorry Im not sure what you mean

by 'out of the box' ?  If I run the Python command line screen in windows

and manually type out a very large number, say 180 digits; where 'X' = very large number;



X %37 /37.



returns what Im after, value wise.  but of course I don't want to do this manually each time

for every dividend.



>You might find t

Python IDE ScriptDev V2.3 released

2009-10-28 Thread x yf
ScriptDev is developed by a powerful scripting language integrated
development environment(IDE), can be used for Python, Ruby, Lua, Tcl,
Perl, etc. scripting language, such as the development and debugging.
ScriptDev similar to the components of the Eclipse framework to
support the expansion of rich, Users can also follow their own
ScriptDev the development of standardized components to various types
of plug-ins to enhance the functions of platform.

you can find out and download it from http://www.scriptdevelop.com

Main features:
*Edit, debug, run tcl, python, ruby, perl, lua scripts;
*Script compiler / encryption and generate an executable file (the
script for each different level of support);
*Analysis of efficiency function as (the script for each different
level of support);
*Keyword help, through the F1 key or move the mouse to the keyword,
access to detailed information to help;
*Collected more script extension, to help document and presentation
process, in addition to the commonly used tk, wx, pmw, there are
images, multimedia, the interface, and many other variety of
extensions;
*A flexible, scalable architecture, the entire system can be flexible
interpretation of the expansion of various components, interface
components, tools, interface style;
*Console support functions (currently only tcl console, telnet
console, serial console available);
*Packaging TclFace pages expansion of the package, can be the object-
oriented tcl script development platform available in this script
pages;
*Interface support for skin, support Office2007, Visual Studio 2005,
and other interface style.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: NoSQL Movement?

2010-03-04 Thread Tim X
ccc31807  writes:

> On Mar 3, 4:55 pm, toby  wrote:
>> >  where you have to store data and
>>
>> "relational data"
>
> Data is neither relational nor unrelational. Data is data.
> Relationships are an artifact, something we impose on the data.
> Relations are for human convenience, not something inherent in the
> data itself.
>
>> > perform a large number of queries.
>>
>> Why does the number matter?
>
> Have you ever had to make a large number of queries to an XML
> database? In some ways, an XML database is the counterpart to a
> relational database in that the data descriptions constitute the
> relations. However, since the search is to the XML elements, and you
> can't construct indicies for XML databases in the same way you can
> with relational databases, a large search can take much longer that
> you might expect.
>

Most XML databases are just a re-vamp of hierarchical databases, which are
one of the two common formats that came before relational databases.
Hierarchical, network and relational databases all have their uses. 

Some 'xml' databases, like existsdb have some pretty powerful indexing
technologies. while they are different to relational db indexing because
they are based around hierarchies rather than relations, they do provide
the ability to do fast queries in the same way that indexes in
relational databases allow fast queries over relations. Both solutions
can do fast queries, they are just optimised for different types of
queries. Likewise, other database technologies that tend to fall into
this category, such as couch and mungo are aimed at applications and
problems that aren't suitable for the relational db model and are better
suited to the types of applications they have been designed for. 

As usual, Xah's rantings are of little substance here. Yes, he is right that
'nosql' is essentially just another buzzword  like 'web 2.0', but so
what? This is an industry that loves its buzzwords.Often its just
marketing hype or some convenience holder for a vague 'concept' some
journalist, consultant or blogger wants to wank on about. 

You cannot hate or love 'nosql' without defining exactly what you mean
by the term. Xah starts by acknowledging the term is ill defined
and then goes on to say how he doesn't like it because it lacks the
mathematical precision of the relational algebra that underpins the
relational model. It seems somewhat ironic to put forward an argument
focusing on the importance of precision when you fail to be precise
regarding the thing your arguing against. 

His point is further weakened by the failure to realise that SQL and the
relational model and relational algebra are different things. Not having
SQL doesn't automatically mean you cannot have a relational model or
operations that are based on relational algebra. SQL is just the
convenient query language and while it has succeeded where other
languages have not, its just one way of interacting with a relational
database. As a language SQL isn't even 'pure' in that it has operations
that don't fit with the relational algebra that he claims is so
important and includes facillities that are really business convenience
operations that actually corrupt the mathematical model and purity that
is the basis of his poorly formed argument. He also overlooks the fact
that none of the successful relational databases have remained true to
either the relational model or the underlying theory. All of the major
RDMS have corrupted things for marketing, performance or maintenance
reasons. Only a very few vendors have stayed true to the relational
model and none of them have achieved much in the way of market share, I
wonder why?

All Xah is doing is being the nets equivalent of radios 'shock jock'. He
searches for some topical issue, identifies a stance that he feels will
elicit the greatest number of emotional responses and lobs it into the
crowd. He rarely hangs around to debate his claims. When he does, he
tends to just yell and shout and more often than not, uses personal
attack to defend his statements rather than arguing the topic. His
analysis is usually shallow and based on popularism If
someone disagrees, they are a moron or a fool and if they agree, they
are a genius just like him. 

Just like true radio shock jocks, some willl love him and some will hate
him. The only things we can be certain about are that reaction is
a much hier motivator for his posts than conviction, there is
probably an inverse relationship  between IQ and support for his
arguments and that his opinion probably has the same longevity as the
term nosql.

Now if we can just get back to debating important topics like why
medical reform is the start of communism, how single mothers are
leeching of tax payers, the positive aspects of slavery, why blacks are
all criminals, how governments are evil, the holocaust conspiricy, why
all muslims are terrorists, the benefits of global warming, the bad
science corrupting our children's innocence and stop wastin

Re: pyfits problem

2006-11-17 Thread Cygnus X-1
On Thu, 16 Nov 2006 15:35:00 -0500, Tommy Grav wrote
(in article <[EMAIL PROTECTED]>):

> I am trying to load in a fits-image and get this error
> 
> wiyn05dec/n1 -> display -i obj062.fits
> Traceback (most recent call last):
>File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/ 
> display.py", line 48, in ?
>  main()
>File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/ 
> display.py", line 30, in main
>  im  = pyfits.getdata(options.infname)
>File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
> python2.4/site-packages/pyfits/NP_pyfits.py", line 4645, in getdata
>  _data = hdu.data
>File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
> python2.4/site-packages/pyfits/NP_pyfits.py", line 2058, in __getattr__
>  self.data = np.array(raw_data, type=np.Float32)
> AttributeError: 'module' object has no attribute 'Float32'
> 
> I am using numpy 1.0rc3 and ActivePython 2.4.3 Build 11.
> Anyone know what is going on?
> 
> Cheers
> Tommy

Have you opened the file?  Which version of pyFITS?

Consider:
   fimg=pyfits.open(datafile)
   self.header=fimg[0].header
   self.image=fimg[0].data

Tom
-- 
Dealing with Creationism in Astronomy
http://homepage.mac.com/cygnusx1
[EMAIL PROTECTED]
"They're trained to believe, not to know.  Belief can be manipulated.  
Only knowledge is dangerous."  --Frank Herbert, "Dune Messiah"

-- 
http://mail.python.org/mailman/listinfo/python-list


Report

2005-01-31 Thread decoder-x-mac-gujarati
The original message was received at Mon, 31 Jan 2005 19:08:12 +0500 from 
[140.253.248.170]

- The following addresses had permanent fatal errors -
python-list@python.org



-- 
http://mail.python.org/mailman/listinfo/python-list

Socket connection between python and C

2011-02-08 Thread Williamson, Ross X. (Guest)
Dear All,

I'm trying to implement a server/client system where the server is written in 
python and the client has to be written in c/c++.  I can happily send simple 
text through the socket. Ideally I would like make say a struct (using python 
struct library) - and then read that in using C. Is there a better way to 
package data on the server in python to send down a socket to a C client? XML? 
Pickle?

Cheers,

Ross
-- 
http://mail.python.org/mailman/listinfo/python-list


PIL Error: "cannot read interlaced PNG files"

2007-09-10 Thread T-u-N-i-X
Hey There,

I'm developing an application that lets the user to upload JPG and PNG
files. I'm using PIL to check the images after the upload (like
checking it storage size, width and height). But PIL raises an error:

"cannot read interlaced PNG files"

It says that interlaced PNG files are not supported in the PIL
documentation. I'm using PIL 1.1.6-2 on Arch Linux..

I can check all images with:

from PIL import Image
im = Image.open('image.png')
im.info

which returns a dictionary about the image. If the dict has
'interlace' key with the value 1, then I reject the event that's being
send with a validation error. But I don't think this is a good idea
since this could be very annoying for the users.

-- 
http://mail.python.org/mailman/listinfo/python-list


Serious Problem with Timezone

2008-05-19 Thread T-u-N-i-X
Hey There,

I'm a django developer and working on a project right now.. Last week
I just discovered a new problem in Python.. Here's what I do..

[01:00] ([EMAIL PROTECTED] ~)$ date
Sal May 20 01:00:10 EEST 2008
[01:00] ([EMAIL PROTECTED] ~)$ python
Python 2.5.2 (r252:60911, Feb 23 2008, 21:20:32)
[GCC 4.2.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> datetime.now()
datetime.datetime(2008, 5, 20, 1, 0, 21, 131804)
>>> import os
>>> os.environ["TZ"] = "Europe/Istanbul"
>>> datetime.now()
datetime.datetime(2008, 5, 19, 22, 0, 38, 578438)
>>>

It's 01:00 in Istanbul now and Python shows 22:00 on 19th of May if I
set the TZ environment variable.. Django sets that variable
automatically so I'm having problems with scheduled posts..

I controlled my system's BIOS time.. It was wrong before, so I just
corrected it.. I set the time to UTC on Linux.. What else can I do ?
--
http://mail.python.org/mailman/listinfo/python-list


Python(x,y) - Free Python distribution for Scientists

2008-04-10 Thread Python(x,y) - Python for Scientists
Dear all,

The scientists among you may be interested in Python(x,y), a new
scientific-oriented Python distribution. This Python/Eclipse distribution
is freely available as a one-click Windows installer (a release for
GNU/Linux with similar features will follow soon):
http://www.pythonxy.com

Please do not hesitate to forward this announcement...

Thanks a lots,
PR

-- 
P. Raybaut
Python(x,y)
http://www.pythonxy.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Python Guru needed in San Jose!

2007-01-02 Thread Brent Rogers -X (breroger - Spherion at Cisco)
Start the New Year off with a new Python job! 

Cisco Systems   (San Jose, CA)

Posted 16-Nov-2006

Technical Leader I (759661)

Description

We are looking for a Software Development Engineer who will work in
development of a new Cisco product. Architect and develop high
performance Linux embedded drivers and software. Product implements
networked services delivery including streaming and other real time
protocols. Candidate must have demonstrated deep understanding of Linux
OS and developed networking software on Linux. Work in a startup
environment inside a corporate company.

*   Proven track record of major contributions to successful
commercial Linux Real Time software development efforts. 
*   Strong Linux/Unix background (System Administration background
helpful) 
*   Ability to write scripts in some administrative language (TCL,
Perl, Python, a shell) 
*   A self starter able to work with a minimal supervision 
*   Uses acquired professional knowledge to determine method for
issue resolution. 
*   Uses expertise and creativity for innovative product
recommendation and solutions 

Typically requires BSEE/CS or equivalent with 10+ years relevant
experience in internetworking technologies and applications.

*   Contact: Brent Rogers, Recruiter 
*   Email: [EMAIL PROTECTED] 
*   Phone: 469-255-0254

 

Brent Rogers
Recruiter
Talent Acquisition and Management

[EMAIL PROTECTED]
Phone :469-255-0254
Mobile :469-223-2085


Cisco Systems. Inc.
2200 E. President George Bush 
Richardson, TX, 75082
United States
www.cisco.com/jobs



This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.   
 


 


spacer.gif
Description: spacer.gif


footerHead.gif
Description: footerHead.gif


footer.gif
Description: footer.gif
-- 
http://mail.python.org/mailman/listinfo/python-list

Query regarding python 2.7.11 release

2016-04-14 Thread Gaurav Rastogi -X (garastog - ARICENT TECHNOLOGIES MAURIITIUS LIMITED at Cisco)
Hi,

We are currently using Python 2.6.7 in our product.
We have received below vulnerabilities from field:

CVE-2014-7185

Integer overflow in bufferobject.c in Python before 2.7.8 allows 
context-dependent attackers to
obtain sensitive information from process memory via a large size and offset in 
a "buffer" function.

CVE-2013-1752

python: multiple unbound readline() DoS flaws in python stdlib

CVE-2014-1912

python: buffer overflow in socket.recvfrom_into()

CVE-2014-4650

It was discovered that the CGIHTTPServer module incorrectly handled URL encoded 
paths.
A remote attacker could use this flaw to execute scripts outside of the cgi-bin 
directory, or disclose source of scripts in the cgi-bin directory


Currently I can see the 2.7.11 is the latest release as per the below link:
https://www.python.org/downloads/

Could you please suggest if the above mentioned vulnerabilities are resolved in 
the latest release?

Regards
Gaurav
-- 
https://mail.python.org/mailman/listinfo/python-list