473,809 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question from beginner

Hi, Im new on phyton programming.
On my GPRS modem with embedded Phyton 1.5.2+ version, I have to receive
a string from serial port and after send this one enclosed in an
e-mail.
All OK if the string is directly generated in the code. But it doesn't
works if I wait for this inside a 'while' loop. This is the simple
code:

global stringZVEI

while stringZVEI=='':
MOD.sleep(10)
a=SER.send(' sono nel while stringZVEI==st vuota')
stringZVEI = SER.readbyte()
a=SER.send(' stringZVEI=')
a=SER.send(stri ngZVEI)

MOD and SER are embedded class maked by third part.
From my very little debug possibility it seem that loop is executed 1

time only nevertheless stringZVEI is still empty. The line
a=SER.send(' stringZVEI=')
work correctly but

a=SER.send(stri ngZVEI)

doesn't work

Any suggestion?

Thanks
Dario.

Sep 7 '05
16 2626
On Fri, 9 Sep 2005 13:55:03 -0700, Trent Mick wrote:
[Mike Meyer wrote]
stri ker <st*****@trip.n et> writes:
Has anyone here upgraded from 2.3 to 2.4 on Tiger?
If so how'd ya do it?


You don't. You install 2.4 in parallel with 2.3. You can do pretty
much whatever you want with /usr/bin/python, /usr/local/bin/python,
etc. - Tiger doesn't seem to use those. I don't remember if I replaced
one or not, but don't touch anything else about the 2.3 installtion.

I installed the darwinports version of 2.4, and have been using it
ever since for all my stuff.


There are also the following install options:

- ActivePython:
http://www.activestate.com/Products/ActivePython/
(disclaimer: I make this distro)

- MacPython:
http://undefined.org/python/#python
by Bob Ippolito

- fink (similar in spirit to the darwinports project) also has a Python
I believe
Trent


I just got a Mac and was wondering the same thing as the original poster -
how to move to 2.4, but I found out there was more than one version.
So in addition to the Apple installation of 2.3, there are 4 versions of
Python 2.4 (ActivePython, MacPython, fink, darwinports).

Which one should I go for? What are other people using (i.e. which is the
most popular version)? Any particular advantages/disadvantages for each
version?

Cheers.

Mike
Sep 11 '05 #11
Mike P. wrote:
Which one should I go for? What are other people using (i.e. which is the
most popular version)? Any particular advantages/disadvantages for each
version?


The official one.

http://python.org/2.4.1/

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Sep 11 '05 #12
"Mike P." <no*****@for.me .thanks.com> writes:
I just got a Mac and was wondering the same thing as the original poster -
how to move to 2.4, but I found out there was more than one version.
So in addition to the Apple installation of 2.3, there are 4 versions of
Python 2.4 (ActivePython, MacPython, fink, darwinports).
emerge probably has one as well. And Robert Kern mentioned the
official one. The package systems may use one of the others,
especially if they are available in source form. If they all do, there
are only three distributions (ActivePython, MacPython, and the
official one), with the packages installing them in different places.
Which one should I go for? What are other people using (i.e. which is the
most popular version)? Any particular advantages/disadvantages for each
version?


Depends on what you want to do with it. If you favor one of the
package systems (fink, darwinports, emerge), you probably want to use
that one. That way, you won't have to worry about whether or not
another package from that system will find the one Python you
installed (and hence all the things installed by it), or will install
things again.

Otherwise, I agree with Robert - use the official one. Of course, if
one of the other two includes all the extra functionality you want,
use it.

Come to think of it, what's installed by Apple may count as a
different distribution as well. It certainly includes more than just
the official distribution.

<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Sep 11 '05 #13
Mike Meyer wrote:
Depends on what you want to do with it. If you favor one of the
package systems (fink, darwinports, emerge), you probably want to use
that one. That way, you won't have to worry about whether or not
another package from that system will find the one Python you
installed (and hence all the things installed by it), or will install
things again.

Otherwise, I agree with Robert - use the official one. Of course, if
one of the other two includes all the extra functionality you want,
use it.
One thing that should be noted is that fink's python, last time I
checked, isn't built as a framework build, so it can't talk to the
native GUI or use PyObjC. That's a shame.

darwinports' python is a framework build, but does silly things like
linking to an X11 version of Tk instead of TclTkAqua like the official
distribution.

ActiveState's python is also a framework build, but I don't see how it
adds anything beyond what's provided by the official installer besides
packaging freely available documentation.

I have no idea how emerge's python is built.

The official build is going to be the most widely used and tested. Tools
like py2app and PyObjC are guaranteed to work with it.
Come to think of it, what's installed by Apple may count as a
different distribution as well. It certainly includes more than just
the official distribution.


It's also old and probably won't be the same version in 10.5. If you
want any control over how you distribute your apps, use the official
2.4.1 binary and embed the interpreter inside your .app bundle with py2app.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Sep 11 '05 #14
Robert Kern <rk***@ucsd.edu > writes:
Come to think of it, what's installed by Apple may count as a
different distribution as well. It certainly includes more than just
the official distribution.

It's also old and probably won't be the same version in 10.5. If you
want any control over how you distribute your apps, use the official
2.4.1 binary and embed the interpreter inside your .app bundle with py2app.


IIRC, 10.4.2 ships with a more recent release than 2.4.1 - it comes
with 2.3.5. What I may not be recalling correctly is whether 2.3.5
postdates 2.4.1 or not.

For my uses - developing Unix server-side applications - which version
of Tk it links with is irrelevant. My Mac is a Unix laptop with
hardware support from the vendor. That it runs commercial apps under
Aqua is a nice bonus. That I can't get my favorite X wm on working on
it is unfortunate.

Come to think of it, that problem is OT for c.l.python - because my X
wm is written in Python, using python-xlib. So to post...

<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Sep 13 '05 #15
Mike Meyer wrote:
Robert Kern <rk***@ucsd.edu > writes:
Come to think of it, what's installed by Apple may count as a
different distribution as well. It certainly includes more than just
the official distribution.


It's also old and probably won't be the same version in 10.5. If you
want any control over how you distribute your apps, use the official
2.4.1 binary and embed the interpreter inside your .app bundle with py2app.


IIRC, 10.4.2 ships with a more recent release than 2.4.1 - it comes
with 2.3.5. What I may not be recalling correctly is whether 2.3.5
postdates 2.4.1 or not.


Okay, when I said "old" I really meant "lower version."

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Sep 13 '05 #16
Hi Dennis, unfortunately I can only use SER class and not 'serial'
class.
This because my emebedded phyton version don't show any import
possibility to this class. It run on the Trizium modem.
Serial I attached above, was coming from the 'simulator' code installed
on my PC.
How I can simulate your code without serial class? It is better with
SER.read() than SER.readbyte() because I have to read a string.

Thanks.

Sep 13 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3225
by: martin | last post by:
Hello, I just got the SUN Java IDE. (Netbeans IDE 3.5.1) Very very nice, and I worked myself through the tutorial (about making a colorswitch). Now, When I compile it gives no errors at all. So far so good. But when I want to execute, it askes to "set project main class". The only option it displays is the default project. But the "okay" button won't highlight. I cannot select anything else, nor can I roam directories to select
11
2570
by: Svens | last post by:
Hey everyone! I'm a math student working on a short script involving logs. I have a function on my scientific calculator, and was wondering if there was a similar funtion in python. For example: (log65536)/(log4)= 8 I've searched around a bit and haven't been able to find anything.
4
1453
by: IS | last post by:
At the recommendation of several people in this newsgroup I have downloaded two or three Compilers. One is the Beta version of Microsoft's Visual C++ 2005. I have entered a complete beginner code that looks like this: #include <iostream> using namespace std: //introduces namespace std int main( void )
3
6476
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I COULD be wrong... :) I've tried the access group...twice...and all I get is "Access doesn't like ".", which I know, or that my query names are too long, as there's a limit to the length of the SQL statement(s). But this works when I don't try to...
12
4648
by: uno | last post by:
Hello, I am a beginner with the programming and I have some question. I am reading manuals from Internet and some book from the library. In all those documents the C language operate wint plain text files, and I want to know how operate with formated files (msexcel, msaccess, mysql, etc..). If it isn't possible with C, with C++ is possible? Thanks a beginner (P.D.- Sorry for my poor english)
1
2628
by: Mike Malter | last post by:
I am just starting to work with reflection and I want to create a log that saves relevant information if a method call fails so I can call that method again later using reflection. I am experimenting a bit with what I need to do this and have the following code snippet. But first if I pass the assembly name and type to Activator.CreateInstance() it always fails. However if I walk my assembly and get a type value, the call to...
10
4475
by: Roman Zeilinger | last post by:
Hi I have a beginner question concerning fscanf. First I had a text file which just contained some hex numbers: 0C100012 0C100012 ....
4
1561
by: a | last post by:
Dear all vb.net developer I want to know the time I need to master vb.net? I'm beginner
3
2047
by: Ben Keshet | last post by:
I have a probably simple beginner's question - I have a script that I am currently able to print its output. instead, i want to write it into a file - I tried different versions of write() but might have gotten the syntax wrong. the variable I want to write is a line from a file I am reading: "... f = open('receptor.mol2', 'r') line = f.readline()
2
1853
by: roanhn | last post by:
Hello. I've to to write a master's thesis. Currently I deal with php, mysql, ajax. Fate decreed that I've to choose one of this subjects: 1.gdi+ library in .net technology 2.ado.net technology in VS 2008. I didn't have contact with Visual Studio, .NET. I only know some basics of c++. My question is what subject of your point of view will be easier for absolute beginner in .net domain. From writing which subject I gain more knowledge...
0
9602
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10383
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.